mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Update Command_verify.java
discord verification config
This commit is contained in:
parent
79c8ea301d
commit
950c975e8f
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
@ -10,19 +11,25 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.IMPOSTOR, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.IMPOSTOR, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Sends a verification code to the player, or the player can input the sent code. Admins can manually verify a player impostor.", usage = "/<command> <code | <playername>>")
|
@CommandParameters(description = "Sends a verification code to the player, or the player can input the sent code. Staff can manually verify a player impostor.", usage = "/<command> <code | <playername>>")
|
||||||
public class Command_verify extends FreedomCommand
|
public class Command_verify extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
boolean enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean());
|
||||||
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);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!enableBot)
|
||||||
|
{
|
||||||
|
msg("The Discord verification system is currently disabled", ChatColor.RED);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (senderIsConsole)
|
if (senderIsConsole)
|
||||||
{
|
{
|
||||||
msg("/manuallyverify <playername>", ChatColor.WHITE);
|
msg("/manuallyverify <playername>", ChatColor.WHITE);
|
||||||
|
Loading…
Reference in New Issue
Block a user