Skip to content

Commit

Permalink
minor cleanups/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 18, 2020
1 parent e5c1944 commit 3915c5d
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Expand Up @@ -52,7 +52,7 @@ public void onDisable() {

public void checkLoadBungeeBridge() {
String bungeeServer = getConfig().getString("Bungee server address", "none");
if (CoreUtilities.toLowerCase(bungeeServer).equals("none")) {
if (CoreUtilities.equalsIgnoreCase(bungeeServer, "none")) {
Debug.log("<G>Depenizen will not load bungee bridge.");
return;
}
Expand Down
Expand Up @@ -94,7 +94,7 @@ public boolean isTarget(LivingEntity ent, String prefix, String value) {
}
queue.start();
if (queue.determinations != null && queue.determinations.size() > 0) {
return CoreUtilities.toLowerCase(queue.determinations.get(0)).equals("true");
return CoreUtilities.equalsIgnoreCase(queue.determinations.get(0), "true");
}
}
}
Expand Down
Expand Up @@ -66,7 +66,7 @@ public boolean applyDetermination(ScriptPath path, ObjectTag determinationObj) {
}
else if (lower.startsWith("shot_sounds:")) {
String newReloadSounds = determination.substring("shot_sounds:".length());
if (CoreUtilities.toLowerCase(newReloadSounds).equals("none")) {
if (CoreUtilities.equalsIgnoreCase(newReloadSounds, "none")) {
newReloadSounds = "";
}
event.setSounds(newReloadSounds);
Expand Down
Expand Up @@ -80,7 +80,7 @@ else if (lower.startsWith("reload_time:")) {
}
else if (lower.startsWith("reload_sounds:")) {
String newReloadSounds = determination.substring("reload_sounds:".length());
if (CoreUtilities.toLowerCase(newReloadSounds).equals("none")) {
if (CoreUtilities.equalsIgnoreCase(newReloadSounds, "none")) {
newReloadSounds = "";
}
event.setSounds(newReloadSounds);
Expand Down
Expand Up @@ -48,7 +48,7 @@ public boolean couldMatch(ScriptPath path) {
public boolean matches(ScriptPath path) {
String arenaname = path.eventArgLowerAt(1);
MobArenaArenaTag a = MobArenaArenaTag.valueOf(arenaname);
if (!arenaname.equals("arena") && (a == null || !CoreUtilities.toLowerCase(a.getArena().arenaName()).equals(arenaname))) {
if (!arenaname.equals("arena") && (a == null || !CoreUtilities.equalsIgnoreCase(a.getArena().arenaName(), arenaname))) {
return false;
}
return super.matches(path);
Expand Down
Expand Up @@ -47,7 +47,7 @@ public boolean couldMatch(ScriptPath path) {
public boolean matches(ScriptPath path) {
String arenaname = path.eventArgLowerAt(1);
MobArenaArenaTag a = MobArenaArenaTag.valueOf(arenaname);
if (!arenaname.equals("arena") && (a == null || !CoreUtilities.toLowerCase(a.getArena().arenaName()).equals(arenaname))) {
if (!arenaname.equals("arena") && (a == null || !CoreUtilities.equalsIgnoreCase(a.getArena().arenaName(), arenaname))) {
return false;
}
return super.matches(path);
Expand Down
Expand Up @@ -320,7 +320,7 @@ public void adjust(Mechanism mechanism) {
PlayerTag player = mechanism.valueAsType(PlayerTag.class);
dataStore.changeClaimOwner(claim, player.getOfflinePlayer().getUniqueId());
}
else if (CoreUtilities.toLowerCase(mechanism.getValue().asString()).equals("admin")) {
else if (CoreUtilities.equalsIgnoreCase(mechanism.getValue().asString(), "admin")) {
dataStore.changeClaimOwner(claim, null);
}
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ public static LibsDisguiseTag valueOf(String string, TagContext context) {
}

public static boolean matches(String arg) {
return arg.startsWith("disguise@");
return arg.startsWith("libsdisguise@");
}

/////////////////////
Expand Down
Expand Up @@ -107,7 +107,7 @@ public ClaimedResidence getResidence() {
}

public boolean equals(ResidenceTag residence) {
return CoreUtilities.toLowerCase(residence.getResidence().getName()).equals(CoreUtilities.toLowerCase(this.getResidence().getName()));
return CoreUtilities.equalsIgnoreCase(residence.getResidence().getName(), this.getResidence().getName());
}

@Override
Expand Down
Expand Up @@ -136,7 +136,7 @@ public Town getTown() {
}

public boolean equals(TownTag town) {
return CoreUtilities.toLowerCase(town.getTown().getName()).equals(CoreUtilities.toLowerCase(this.getTown().getName()));
return CoreUtilities.equalsIgnoreCase(town.getTown().getName(), this.getTown().getName());
}

@Override
Expand Down

0 comments on commit 3915c5d

Please sign in to comment.