diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpawnScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpawnScriptEvent.java index 90fb14d566..7ff7a433f9 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpawnScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntitySpawnScriptEvent.java @@ -7,7 +7,6 @@ import com.denizenscript.denizencore.objects.core.ElementTag; import com.denizenscript.denizencore.objects.ObjectTag; import com.denizenscript.denizencore.scripts.ScriptEntryData; -import com.denizenscript.denizencore.utilities.CoreUtilities; import org.bukkit.entity.Entity; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; @@ -68,20 +67,16 @@ public boolean couldMatch(ScriptPath path) { @Override public boolean matches(ScriptPath path) { - if (!tryEntity(entity, path.eventArgLowerAt(0))) { return false; } - if (path.eventArgLowerAt(2).equals("because") - && !CoreUtilities.equalsIgnoreCase(path.eventArgLowerAt(3), reason.toString())) { + && !runGenericCheck(path.eventArgLowerAt(3), reason.toString())) { return false; } - if (!runInCheck(path, location)) { return false; } - return super.matches(path); } @@ -120,5 +115,4 @@ public void onCreatureSpawn(CreatureSpawnEvent event) { fire(event); EntityTag.forgetEntity(entity); } - } diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/entity/ExperienceBottleBreaksScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/entity/ExperienceBottleBreaksScriptEvent.java index 971b26bac6..02cb5d535b 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/entity/ExperienceBottleBreaksScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/entity/ExperienceBottleBreaksScriptEvent.java @@ -48,9 +48,6 @@ public boolean couldMatch(ScriptPath path) { if (!path.eventLower.startsWith("experience bottle breaks")) { return false; } - if (!couldMatchEntity(path.eventArgLowerAt(0))) { - return false; - } return true; } diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerAnimatesScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerAnimatesScriptEvent.java index cc8ddeb8cc..5e9455fe05 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerAnimatesScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerAnimatesScriptEvent.java @@ -60,10 +60,9 @@ public boolean matches(ScriptPath path) { return false; } String ani = path.eventArgLowerAt(2); - if (ani.length() > 0 && !ani.equals("in") && !ani.equalsIgnoreCase(animation)) { + if (ani.length() > 0 && !ani.equals("in") && !runGenericCheck(ani, animation)) { return false; } - return super.matches(path); } diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerChangesGamemodeScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerChangesGamemodeScriptEvent.java index 94d2174e94..b8a743310d 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerChangesGamemodeScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerChangesGamemodeScriptEvent.java @@ -7,7 +7,6 @@ import com.denizenscript.denizencore.objects.core.ElementTag; import com.denizenscript.denizencore.objects.ObjectTag; import com.denizenscript.denizencore.scripts.ScriptEntryData; -import com.denizenscript.denizencore.utilities.CoreUtilities; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerGameModeChangeEvent; @@ -53,7 +52,7 @@ public boolean couldMatch(ScriptPath path) { public boolean matches(ScriptPath path) { String mode = path.eventArgLowerAt(4); if (mode.length() > 0) { - if (!CoreUtilities.equalsIgnoreCase(gamemode.asString(), mode)) { + if (!runGenericCheck(mode, gamemode.asString())) { return false; } } diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java index 6d696bab50..1db25f0944 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerClicksBlockScriptEvent.java @@ -7,7 +7,6 @@ import com.denizenscript.denizencore.objects.core.ElementTag; import com.denizenscript.denizencore.objects.ObjectTag; import com.denizenscript.denizencore.scripts.ScriptEntryData; -import com.denizenscript.denizencore.utilities.CoreUtilities; import org.bukkit.Material; import org.bukkit.event.Event; import org.bukkit.event.EventHandler; @@ -81,7 +80,7 @@ private boolean runUsingCheck(ScriptPath path) { Debug.echoError("Invalid USING hand in " + getName() + " for '" + path.event + "' in " + path.container.getName()); return false; } - if (!using.equals("either_hand") && !CoreUtilities.equalsIgnoreCase(using, hand.identify())) { + if (!using.equals("either_hand") && !runGenericCheck(using, hand.identify())) { return false; } return true; diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java index 3b3acd0bc7..0d0e6be3cf 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java @@ -60,7 +60,7 @@ public TeleportCommand() { // - teleport // // @Usage - // Use to teleport the NPC to a location that was noted wih the <@link commmand note> command. + // Use to teleport the NPC to a location that was noted wih the <@link command note> command. // - teleport my_prenoted_location // -->