geforkt von Mirrors/Paper
SPIGOT-76: Remove almost all Bukkit commands
By: Thinkofdeath <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
Ursprung
cc19c84cb0
Commit
911d5e8c7c
@ -28,10 +28,6 @@ public class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
|
||||
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 ReloadCommand("reload"));
|
||||
register("bukkit", new PluginsCommand("plugins"));
|
||||
@ -39,43 +35,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
|
||||
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 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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,7 @@ import org.bukkit.event.player.PlayerStatisticIncrementEvent;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class AchievementCommand extends VanillaCommand {
|
||||
public AchievementCommand() {
|
||||
super("achievement");
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class BanCommand extends VanillaCommand {
|
||||
public BanCommand() {
|
||||
super("ban");
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
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])$");
|
||||
|
||||
|
@ -15,6 +15,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class BanListCommand extends VanillaCommand {
|
||||
private static final List<String> BANLIST_TYPES = ImmutableList.of("ips", "players");
|
||||
|
||||
|
@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class ClearCommand extends VanillaCommand {
|
||||
private static List<String> materials;
|
||||
static {
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class DefaultGameModeCommand extends VanillaCommand {
|
||||
private static final List<String> GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival");
|
||||
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class DeopCommand extends VanillaCommand {
|
||||
public DeopCommand() {
|
||||
super("deop");
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.Difficulty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class DifficultyCommand extends VanillaCommand {
|
||||
private static final List<String> DIFFICULTY_NAMES = ImmutableList.of("peaceful", "easy", "normal", "hard");
|
||||
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
@Deprecated
|
||||
public class EffectCommand extends VanillaCommand {
|
||||
private static final List<String> effects;
|
||||
|
||||
|
@ -19,6 +19,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
@Deprecated
|
||||
public class EnchantCommand extends VanillaCommand {
|
||||
private static final List<String> ENCHANTMENT_NAMES = new ArrayList<String>();
|
||||
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class ExpCommand extends VanillaCommand {
|
||||
public ExpCommand() {
|
||||
super("xp");
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class GameModeCommand extends VanillaCommand {
|
||||
private static final List<String> GAMEMODE_NAMES = ImmutableList.of("adventure", "creative", "survival", "spectator");
|
||||
|
||||
|
@ -15,6 +15,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
|
||||
@Deprecated
|
||||
public class GameRuleCommand extends VanillaCommand {
|
||||
private static final List<String> GAMERULE_STATES = ImmutableList.of("true", "false");
|
||||
|
||||
|
@ -18,6 +18,7 @@ import org.bukkit.util.StringUtil;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class GiveCommand extends VanillaCommand {
|
||||
private static List<String> materials;
|
||||
static {
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class KickCommand extends VanillaCommand {
|
||||
public KickCommand() {
|
||||
super("kick");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class KillCommand extends VanillaCommand {
|
||||
public KillCommand() {
|
||||
super("kill");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class ListCommand extends VanillaCommand {
|
||||
public ListCommand() {
|
||||
super("list");
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
@Deprecated
|
||||
public class MeCommand extends VanillaCommand {
|
||||
public MeCommand() {
|
||||
super("me");
|
||||
|
@ -15,6 +15,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class OpCommand extends VanillaCommand {
|
||||
public OpCommand() {
|
||||
super("op");
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class PardonCommand extends VanillaCommand {
|
||||
public PardonCommand() {
|
||||
super("pardon");
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class PardonIpCommand extends VanillaCommand {
|
||||
public PardonIpCommand() {
|
||||
super("pardon-ip");
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@Deprecated
|
||||
public class PlaySoundCommand extends VanillaCommand {
|
||||
public PlaySoundCommand() {
|
||||
super("playsound");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class SaveCommand extends VanillaCommand {
|
||||
public SaveCommand() {
|
||||
super("save-all");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class SaveOffCommand extends VanillaCommand {
|
||||
public SaveOffCommand() {
|
||||
super("save-off");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class SaveOnCommand extends VanillaCommand {
|
||||
public SaveOnCommand() {
|
||||
super("save-on");
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class SayCommand extends VanillaCommand {
|
||||
public SayCommand() {
|
||||
super("say");
|
||||
|
@ -26,6 +26,7 @@ import org.bukkit.util.StringUtil;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
@Deprecated
|
||||
public class ScoreboardCommand extends VanillaCommand {
|
||||
|
||||
private static final List<String> MAIN_CHOICES = ImmutableList.of("objectives", "players", "teams");
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class SeedCommand extends VanillaCommand {
|
||||
public SeedCommand() {
|
||||
super("seed");
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class SetIdleTimeoutCommand extends VanillaCommand {
|
||||
|
||||
public SetIdleTimeoutCommand() {
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class SetWorldSpawnCommand extends VanillaCommand {
|
||||
|
||||
public SetWorldSpawnCommand() {
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class SpawnpointCommand extends VanillaCommand {
|
||||
|
||||
public SpawnpointCommand() {
|
||||
|
@ -16,6 +16,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scoreboard.Team;
|
||||
|
||||
@Deprecated
|
||||
public class SpreadPlayersCommand extends VanillaCommand {
|
||||
private static final Random random = new Random();
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class StopCommand extends VanillaCommand {
|
||||
public StopCommand() {
|
||||
super("stop");
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class TeleportCommand extends VanillaCommand {
|
||||
|
||||
public TeleportCommand() {
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@Deprecated
|
||||
public class TellCommand extends VanillaCommand {
|
||||
public TellCommand() {
|
||||
super("tell");
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
@Deprecated
|
||||
public class TestForCommand extends VanillaCommand {
|
||||
public TestForCommand() {
|
||||
super("testfor");
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class TimeCommand extends VanillaCommand {
|
||||
private static final List<String> TABCOMPLETE_ADD_SET = ImmutableList.of("add", "set");
|
||||
private static final List<String> TABCOMPLETE_DAY_NIGHT = ImmutableList.of("day", "night");
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class ToggleDownfallCommand extends VanillaCommand {
|
||||
public ToggleDownfallCommand() {
|
||||
super("toggledownfall");
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
@Deprecated
|
||||
public abstract class VanillaCommand extends Command {
|
||||
static final int MAX_COORD = 30000000;
|
||||
static final int MIN_COORD_MINUS_ONE = -30000001;
|
||||
|
@ -13,6 +13,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@Deprecated
|
||||
public class WeatherCommand extends VanillaCommand {
|
||||
private static final List<String> WEATHER_TYPES = ImmutableList.of("clear", "rain", "thunder");
|
||||
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@Deprecated
|
||||
public class WhitelistCommand extends VanillaCommand {
|
||||
private static final List<String> WHITELIST_SUBCOMMANDS = ImmutableList.of("add", "remove", "on", "off", "list", "reload");
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren