diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/player/ChatScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/player/ChatScriptEvent.java index 5462c4c1fe..537233ce12 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/player/ChatScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/player/ChatScriptEvent.java @@ -38,7 +38,10 @@ public class ChatScriptEvent extends BukkitScriptEvent implements Listener { // // @Warning Using this will forcibly sync the chat thread. // + // @Switch message: to only process the event if the chat message matches an advanced matcher. + // // @Triggers when a player chats. + // // @Context // returns the player's message as an Element. // returns the chat message's raw format. @@ -81,6 +84,9 @@ public boolean matches(ScriptPath path) { if (!runInCheck(path, player.getLocation())) { return false; } + if (!runGenericSwitchCheck(path, "message", getMessage())) { + return false; + } return super.matches(path); } diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java index 71b1baaf23..a574170cc0 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/world/PotionSplashScriptEvent.java @@ -18,7 +18,7 @@ public class PotionSplashScriptEvent extends BukkitScriptEvent implements Listen // potion splash // splashes // - // @Regex ^on [^\s]+ splashes$ + // @Regex ^on [^\s]+ splash(es)?$ // // @Group World //