mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-05 21:56:42 +00:00
yay done
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.libsdisguise.DisallowedDisguises;
|
||||
import me.totalfreedom.disguise.DisguiseBlocker;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.Command;
|
||||
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Undisguise all players on the server", usage = "/<command>", aliases = "uall")
|
||||
@CommandParameters(description = "Undisguise all players on the server", usage = "/<command> [-a]", aliases = "uall")
|
||||
public class Command_undisguiseall extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -21,15 +21,22 @@ public class Command_undisguiseall extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (DisallowedDisguises.disabled)
|
||||
if (!DisguiseBlocker.enabled)
|
||||
{
|
||||
msg("Disguises are not enabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Undisguising all non-admins", true);
|
||||
boolean admins = false;
|
||||
|
||||
plugin.ldb.undisguiseAll(false);
|
||||
if (args.length > 0 && args[0].equalsIgnoreCase("-a"))
|
||||
{
|
||||
admins = true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Undisguising all " + (admins ? "players" : "non-admins"), true);
|
||||
|
||||
plugin.ldb.undisguiseAll(admins);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user