mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 09:15:38 +00:00
Update Command_playerverification.java
i should really keep my files updates
This commit is contained in:
parent
b9d608222e
commit
cbc3795ef2
@ -7,7 +7,6 @@ import java.util.List;
|
|||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -68,10 +67,11 @@ public class Command_playerverification extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlayerData data = plugin.pl.getData(playerSender);
|
PlayerData data = plugin.pl.getData(playerSender);
|
||||||
|
|
||||||
switch (args[0].toLowerCase())
|
switch (args[0].toLowerCase())
|
||||||
{
|
{
|
||||||
|
|
||||||
case "enable":
|
case "enable":
|
||||||
|
{
|
||||||
if (!plugin.dc.enabled)
|
if (!plugin.dc.enabled)
|
||||||
{
|
{
|
||||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||||
@ -91,8 +91,10 @@ public class Command_playerverification extends FreedomCommand
|
|||||||
plugin.pl.save(data);
|
plugin.pl.save(data);
|
||||||
msg("Re-enabled Discord verification.", ChatColor.GREEN);
|
msg("Re-enabled Discord verification.", ChatColor.GREEN);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
case "disable":
|
case "disable":
|
||||||
|
{
|
||||||
if (!data.hasVerification())
|
if (!data.hasVerification())
|
||||||
{
|
{
|
||||||
msg("Discord verification is already disabled for you.", ChatColor.RED);
|
msg("Discord verification is already disabled for you.", ChatColor.RED);
|
||||||
@ -102,16 +104,20 @@ public class Command_playerverification extends FreedomCommand
|
|||||||
plugin.pl.save(data);
|
plugin.pl.save(data);
|
||||||
msg("Disabled Discord verification.", ChatColor.GREEN);
|
msg("Disabled Discord verification.", ChatColor.GREEN);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
case "status":
|
case "status":
|
||||||
|
{
|
||||||
boolean enabled = target.hasVerification();
|
boolean enabled = target.hasVerification();
|
||||||
boolean specified = target.getDiscordID() != null;
|
boolean specified = target.getDiscordID() != null;
|
||||||
msg(ChatColor.GRAY + "Discord Verification Enabled: " + (enabled ? ChatColor.GREEN + "true" : ChatColor.RED + "false"));
|
msg(ChatColor.GRAY + "Discord Verification Enabled: " + (enabled ? ChatColor.GREEN + "true" : ChatColor.RED + "false"));
|
||||||
msg(ChatColor.GRAY + "Discord ID: " + (specified ? ChatColor.GREEN + target.getDiscordID() : ChatColor.RED + "not set"));
|
msg(ChatColor.GRAY + "Discord ID: " + (specified ? ChatColor.GREEN + target.getDiscordID() : ChatColor.RED + "not set"));
|
||||||
msg(ChatColor.GRAY + "Backup Codes: " + data.getBackupCodes().size() + "/" + "10");
|
msg(ChatColor.GRAY + "Backup Codes: " + data.getBackupCodes().size() + "/" + "10");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
case "genbackupcodes":
|
case "genbackupcodes":
|
||||||
|
{
|
||||||
if (!plugin.dc.enabled)
|
if (!plugin.dc.enabled)
|
||||||
{
|
{
|
||||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||||
@ -134,7 +140,7 @@ public class Command_playerverification extends FreedomCommand
|
|||||||
msg("Failed to generate backup codes, please contact a developer (preferably Seth)", ChatColor.RED);
|
msg("Failed to generate backup codes, please contact a developer (preferably Seth)", ChatColor.RED);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -145,6 +151,7 @@ public class Command_playerverification extends FreedomCommand
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
|
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user