geforkt von Mirrors/Paper
Don't try listing something that may not exist. Fixes BUKKIT-3471
The player name may not be provided, in which case the command will fail hard. By: feildmaster <admin@feildmaster.com>
Dieser Commit ist enthalten in:
Ursprung
8065c9095a
Commit
8dc70a4e98
@ -62,6 +62,8 @@ public class ClearCommand extends VanillaCommand {
|
|||||||
int count = player.getInventory().clear(id, data);
|
int count = player.getInventory().clear(id, data);
|
||||||
|
|
||||||
Command.broadcastCommandMessage(sender, "Cleared the inventory of " + player.getDisplayName() + ", removing " + count + " items");
|
Command.broadcastCommandMessage(sender, "Cleared the inventory of " + player.getDisplayName() + ", removing " + count + " items");
|
||||||
|
} else if (args.length == 0) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "Please provide a player!");
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(ChatColor.RED + "Can't find player " + args[0]);
|
sender.sendMessage(ChatColor.RED + "Can't find player " + args[0]);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren