Skip to content

Commit

Permalink
use new asLowerString
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 17, 2022
1 parent 93da58b commit 8bc28b7
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Expand Up @@ -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);
Expand Down
Expand Up @@ -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())) {
Expand Down
Expand Up @@ -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())) {
Expand Down
Expand Up @@ -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())) {
Expand Down
Expand Up @@ -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));
Expand Down
Expand Up @@ -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());
Expand All @@ -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"));
}
Expand Down
Expand Up @@ -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)) {
Expand Down
Expand Up @@ -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("//", "/");
}
Expand Down

0 comments on commit 8bc28b7

Please sign in to comment.