13
0
geforkt von Mirrors/Paper

SPIGOT-76: Remove almost all Bukkit commands

By: Thinkofdeath <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2014-12-09 14:00:09 +00:00
Ursprung cc19c84cb0
Commit 911d5e8c7c
42 geänderte Dateien mit 41 neuen und 40 gelöschten Zeilen

Datei anzeigen

@ -28,10 +28,6 @@ public class SimpleCommandMap implements CommandMap {
} }
private void setDefaultCommands() { private void setDefaultCommands() {
register("bukkit", new SaveCommand());
register("bukkit", new SaveOnCommand());
register("bukkit", new SaveOffCommand());
register("bukkit", new StopCommand());
register("bukkit", new VersionCommand("version")); register("bukkit", new VersionCommand("version"));
register("bukkit", new ReloadCommand("reload")); register("bukkit", new ReloadCommand("reload"));
register("bukkit", new PluginsCommand("plugins")); register("bukkit", new PluginsCommand("plugins"));
@ -39,43 +35,7 @@ public class SimpleCommandMap implements CommandMap {
} }
public void setFallbackCommands() { public void setFallbackCommands() {
register("bukkit", new ListCommand());
register("bukkit", new OpCommand());
register("bukkit", new DeopCommand());
register("bukkit", new BanIpCommand());
register("bukkit", new PardonIpCommand());
register("bukkit", new BanCommand());
register("bukkit", new PardonCommand());
register("bukkit", new KickCommand());
register("bukkit", new TeleportCommand());
register("bukkit", new GiveCommand());
register("bukkit", new TimeCommand());
register("bukkit", new SayCommand());
register("bukkit", new WhitelistCommand());
register("bukkit", new TellCommand());
register("bukkit", new MeCommand());
register("bukkit", new KillCommand());
register("bukkit", new GameModeCommand());
register("bukkit", new HelpCommand()); register("bukkit", new HelpCommand());
register("bukkit", new ExpCommand());
register("bukkit", new ToggleDownfallCommand());
register("bukkit", new BanListCommand());
register("bukkit", new DefaultGameModeCommand());
register("bukkit", new SeedCommand());
register("bukkit", new DifficultyCommand());
register("bukkit", new WeatherCommand());
register("bukkit", new SpawnpointCommand());
register("bukkit", new ClearCommand());
register("bukkit", new GameRuleCommand());
register("bukkit", new EnchantCommand());
register("bukkit", new TestForCommand());
register("bukkit", new EffectCommand());
register("bukkit", new ScoreboardCommand());
register("bukkit", new PlaySoundCommand());
register("bukkit", new SpreadPlayersCommand());
register("bukkit", new SetWorldSpawnCommand());
register("bukkit", new SetIdleTimeoutCommand());
register("bukkit", new AchievementCommand());
} }
/** /**

Datei anzeigen

@ -20,6 +20,7 @@ import org.bukkit.event.player.PlayerStatisticIncrementEvent;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class AchievementCommand extends VanillaCommand { public class AchievementCommand extends VanillaCommand {
public AchievementCommand() { public AchievementCommand() {
super("achievement"); super("achievement");

Datei anzeigen

@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class BanCommand extends VanillaCommand { public class BanCommand extends VanillaCommand {
public BanCommand() { public BanCommand() {
super("ban"); super("ban");

Datei anzeigen

@ -14,6 +14,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class BanIpCommand extends VanillaCommand { public class BanIpCommand extends VanillaCommand {
public static final Pattern ipValidity = Pattern.compile("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"); public static final Pattern ipValidity = Pattern.compile("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$");

Datei anzeigen

@ -15,6 +15,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class BanListCommand extends VanillaCommand { public class BanListCommand extends VanillaCommand {
private static final List<String> BANLIST_TYPES = ImmutableList.of("ips", "players"); private static final List<String> BANLIST_TYPES = ImmutableList.of("ips", "players");

Datei anzeigen

@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@Deprecated
public class ClearCommand extends VanillaCommand { public class ClearCommand extends VanillaCommand {
private static List<String> materials; private static List<String> materials;
static { static {

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class DefaultGameModeCommand extends VanillaCommand { public class DefaultGameModeCommand extends VanillaCommand {
private static final List<String> GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival"); private static final List<String> GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival");

Datei anzeigen

@ -14,6 +14,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class DeopCommand extends VanillaCommand { public class DeopCommand extends VanillaCommand {
public DeopCommand() { public DeopCommand() {
super("deop"); super("deop");

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.Difficulty;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@Deprecated
public class DifficultyCommand extends VanillaCommand { public class DifficultyCommand extends VanillaCommand {
private static final List<String> DIFFICULTY_NAMES = ImmutableList.of("peaceful", "easy", "normal", "hard"); private static final List<String> DIFFICULTY_NAMES = ImmutableList.of("peaceful", "easy", "normal", "hard");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.StringUtil; import org.bukkit.util.StringUtil;
@Deprecated
public class EffectCommand extends VanillaCommand { public class EffectCommand extends VanillaCommand {
private static final List<String> effects; private static final List<String> effects;

Datei anzeigen

@ -19,6 +19,7 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.util.StringUtil; import org.bukkit.util.StringUtil;
@Deprecated
public class EnchantCommand extends VanillaCommand { public class EnchantCommand extends VanillaCommand {
private static final List<String> ENCHANTMENT_NAMES = new ArrayList<String>(); private static final List<String> ENCHANTMENT_NAMES = new ArrayList<String>();

Datei anzeigen

@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class ExpCommand extends VanillaCommand { public class ExpCommand extends VanillaCommand {
public ExpCommand() { public ExpCommand() {
super("xp"); super("xp");

Datei anzeigen

@ -14,6 +14,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class GameModeCommand extends VanillaCommand { public class GameModeCommand extends VanillaCommand {
private static final List<String> GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival", "spectator"); private static final List<String> GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival", "spectator");

Datei anzeigen

@ -15,6 +15,7 @@ import org.bukkit.Bukkit;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.entity.HumanEntity; import org.bukkit.entity.HumanEntity;
@Deprecated
public class GameRuleCommand extends VanillaCommand { public class GameRuleCommand extends VanillaCommand {
private static final List<String> GAMERULE_STATES = ImmutableList.of("true", "false"); private static final List<String> GAMERULE_STATES = ImmutableList.of("true", "false");

Datei anzeigen

@ -18,6 +18,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class GiveCommand extends VanillaCommand { public class GiveCommand extends VanillaCommand {
private static List<String> materials; private static List<String> materials;
static { static {

Datei anzeigen

@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class KickCommand extends VanillaCommand { public class KickCommand extends VanillaCommand {
public KickCommand() { public KickCommand() {
super("kick"); super("kick");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class KillCommand extends VanillaCommand { public class KillCommand extends VanillaCommand {
public KillCommand() { public KillCommand() {
super("kill"); super("kill");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class ListCommand extends VanillaCommand { public class ListCommand extends VanillaCommand {
public ListCommand() { public ListCommand() {
super("list"); super("list");

Datei anzeigen

@ -4,6 +4,7 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@Deprecated
public class MeCommand extends VanillaCommand { public class MeCommand extends VanillaCommand {
public MeCommand() { public MeCommand() {
super("me"); super("me");

Datei anzeigen

@ -15,6 +15,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class OpCommand extends VanillaCommand { public class OpCommand extends VanillaCommand {
public OpCommand() { public OpCommand() {
super("op"); super("op");

Datei anzeigen

@ -14,6 +14,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class PardonCommand extends VanillaCommand { public class PardonCommand extends VanillaCommand {
public PardonCommand() { public PardonCommand() {
super("pardon"); super("pardon");

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class PardonIpCommand extends VanillaCommand { public class PardonIpCommand extends VanillaCommand {
public PardonIpCommand() { public PardonIpCommand() {
super("pardon-ip"); super("pardon-ip");

Datei anzeigen

@ -6,6 +6,7 @@ import org.bukkit.Location;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@Deprecated
public class PlaySoundCommand extends VanillaCommand { public class PlaySoundCommand extends VanillaCommand {
public PlaySoundCommand() { public PlaySoundCommand() {
super("playsound"); super("playsound");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class SaveCommand extends VanillaCommand { public class SaveCommand extends VanillaCommand {
public SaveCommand() { public SaveCommand() {
super("save-all"); super("save-all");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class SaveOffCommand extends VanillaCommand { public class SaveOffCommand extends VanillaCommand {
public SaveOffCommand() { public SaveOffCommand() {
super("save-off"); super("save-off");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class SaveOnCommand extends VanillaCommand { public class SaveOnCommand extends VanillaCommand {
public SaveOnCommand() { public SaveOnCommand() {
super("save-on"); super("save-on");

Datei anzeigen

@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class SayCommand extends VanillaCommand { public class SayCommand extends VanillaCommand {
public SayCommand() { public SayCommand() {
super("say"); super("say");

Datei anzeigen

@ -26,6 +26,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
@Deprecated
public class ScoreboardCommand extends VanillaCommand { public class ScoreboardCommand extends VanillaCommand {
private static final List<String> MAIN_CHOICES = ImmutableList.of("objectives", "players", "teams"); private static final List<String> MAIN_CHOICES = ImmutableList.of("objectives", "players", "teams");

Datei anzeigen

@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class SeedCommand extends VanillaCommand { public class SeedCommand extends VanillaCommand {
public SeedCommand() { public SeedCommand() {
super("seed"); super("seed");

Datei anzeigen

@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
import java.util.List; import java.util.List;
@Deprecated
public class SetIdleTimeoutCommand extends VanillaCommand { public class SetIdleTimeoutCommand extends VanillaCommand {
public SetIdleTimeoutCommand() { public SetIdleTimeoutCommand() {

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
import java.util.List; import java.util.List;
@Deprecated
public class SetWorldSpawnCommand extends VanillaCommand { public class SetWorldSpawnCommand extends VanillaCommand {
public SetWorldSpawnCommand() { public SetWorldSpawnCommand() {

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
import java.util.List; import java.util.List;
@Deprecated
public class SpawnpointCommand extends VanillaCommand { public class SpawnpointCommand extends VanillaCommand {
public SpawnpointCommand() { public SpawnpointCommand() {

Datei anzeigen

@ -16,6 +16,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.scoreboard.Team; import org.bukkit.scoreboard.Team;
@Deprecated
public class SpreadPlayersCommand extends VanillaCommand { public class SpreadPlayersCommand extends VanillaCommand {
private static final Random random = new Random(); private static final Random random = new Random();

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class StopCommand extends VanillaCommand { public class StopCommand extends VanillaCommand {
public StopCommand() { public StopCommand() {
super("stop"); super("stop");

Datei anzeigen

@ -13,6 +13,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class TeleportCommand extends VanillaCommand { public class TeleportCommand extends VanillaCommand {
public TeleportCommand() { public TeleportCommand() {

Datei anzeigen

@ -7,6 +7,7 @@ import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@Deprecated
public class TellCommand extends VanillaCommand { public class TellCommand extends VanillaCommand {
public TellCommand() { public TellCommand() {
super("tell"); super("tell");

Datei anzeigen

@ -4,6 +4,7 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@Deprecated
public class TestForCommand extends VanillaCommand { public class TestForCommand extends VanillaCommand {
public TestForCommand() { public TestForCommand() {
super("testfor"); super("testfor");

Datei anzeigen

@ -13,6 +13,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class TimeCommand extends VanillaCommand { public class TimeCommand extends VanillaCommand {
private static final List<String> TABCOMPLETE_ADD_SET = ImmutableList.of("add", "set"); private static final List<String> TABCOMPLETE_ADD_SET = ImmutableList.of("add", "set");
private static final List<String> TABCOMPLETE_DAY_NIGHT = ImmutableList.of("day", "night"); private static final List<String> TABCOMPLETE_DAY_NIGHT = ImmutableList.of("day", "night");

Datei anzeigen

@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class ToggleDownfallCommand extends VanillaCommand { public class ToggleDownfallCommand extends VanillaCommand {
public ToggleDownfallCommand() { public ToggleDownfallCommand() {
super("toggledownfall"); super("toggledownfall");

Datei anzeigen

@ -5,6 +5,7 @@ import java.util.List;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@Deprecated
public abstract class VanillaCommand extends Command { public abstract class VanillaCommand extends Command {
static final int MAX_COORD = 30000000; static final int MAX_COORD = 30000000;
static final int MIN_COORD_MINUS_ONE = -30000001; static final int MIN_COORD_MINUS_ONE = -30000001;

Datei anzeigen

@ -13,6 +13,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@Deprecated
public class WeatherCommand extends VanillaCommand { public class WeatherCommand extends VanillaCommand {
private static final List<String> WEATHER_TYPES = ImmutableList.of("clear", "rain", "thunder"); private static final List<String> WEATHER_TYPES = ImmutableList.of("clear", "rain", "thunder");

Datei anzeigen

@ -13,6 +13,7 @@ import org.bukkit.util.StringUtil;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@Deprecated
public class WhitelistCommand extends VanillaCommand { public class WhitelistCommand extends VanillaCommand {
private static final List<String> WHITELIST_SUBCOMMANDS = ImmutableList.of("add", "remove", "on", "off", "list", "reload"); private static final List<String> WHITELIST_SUBCOMMANDS = ImmutableList.of("add", "remove", "on", "off", "list", "reload");