From 0ea9ea65a50dd900f7ec19dc4310f41e6b1dc8c6 Mon Sep 17 00:00:00 2001 From: UneasePurse37 <67396532+Unease@users.noreply.github.com> Date: Fri, 20 May 2022 10:08:44 -0700 Subject: [PATCH] Fixed an issue where /peacefulrng status would print twice. --- .../peacefulrng/commands/Commands.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/uneasepurse37/peacefulrng/commands/Commands.java b/src/main/java/com/uneasepurse37/peacefulrng/commands/Commands.java index 607d13e..e31e48c 100644 --- a/src/main/java/com/uneasepurse37/peacefulrng/commands/Commands.java +++ b/src/main/java/com/uneasepurse37/peacefulrng/commands/Commands.java @@ -44,28 +44,28 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args PeacefulRNG.toggledflesh = !PeacefulRNG.toggledflesh; } else if (args[0].equalsIgnoreCase("poisonouspotato")) { PeacefulRNG.toggledpotato = !PeacefulRNG.toggledpotato; - } else if (args[0].equalsIgnoreCase("status")) { - if (PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Everything is toggled" + TextFormatting.RED + " on!")); //Displays a red message in chat when the mod is toggled on! - } else if (!PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Everything is toggled" + TextFormatting.AQUA + " off!")); //Displays a blue message in chat when the mod is toggled off! - } - - if (PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only poisonous potatoes are" + TextFormatting.GREEN+ " off!")); - } else if (PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only rotten flesh is" + TextFormatting.YELLOW+ " off!")); - } else if (!PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only raw chicken is"+ TextFormatting.LIGHT_PURPLE + " off!")); - } - - if (!PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only potatoes are"+ TextFormatting.DARK_GREEN + " on!")); - } else if (!PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only rotten flesh is"+ TextFormatting.GOLD + " on!")); - } else if (PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { - sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only raw chicken is"+ TextFormatting.DARK_PURPLE + " on!")); - } +// } else if (args[0].equalsIgnoreCase("status")) { +// if (PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Everything is toggled" + TextFormatting.RED + " on!")); //Displays a red message in chat when the mod is toggled on! +// } else if (!PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Everything is toggled" + TextFormatting.AQUA + " off!")); //Displays a blue message in chat when the mod is toggled off! +// } +// +// if (PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only poisonous potatoes are" + TextFormatting.GREEN+ " off!")); +// } else if (PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only rotten flesh is" + TextFormatting.YELLOW+ " off!")); +// } else if (!PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only raw chicken is"+ TextFormatting.LIGHT_PURPLE + " off!")); +// } +// +// if (!PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only potatoes are"+ TextFormatting.DARK_GREEN + " on!")); +// } else if (!PeacefulRNG.toggledchicken && PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only rotten flesh is"+ TextFormatting.GOLD + " on!")); +// } else if (PeacefulRNG.toggledchicken && !PeacefulRNG.toggledflesh && !PeacefulRNG.toggledpotato) { +// sender.sendMessage(new TextComponentString(TextFormatting.GRAY + "Only raw chicken is"+ TextFormatting.DARK_PURPLE + " on!")); +// } } } else if (args.length == 0) {