From db9ad0bcd3f31ee7ad29dcba99469872c5143dbe Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 1 Dec 2020 20:03:14 -0500 Subject: Fix warnings Eclipse didn't tell me about Also rename TheMod.java to DankersSkyblockMod.java --- src/main/java/me/Danker/commands/DisplayCommand.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/main/java/me/Danker/commands/DisplayCommand.java') diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 1cd8c80..386432a 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -1,8 +1,6 @@ package me.Danker.commands; -import java.util.List; - -import me.Danker.TheMod; +import me.Danker.DankersSkyblockMod; import me.Danker.handlers.ConfigHandler; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; @@ -11,6 +9,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; +import java.util.List; + public class DisplayCommand extends CommandBase { public static String display; public static boolean auto; @@ -38,7 +38,7 @@ public class DisplayCommand extends CommandBase { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6", "f7", "floor7"); - } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { + } else if (args.length > 1) { return getListOfStringsMatchingLastWord(args, "session"); } return null; @@ -49,7 +49,7 @@ public class DisplayCommand extends CommandBase { final EntityPlayer player = (EntityPlayer) arg0; if (arg1.length == 0) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } @@ -126,7 +126,7 @@ public class DisplayCommand extends CommandBase { break; case "catacombs": if (arg1.length == 1) { - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs ")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /display catacombs ")); return; } @@ -188,25 +188,25 @@ public class DisplayCommand extends CommandBase { } break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: /display catacombs ")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: /display catacombs ")); return; } break; case "auto": auto = true; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display set to " + TheMod.SECONDARY_COLOUR + "auto" + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + "auto" + DankersSkyblockMod.MAIN_COLOUR + ".")); ConfigHandler.writeBooleanConfig("misc", "autoDisplay", true); return; case "off": display = "off"; break; default: - player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); return; } auto = false; - player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Display set to " + TheMod.SECONDARY_COLOUR + display + TheMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + display + DankersSkyblockMod.MAIN_COLOUR + ".")); ConfigHandler.writeBooleanConfig("misc", "autoDisplay", false); ConfigHandler.writeStringConfig("misc", "display", display); } -- cgit From 8c16ffbba58226ded7bf84449caca98ecf48147c Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Wed, 2 Dec 2020 17:54:33 -0500 Subject: Fix /display spider setting as zombie --- src/main/java/me/Danker/commands/DisplayCommand.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/me/Danker/commands/DisplayCommand.java') diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 386432a..d20491b 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -71,6 +71,7 @@ public class DisplayCommand extends CommandBase { } else { display = "spider"; } + break; case "zombie": if (showSession) { display = "zombie_session"; -- cgit