2016-07-21 21:53:25 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
|
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
|
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2020-09-28 02:51:15 +00:00
|
|
|
@CommandPermissions(level = Rank.NEW_ADMIN, source = SourceType.BOTH)
|
2020-03-30 23:43:57 +00:00
|
|
|
@CommandParameters(description = "Undisguise all online players on the server", usage = "/<command> [-a]", aliases = "uall")
|
2016-07-21 21:53:25 +00:00
|
|
|
public class Command_undisguiseall extends FreedomCommand
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
2017-11-16 22:32:09 +00:00
|
|
|
{
|
2018-07-28 07:11:48 +00:00
|
|
|
if (!plugin.ldb.isEnabled())
|
2016-07-21 21:53:25 +00:00
|
|
|
{
|
|
|
|
msg("LibsDisguises is not enabled.");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2018-12-29 19:41:48 +00:00
|
|
|
boolean admins = false;
|
2016-07-21 21:53:25 +00:00
|
|
|
|
2018-12-29 19:41:48 +00:00
|
|
|
if (args.length > 0 && args[0].equalsIgnoreCase("-a"))
|
|
|
|
{
|
|
|
|
admins = true;
|
|
|
|
}
|
|
|
|
|
2020-08-15 22:42:46 +00:00
|
|
|
FUtil.staffAction(sender.getName(), "Undisguising all " + (admins ? "players" : "non-staff"), true);
|
2018-12-29 19:41:48 +00:00
|
|
|
|
|
|
|
plugin.ldb.undisguiseAll(admins);
|
2016-07-21 21:53:25 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|