mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-16 12:26:12 +00:00
Unlinkdiscord saves changes (#116)
* Unlinkdiscord saves changes * Unlinkdiscord saves changes
This commit is contained in:
parent
73cea831af
commit
69efba711a
@ -31,6 +31,7 @@ public class Command_unlinkdiscord extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
admin.setDiscordID(null);
|
admin.setDiscordID(null);
|
||||||
|
plugin.al.save();
|
||||||
msg("Your Minecraft account has been successfully unlinked from the Discord account.", ChatColor.GREEN);
|
msg("Your Minecraft account has been successfully unlinked from the Discord account.", ChatColor.GREEN);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -44,6 +45,7 @@ public class Command_unlinkdiscord extends FreedomCommand
|
|||||||
}
|
}
|
||||||
data.setDiscordId(null);
|
data.setDiscordId(null);
|
||||||
data.setEnabled(false);
|
data.setEnabled(false);
|
||||||
|
plugin.pv.saveVerificationData(data);
|
||||||
msg("Your Minecraft account has been successfully unlinked from the Discord account.", ChatColor.GREEN);
|
msg("Your Minecraft account has been successfully unlinked from the Discord account.", ChatColor.GREEN);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ public class PlayerVerification extends FreedomService
|
|||||||
|
|
||||||
public void removeEntry(String name)
|
public void removeEntry(String name)
|
||||||
{
|
{
|
||||||
|
name = name.toLowerCase(); // Configuration files are saved in lowercase
|
||||||
if (getVerificationPlayer(name) != null)
|
if (getVerificationPlayer(name) != null)
|
||||||
{
|
{
|
||||||
getConfigFile(name).delete();
|
getConfigFile(name).delete();
|
||||||
@ -109,7 +110,7 @@ public class PlayerVerification extends FreedomService
|
|||||||
// Create new data if nonexistent
|
// Create new data if nonexistent
|
||||||
if (vPlayer == null)
|
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
|
// Create new player
|
||||||
vPlayer = new VPlayer(player);
|
vPlayer = new VPlayer(player);
|
||||||
@ -189,7 +190,7 @@ public class PlayerVerification extends FreedomService
|
|||||||
}
|
}
|
||||||
catch (IOException e)
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user