From 83b112233f6ff6b5f8f42b607857eac86a3addff Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 3 Jan 2013 09:29:00 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20trigger=20if=20state=20was=20not?= =?utf8?q?=20successful.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/reactor/engine/Engine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } -- 2.7.4