mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Using .equals() is better
This commit is contained in:
parent
d6d1e0ffed
commit
62b90ad552
@ -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<Integer, ArrayList<String>> 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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user