From 9267baab20413bb87066df92e5714de7489cdaa6 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 15 Nov 2012 23:03:03 -0500 Subject: [PATCH] Remove unnecessary Overrides in Default commands. By: EvilSeph --- .../main/java/org/bukkit/command/defaults/BanCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/BanIpCommand.java | 5 ----- .../java/org/bukkit/command/defaults/BanListCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/ClearCommand.java | 5 ----- .../org/bukkit/command/defaults/DefaultGameModeCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/DeopCommand.java | 5 ----- .../java/org/bukkit/command/defaults/DifficultyCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/ExpCommand.java | 5 ----- .../java/org/bukkit/command/defaults/GameModeCommand.java | 5 ----- .../java/org/bukkit/command/defaults/GameRuleCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/GiveCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/KickCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/KillCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/ListCommand.java | 5 ----- .../src/main/java/org/bukkit/command/defaults/MeCommand.java | 5 ----- .../src/main/java/org/bukkit/command/defaults/OpCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/PardonCommand.java | 5 ----- .../java/org/bukkit/command/defaults/PardonIpCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/SaveCommand.java | 5 ----- .../java/org/bukkit/command/defaults/SaveOffCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/SaveOnCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/SayCommand.java | 5 ----- .../java/org/bukkit/command/defaults/SpawnpointCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/StopCommand.java | 5 ----- .../java/org/bukkit/command/defaults/TeleportCommand.java | 5 ----- .../main/java/org/bukkit/command/defaults/TimeCommand.java | 5 ----- .../org/bukkit/command/defaults/ToggleDownfallCommand.java | 5 ----- .../java/org/bukkit/command/defaults/WeatherCommand.java | 5 ----- .../java/org/bukkit/command/defaults/WhitelistCommand.java | 5 ----- 29 files changed, 145 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java index c436652487..69b121350f 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/BanCommand.java @@ -39,11 +39,6 @@ public class BanCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("ban"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/BanIpCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/BanIpCommand.java index 8ea0c35685..0d7b299701 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/BanIpCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/BanIpCommand.java @@ -54,11 +54,6 @@ public class BanIpCommand extends VanillaCommand { Command.broadcastCommandMessage(sender, "Banned IP Address " + ip); } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("ban-ip"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/BanListCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/BanListCommand.java index 08c5be9a48..45f2ea0317 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/BanListCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/BanListCommand.java @@ -56,9 +56,4 @@ public class BanListCommand extends VanillaCommand { } return ImmutableList.of(); } - - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("banlist"); - } } diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/ClearCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/ClearCommand.java index ecbce018f2..02d1e505ba 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/ClearCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/ClearCommand.java @@ -69,11 +69,6 @@ public class ClearCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("clear"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java index 9557b09752..77ba6783a9 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java @@ -22,11 +22,6 @@ public class DefaultGameModeCommand extends VanillaCommand { this.setPermission("bukkit.command.defaultgamemode"); } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase(this.getName()); - } - @Override public boolean execute(CommandSender sender, String commandLabel, String[] args) { if (!testPermission(sender)) return true; diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/DeopCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/DeopCommand.java index 8815e1349d..1b71d493e9 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/DeopCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/DeopCommand.java @@ -41,11 +41,6 @@ public class DeopCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("deop"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java index 05b10001f5..ca985595f8 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java @@ -66,11 +66,6 @@ public class DifficultyCommand extends VanillaCommand { } } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("difficulty"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/ExpCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/ExpCommand.java index ffbfbaa322..27497600a9 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/ExpCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/ExpCommand.java @@ -75,11 +75,6 @@ public class ExpCommand extends VanillaCommand { return false; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("xp"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/GameModeCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/GameModeCommand.java index 95593d71dc..c58f90675a 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/GameModeCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/GameModeCommand.java @@ -82,11 +82,6 @@ public class GameModeCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("gamemode"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java index 774d23ba7e..e1de4afc49 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java @@ -66,11 +66,6 @@ public class GameRuleCommand extends VanillaCommand { return Bukkit.getWorlds().get(0); } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("gamerule"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/GiveCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/GiveCommand.java index 6ebc3eae5e..9eba11dc3a 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/GiveCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/GiveCommand.java @@ -74,11 +74,6 @@ public class GiveCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("give"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/KickCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/KickCommand.java index 7b890b1ae7..b6c3f79f29 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/KickCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/KickCommand.java @@ -45,11 +45,6 @@ public class KickCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("kick"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/KillCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/KillCommand.java index 90b59816b1..3270db5ff8 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/KillCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/KillCommand.java @@ -39,11 +39,6 @@ public class KillCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("kill"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/ListCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/ListCommand.java index e38ae80609..80c6135a1e 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/ListCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/ListCommand.java @@ -42,11 +42,6 @@ public class ListCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("list"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/MeCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/MeCommand.java index 4ec16baf53..ddcd9ad763 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/MeCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/MeCommand.java @@ -32,9 +32,4 @@ public class MeCommand extends VanillaCommand { return true; } - - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("me"); - } } diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/OpCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/OpCommand.java index d7874bcf84..e1f8452ae3 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/OpCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/OpCommand.java @@ -38,11 +38,6 @@ public class OpCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("op"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/PardonCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/PardonCommand.java index a737ff0913..692f0f26ae 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/PardonCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/PardonCommand.java @@ -34,11 +34,6 @@ public class PardonCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("pardon"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java index 4571eeb99f..689a0bda0f 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java @@ -38,11 +38,6 @@ public class PardonIpCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("pardon-ip"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/SaveCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/SaveCommand.java index 77839c1c7c..8a44f9cdde 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/SaveCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/SaveCommand.java @@ -35,11 +35,6 @@ public class SaveCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("save-all"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/SaveOffCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/SaveOffCommand.java index c081e5e106..1fbb3f006a 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/SaveOffCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/SaveOffCommand.java @@ -30,11 +30,6 @@ public class SaveOffCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("save-off"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/SaveOnCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/SaveOnCommand.java index d0561c36a9..9774f67321 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/SaveOnCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/SaveOnCommand.java @@ -30,11 +30,6 @@ public class SaveOnCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("save-on"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/SayCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/SayCommand.java index 651b60c0b1..427897ff25 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/SayCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/SayCommand.java @@ -44,11 +44,6 @@ public class SayCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("say"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java index c15508e9e4..d58054dd6c 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java @@ -66,11 +66,6 @@ public class SpawnpointCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("spawnpoint"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/StopCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/StopCommand.java index c6a470b646..2c12e1e629 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/StopCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/StopCommand.java @@ -27,11 +27,6 @@ public class StopCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("stop"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java index 75d072ef3c..2a18efe553 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java @@ -110,11 +110,6 @@ public class TeleportCommand extends VanillaCommand { return result; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("tp"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/TimeCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/TimeCommand.java index 011d32db2f..86083b4a00 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/TimeCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/TimeCommand.java @@ -72,11 +72,6 @@ public class TimeCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("time"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/ToggleDownfallCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/ToggleDownfallCommand.java index 08ed667f4b..ac78bfba06 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/ToggleDownfallCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/ToggleDownfallCommand.java @@ -45,11 +45,6 @@ public class ToggleDownfallCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("toggledownfall"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/WeatherCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/WeatherCommand.java index 07e93c5113..a39c1b07ef 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/WeatherCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/WeatherCommand.java @@ -58,11 +58,6 @@ public class WeatherCommand extends VanillaCommand { return true; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("weather"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) { Validate.notNull(sender, "Sender cannot be null"); diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java index 70786d11e6..04a24c5e80 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java @@ -93,11 +93,6 @@ public class WhitelistCommand extends VanillaCommand { return false; } - @Override - public boolean matches(String input) { - return input.equalsIgnoreCase("whitelist"); - } - @Override public List tabComplete(CommandSender sender, String alias, String[] args) { Validate.notNull(sender, "Sender cannot be null");