diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java index cea82c403d..7d6bf7a186 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityBreaksHangingScriptEvent.java @@ -79,7 +79,7 @@ public boolean matches(ScriptPath path) { if (!runInCheck(path, location)) { return false; } - if (path.eventArgLowerAt(3).equals("because") && !path.eventArgLowerAt(4).equals(CoreUtilities.toLowerCase(cause.asString()))) { + if (path.eventArgLowerAt(3).equals("because") && !path.eventArgLowerAt(4).equals(cause.asLowerString())) { return false; } return super.matches(path); diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDespawnScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDespawnScriptEvent.java index b7cf808162..62afe73439 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDespawnScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDespawnScriptEvent.java @@ -48,7 +48,7 @@ public boolean matches(ScriptPath path) { if (!entity.tryAdvancedMatcher(target)) { return false; } - if (!path.checkSwitch("cause", CoreUtilities.toLowerCase(cause.asString()))) { + if (!path.checkSwitch("cause", cause.asLowerString())) { return false; } if (!runInCheck(path, entity.getLocation())) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityUnleashedScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityUnleashedScriptEvent.java index c18b9ccaeb..faa6bd041d 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityUnleashedScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityUnleashedScriptEvent.java @@ -45,7 +45,7 @@ public boolean matches(ScriptPath path) { if (!entity.tryAdvancedMatcher(path.eventArgLowerAt(0))) { return false; } - if (path.eventArgAt(2).equals("because") && !path.eventArgLowerAt(3).equals(CoreUtilities.toLowerCase(reason.asString()))) { + if (path.eventArgAt(2).equals("because") && !path.eventArgLowerAt(3).equals(reason.asLowerString())) { return false; } if (!runInCheck(path, entity.getLocation())) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/entity/HangingBreaksScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/entity/HangingBreaksScriptEvent.java index 102c586935..6945ff7e12 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/entity/HangingBreaksScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/entity/HangingBreaksScriptEvent.java @@ -50,7 +50,7 @@ public boolean matches(ScriptPath path) { if (!hanging.tryAdvancedMatcher(hangCheck)) { return false; } - if (path.eventArgLowerAt(2).equals("because") && !path.eventArgLowerAt(3).equals(CoreUtilities.toLowerCase(cause.asString()))) { + if (path.eventArgLowerAt(2).equals("because") && !path.eventArgLowerAt(3).equals(cause.asLowerString())) { return false; } if (!runInCheck(path, hanging.getLocation())) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java index aa38f51c3e..5da7ed533a 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/MapCommand.java @@ -167,7 +167,7 @@ public void execute(ScriptEntry scriptEntry) { DenizenMapRenderer dmr = DenizenMapManager.getDenizenRenderer(map); int wide = width != null ? width.asInt() : resize ? 128 : 0; int high = height != null ? height.asInt() : resize ? 128 : 0; - if (CoreUtilities.toLowerCase(image.asString()).endsWith(".gif")) { + if (image.asLowerString().endsWith(".gif")) { dmr.autoUpdate = true; } dmr.addObject(new MapImage(dmr, x.asString(), y.asString(), "true", false, image.asString(), wide, high)); diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/TeamCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/TeamCommand.java index 91245d3bb2..f3f0da7cf9 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/TeamCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/TeamCommand.java @@ -187,7 +187,7 @@ public void execute(ScriptEntry scriptEntry) { } Team team = board.getTeam(name.asString()); if (team == null) { - String low = CoreUtilities.toLowerCase(name.asString()); + String low = name.asLowerString(); team = board.getTeams().stream().filter(t -> CoreUtilities.toLowerCase(t.getName()).equals(low)).findFirst().orElse(null); if (team == null) { team = board.registerNewTeam(name.asString()); @@ -210,8 +210,8 @@ public void execute(ScriptEntry scriptEntry) { } } if (option != null) { - String optName = CoreUtilities.toLowerCase(option.asString()); - String statusName = CoreUtilities.toLowerCase(status.asString()); + String optName = option.asLowerString(); + String statusName = status.asLowerString(); if (optName.equals("friendly_fire")) { team.setAllowFriendlyFire(statusName.equals("always")); } diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java index 547b6f722f..bd993fc65a 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BossBarCommand.java @@ -156,7 +156,7 @@ public void execute(ScriptEntry scriptEntry) { if (scriptEntry.dbCallShouldDebug()) { Debug.report(scriptEntry, getName(), id, action, players, title, progress, color, style, options); } - String idString = CoreUtilities.toLowerCase(id.asString()); + String idString = id.asLowerString(); switch (Action.valueOf(action.asString().toUpperCase())) { case CREATE: { if (bossBarMap.containsKey(idString)) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/CreateWorldCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/CreateWorldCommand.java index 69ae26789c..07ca2c718b 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/CreateWorldCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/CreateWorldCommand.java @@ -139,7 +139,7 @@ public void execute(ScriptEntry scriptEntry) { } } else if (!Settings.cache_createWorldWeirdPaths) { - String cleaned = CoreUtilities.toLowerCase(worldName.asString()).replace('\\', '/'); + String cleaned = worldName.asLowerString().replace('\\', '/'); while (cleaned.contains("//")) { cleaned = cleaned.replace("//", "/"); }