Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
Fixed an issue where /peacefulrng status would print twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unease committed May 20, 2022
1 parent 3dfa174 commit 0ea9ea6
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/main/java/com/uneasepurse37/peacefulrng/commands/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0ea9ea6

Please sign in to comment.