geforkt von Mirrors/Paper
Remove unnecessary Overrides in Default commands.
By: EvilSeph <evilseph@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
bf632e042c
Commit
9267baab20
@ -39,11 +39,6 @@ public class BanCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("ban");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -54,11 +54,6 @@ public class BanIpCommand extends VanillaCommand {
|
|||||||
Command.broadcastCommandMessage(sender, "Banned IP Address " + ip);
|
Command.broadcastCommandMessage(sender, "Banned IP Address " + ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("ban-ip");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -56,9 +56,4 @@ public class BanListCommand extends VanillaCommand {
|
|||||||
}
|
}
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("banlist");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -69,11 +69,6 @@ public class ClearCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("clear");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -22,11 +22,6 @@ public class DefaultGameModeCommand extends VanillaCommand {
|
|||||||
this.setPermission("bukkit.command.defaultgamemode");
|
this.setPermission("bukkit.command.defaultgamemode");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase(this.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
if (!testPermission(sender)) return true;
|
if (!testPermission(sender)) return true;
|
||||||
|
@ -41,11 +41,6 @@ public class DeopCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("deop");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -66,11 +66,6 @@ public class DifficultyCommand extends VanillaCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("difficulty");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -75,11 +75,6 @@ public class ExpCommand extends VanillaCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("xp");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -82,11 +82,6 @@ public class GameModeCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("gamemode");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -66,11 +66,6 @@ public class GameRuleCommand extends VanillaCommand {
|
|||||||
return Bukkit.getWorlds().get(0);
|
return Bukkit.getWorlds().get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("gamerule");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -74,11 +74,6 @@ public class GiveCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("give");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -45,11 +45,6 @@ public class KickCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("kick");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -39,11 +39,6 @@ public class KillCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("kill");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -42,11 +42,6 @@ public class ListCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("list");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -32,9 +32,4 @@ public class MeCommand extends VanillaCommand {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("me");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -38,11 +38,6 @@ public class OpCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("op");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -34,11 +34,6 @@ public class PardonCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("pardon");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -38,11 +38,6 @@ public class PardonIpCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("pardon-ip");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -35,11 +35,6 @@ public class SaveCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("save-all");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -30,11 +30,6 @@ public class SaveOffCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("save-off");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -30,11 +30,6 @@ public class SaveOnCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("save-on");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -44,11 +44,6 @@ public class SayCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("say");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -66,11 +66,6 @@ public class SpawnpointCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("spawnpoint");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -27,11 +27,6 @@ public class StopCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("stop");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -110,11 +110,6 @@ public class TeleportCommand extends VanillaCommand {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("tp");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -72,11 +72,6 @@ public class TimeCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("time");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -45,11 +45,6 @@ public class ToggleDownfallCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("toggledownfall");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -58,11 +58,6 @@ public class WeatherCommand extends VanillaCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("weather");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
@ -93,11 +93,6 @@ public class WhitelistCommand extends VanillaCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean matches(String input) {
|
|
||||||
return input.equalsIgnoreCase("whitelist");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
|
||||||
Validate.notNull(sender, "Sender cannot be null");
|
Validate.notNull(sender, "Sender cannot be null");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren