From: David ‘Bombe’ Roden Date: Thu, 3 Jan 2013 08:29:00 +0000 (+0100) Subject: Don’t trigger if state was not successful. X-Git-Tag: 0.1~91 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=83b112233f6ff6b5f8f42b607857eac86a3addff;p=rhynodge.git Don’t trigger if state was not successful. --- diff --git a/src/main/java/net/pterodactylus/reactor/engine/Engine.java b/src/main/java/net/pterodactylus/reactor/engine/Engine.java index 6454419..4ba7887 100644 --- a/src/main/java/net/pterodactylus/reactor/engine/Engine.java +++ b/src/main/java/net/pterodactylus/reactor/engine/Engine.java @@ -150,7 +150,7 @@ public class Engine extends AbstractExecutionThreadService { /* only run trigger if we have collected two states. */ Trigger trigger = nextReaction.trigger(); boolean triggerHit = false; - if (reactionExecution.previousState() != null) { + if ((reactionExecution.previousState() != null) && state.success()) { logger.debug("Checking Trigger for changes..."); triggerHit = trigger.triggers(reactionExecution.currentState(), reactionExecution.previousState()); }