diff --git a/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java b/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java index 6b5ac3368..bde7592a3 100644 --- a/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/mc/MctopCommand.java @@ -107,7 +107,7 @@ public class MctopCommand implements CommandExecutor { private void flatfileDisplay(int page, String skill, CommandSender sender) { String[] info = Leaderboard.retrieveInfo(skill, page); - if (skill == "ALL") { + if (skill.equals("ALL")) { sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); } else { @@ -136,7 +136,7 @@ public class MctopCommand implements CommandExecutor { String tablePrefix = Config.getInstance().getMySQLTablePrefix(); HashMap> userslist = mcMMO.database.read("SELECT " + query + ", user_id FROM " + tablePrefix + "skills WHERE " + query + " > 0 ORDER BY " + query + " DESC "); - if (query == "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing") { + if (query.equals("taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing")) { sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); } else { diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java index b1ca32ef2..9f3c7e958 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java @@ -73,7 +73,7 @@ public class CustomBlocksConfig extends ConfigLoader { continue; } - if (skillType == "Ability_Blocks") { + if (skillType.equals("Ability_Blocks")) { blockItem = new ItemStack(id, 1, (short) 0, data); blockList.add(blockItem); continue; @@ -94,10 +94,10 @@ public class CustomBlocksConfig extends ConfigLoader { block = new CustomBlock(minimumDropAmount, maxiumDropAmount, itemDrop, tier, xp, data, id); blockItem = new ItemStack(id, 1, (short) 0, data); - if (skillType == "Mining" && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) { + if (skillType.equals("Mining") && config.getBoolean(skillType + "." + blockName + ".Is_Ore")) { customOres.add(blockItem); } - else if (skillType == "Woodcutting") { + else if (skillType.equals("Woodcutting")) { if (config.getBoolean(skillType + "." + blockName + ".Is_Log")) { customLogs.add(blockItem); }