Revert adding dlist

This commit is contained in:
Kyzderp 2016-09-10 05:12:34 -07:00
parent bad4f555cf
commit 8887ffcdfa
3 changed files with 0 additions and 76 deletions

View File

@ -53,10 +53,6 @@ commands:
aliases: [dviewself, dvs, disguisevs, disvs, vsd, viewselfdisguise, viewselfd]
permission: libsdisguises.seecmd.viewself
description: Toggle seeing your own disguise on or off.
disguiselist:
aliases: [dlist]
permission: libsdisguises.seecmd.disguiselist
description: See a list of who is disguised as what.
permissions:
libsdisguises.reload:
@ -81,7 +77,6 @@ permissions:
libsdisguises.seecmd.undisguiseradius: true
libsdisguises.seecmd.disguiseclone: true
libsdisguises.seecmd.disguiseviewself: true
libsdisguises.seecmd.disguiselist: true
libsdisguises.seecmd.libsdisguises:
description: See the /libsdisguises command in tab-completion
libsdisguises.seecmd.disguiseviewself:
@ -106,5 +101,3 @@ permissions:
description: See the /undisguiseradius command in tab-completion
libsdisguises.seecmd.disguiseclone:
description: See the /disguiseclone command in tab-completion
libsdisguises.seecmd.disguiselist:
description: See the /disguiselist command in tab-completion

View File

@ -112,7 +112,6 @@ public class LibsDisguises extends JavaPlugin
getCommand("disguiseclone").setExecutor(new CloneDisguiseCommand());
getCommand("libsdisguises").setExecutor(new LibsDisguisesCommand());
getCommand("disguiseviewself").setExecutor(new DisguiseViewSelf());
getCommand("disguiselist").setExecutor(new DisguiseListCommand());
registerValues();

View File

@ -1,68 +0,0 @@
package me.libraryaddict.disguise.commands;
import java.util.UUID;
import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
import me.libraryaddict.disguise.disguisetypes.TargetedDisguise;
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class DisguiseListCommand implements CommandExecutor
{
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
{
if (sender.hasPermission("libsdisguises.seecmd.disguiselist"))
{
String players = "";
int numPlayers = 0;
int numOther = 0;
// Go through all disguises
for (UUID uuid: DisguiseUtilities.getDisguises().keySet())
{
Player player = Bukkit.getPlayer(uuid);
TargetedDisguise disguise = DisguiseUtilities.getMainDisguise(uuid);
if (player == null || !player.isOnline())
{
// Assume this is a non-player entity
numOther++;
}
else
{
// This is a player
numPlayers++;
players += " " + ChatColor.AQUA + player.getName() + ChatColor.GRAY + "("
+ disguise.getType().toReadable();
// Special treatment if the disguise is a player
if (disguise.getType() == DisguiseType.PLAYER && disguise instanceof PlayerDisguise)
players += ":" + ((PlayerDisguise)disguise).getName();
players += ")";
}
}
// Formatting
players = "" + ChatColor.AQUA + numPlayers + ChatColor.DARK_AQUA
+ " disguised players:" + players;
String entities = ChatColor.DARK_AQUA + "Also " + ChatColor.AQUA
+ numOther + ChatColor.DARK_AQUA + " other diguised entities.";
sender.sendMessage(new String[] {players, entities});
}
else
{
sender.sendMessage(ChatColor.RED + "You are forbidden to use this command.");
}
return true;
}
}