mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Update Command_manuallyverify.java
discord verify enable disable
This commit is contained in:
parent
fb3cdf3603
commit
b0c0f17043
@ -1,5 +1,6 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -8,18 +9,23 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manually verify someone", usage = "/<command> <playername>", aliases = "mv")
|
@CommandParameters(description = "Manually verify someone", usage = "/<command> <playername>", aliases="mv")
|
||||||
public class Command_manuallyverify extends FreedomCommand
|
public class Command_manuallyverify 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 (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
@ -39,7 +45,7 @@ public class Command_manuallyverify extends FreedomCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Manually verifying player " + player.getName(), false);
|
FUtil.staffAction(sender.getName(), "Manually verifying player " + player.getName(), false);
|
||||||
player.setOp(true);
|
player.setOp(true);
|
||||||
player.sendMessage(YOU_ARE_OP);
|
player.sendMessage(YOU_ARE_OP);
|
||||||
|
|
||||||
@ -54,4 +60,4 @@ public class Command_manuallyverify extends FreedomCommand
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user