From f9b31855d92b144f90bc8a566b2c291524c007fa Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Sun, 9 Aug 2020 19:47:37 -0400 Subject: Fix some toggles not being saved to config --- src/main/java/me/Danker/TheMod.java | 2 +- src/main/java/me/Danker/commands/ToggleCommand.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index b99ac42..65f5ee2 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -62,7 +62,7 @@ import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; public class TheMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.6.1"; + public static final String VERSION = "1.6.2"; static double checkItemsNow = 0; static double itemsChecked = 0; diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index decf99a..8550a8c 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -66,9 +66,11 @@ public class ToggleCommand extends CommandBase implements ICommand { player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Golden T6 enchants has been set to " + EnumChatFormatting.DARK_GREEN + goldenToggled + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("slayercount")) { slayerCountTotal = !slayerCountTotal; + cf.writeBooleanConfig("toggles", "SlayerCount", slayerCountTotal); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Counting total 20% slayer drops has been set to " + EnumChatFormatting.DARK_GREEN + slayerCountTotal + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("rngesusalerts")) { rngesusAlerts = !rngesusAlerts; + cf.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Slayer RNGesus alerts has been set to " + EnumChatFormatting.DARK_GREEN + rngesusAlerts + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("list")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" + -- cgit