Don't set stop to false

This commit is contained in:
Lucwousin
2019-12-31 22:29:40 +01:00
parent 214f642e95
commit 9515f6d220
3 changed files with 8 additions and 7 deletions

View File

@@ -151,12 +151,10 @@ public class ChatCommandManager
} }
BiPredicate<ChatInput, String> input = chatCommand.getInput(); BiPredicate<ChatInput, String> input = chatCommand.getInput();
if (input == null) if (input != null && input.test(chatInput, message))
{ {
return; chatInput.setStop();
} }
chatInput.setStop(input.test(chatInput, message));
} }
private static String extractCommand(String message) private static String extractCommand(String message)

View File

@@ -25,14 +25,17 @@
package net.runelite.client.events; package net.runelite.client.events;
import lombok.Getter; import lombok.Getter;
import lombok.Setter;
import net.runelite.api.events.Event; import net.runelite.api.events.Event;
public abstract class ChatInput implements Event public abstract class ChatInput implements Event
{ {
@Getter @Getter
@Setter
private boolean stop = false; private boolean stop = false;
public void setStop()
{
this.stop = true;
}
public abstract void resume(); public abstract void resume();
} }

View File

@@ -219,6 +219,6 @@ public class TwitchPlugin extends Plugin implements TwitchListener
addChatMessage(twitchConfig.username(), message); addChatMessage(twitchConfig.username(), message);
} }
chatboxInput.setStop(true); chatboxInput.setStop();
} }
} }