mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
formatting & rename stuff
This commit is contained in:
parent
f8ce64d6c3
commit
c356ecd168
@ -15,17 +15,19 @@ public class Command_manuallyverify extends FreedomCommand
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
boolean enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean());
|
||||
boolean verificationEnabled = ConfigEntry.DISCORD_VERIFICATION.getBoolean();
|
||||
if (!plugin.dc.enabled)
|
||||
{
|
||||
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
if (!enableBot)
|
||||
|
||||
if (!verificationEnabled)
|
||||
{
|
||||
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length == 0)
|
||||
{
|
||||
return false;
|
||||
@ -56,7 +58,6 @@ public class Command_manuallyverify extends FreedomCommand
|
||||
|
||||
plugin.pl.verify(player, null);
|
||||
plugin.rm.updateDisplay(player);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -21,11 +21,11 @@ public class Command_playerverification extends FreedomCommand
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
PlayerData target = plugin.pl.getData(playerSender);
|
||||
boolean enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean());
|
||||
boolean verificationEnabled = ConfigEntry.DISCORD_VERIFICATION.getBoolean();
|
||||
List<String> ips = new ArrayList<>();
|
||||
ips.addAll(target.getIps());
|
||||
|
||||
if(enableBot)
|
||||
if (verificationEnabled)
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
@ -87,6 +87,7 @@ public class Command_playerverification extends FreedomCommand
|
||||
msg("Please link a discord account with /linkdiscord.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
|
||||
data.setVerification(true);
|
||||
plugin.pl.save(data);
|
||||
msg("Re-enabled Discord verification.", ChatColor.GREEN);
|
||||
@ -100,6 +101,7 @@ public class Command_playerverification extends FreedomCommand
|
||||
msg("Discord verification is already disabled for you.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
|
||||
data.setVerification(false);
|
||||
plugin.pl.save(data);
|
||||
msg("Disabled Discord verification.", ChatColor.GREEN);
|
||||
@ -137,7 +139,7 @@ public class Command_playerverification extends FreedomCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
msg("Failed to generate backup codes, please contact a developer (preferably Seth)", ChatColor.RED);
|
||||
msg("Failed to generate backup codes, please contact a developer.", ChatColor.RED);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -147,7 +149,7 @@ public class Command_playerverification extends FreedomCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -162,4 +164,4 @@ public class Command_playerverification extends FreedomCommand
|
||||
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
@ -18,17 +18,19 @@ public class Command_verify extends FreedomCommand
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
boolean enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean());
|
||||
boolean verificationEnabled = ConfigEntry.DISCORD_VERIFICATION.getBoolean();
|
||||
if (!plugin.dc.enabled)
|
||||
{
|
||||
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
if (!enableBot)
|
||||
|
||||
if (!verificationEnabled)
|
||||
{
|
||||
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||
msg("The Discord verification system is currently disabled.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (senderIsConsole)
|
||||
{
|
||||
msg("/manuallyverify <playername>", ChatColor.WHITE);
|
||||
@ -42,7 +44,6 @@ public class Command_verify extends FreedomCommand
|
||||
}
|
||||
|
||||
PlayerData playerData = plugin.pl.getData(playerSender);
|
||||
|
||||
String discordId = playerData.getDiscordID();
|
||||
|
||||
if (playerData.getDiscordID() == null)
|
||||
@ -96,4 +97,4 @@ public class Command_verify extends FreedomCommand
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -59,12 +59,11 @@ public class Discord extends FreedomService
|
||||
|
||||
public static JDA bot = null;
|
||||
public Boolean enabled = false;
|
||||
public Boolean enableBot = false;
|
||||
|
||||
public void startBot()
|
||||
{
|
||||
enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean());
|
||||
if (!enableBot)
|
||||
boolean verificationEnabled = ConfigEntry.DISCORD_VERIFICATION.getBoolean();
|
||||
if (!verificationEnabled)
|
||||
{
|
||||
FLog.info("Discord Verification has been manually disabled.");
|
||||
return;
|
||||
|
@ -53,7 +53,7 @@ server:
|
||||
|
||||
# Discord
|
||||
discord:
|
||||
# Do you want to enable the bot? (Disabled by default)
|
||||
# Do you want to enable the Discord verification system? (Disabled by default)
|
||||
verification: false
|
||||
# If you do not have a token, make a bot account and get one at https://discordapp.com/developers/applications/me
|
||||
token: ''
|
||||
|
Loading…
Reference in New Issue
Block a user