From 69efba711ae5477f0fb609ea0ed3adb2047b9d3a Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sat, 4 Aug 2018 02:54:23 -0700 Subject: [PATCH] Unlinkdiscord saves changes (#116) * Unlinkdiscord saves changes * Unlinkdiscord saves changes --- .../totalfreedommod/command/Command_unlinkdiscord.java | 2 ++ .../playerverification/PlayerVerification.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_unlinkdiscord.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_unlinkdiscord.java index 5fb6749b..90ed7d5f 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_unlinkdiscord.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_unlinkdiscord.java @@ -31,6 +31,7 @@ public class Command_unlinkdiscord extends FreedomCommand return true; } admin.setDiscordID(null); + plugin.al.save(); msg("Your Minecraft account has been successfully unlinked from the Discord account.", ChatColor.GREEN); return true; } @@ -44,6 +45,7 @@ public class Command_unlinkdiscord extends FreedomCommand } data.setDiscordId(null); data.setEnabled(false); + plugin.pv.saveVerificationData(data); msg("Your Minecraft account has been successfully unlinked from the Discord account.", ChatColor.GREEN); return true; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/playerverification/PlayerVerification.java b/src/main/java/me/totalfreedom/totalfreedommod/playerverification/PlayerVerification.java index 601e9b27..f18cb588 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/playerverification/PlayerVerification.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/playerverification/PlayerVerification.java @@ -76,6 +76,7 @@ public class PlayerVerification extends FreedomService public void removeEntry(String name) { + name = name.toLowerCase(); // Configuration files are saved in lowercase if (getVerificationPlayer(name) != null) { getConfigFile(name).delete(); @@ -109,7 +110,7 @@ public class PlayerVerification extends FreedomService // Create new data if nonexistent if (vPlayer == null) { - FLog.info("Creating new player verification entry for " + player.getName()); + FLog.info("Creating new player verification entry for: " + player.getName()); // Create new player vPlayer = new VPlayer(player); @@ -189,7 +190,7 @@ public class PlayerVerification extends FreedomService } catch (IOException e) { - FLog.warning("Failed to convert Player Verification entry for " + player.getName()); + FLog.warning("Failed to convert Player Verification entry for: " + player.getName()); } }