diff --git a/src/main/java/org/maxgamer/QuickShop/Command/QuickShopCommands.java b/src/main/java/org/maxgamer/QuickShop/Command/QuickShopCommands.java index 8e62034..1f74e52 100644 --- a/src/main/java/org/maxgamer/QuickShop/Command/QuickShopCommands.java +++ b/src/main/java/org/maxgamer/QuickShop/Command/QuickShopCommands.java @@ -2,20 +2,19 @@ package org.maxgamer.QuickShop.Command; import org.bukkit.command.Command; import org.bukkit.command.CommandException; -import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.maxgamer.QuickShop.QuickShop; import cn.citycraft.PluginHelper.commands.DefaultCommand; import cn.citycraft.PluginHelper.commands.HandlerSubCommand; -public class QuickShopCommands implements CommandExecutor, DefaultCommand { +public class QuickShopCommands implements DefaultCommand { HandlerSubCommand hsc; QuickShop plugin; public QuickShopCommands(final QuickShop plugin) { this.plugin = plugin; - hsc = new HandlerSubCommand(plugin); + hsc = new HandlerSubCommand(plugin, "qs"); hsc.setDefaultCommand(this); hsc.registerCommand(new CommandClean(plugin)); hsc.registerCommand(new CommandEmpty(plugin)); @@ -37,9 +36,4 @@ public class QuickShopCommands implements CommandExecutor, DefaultCommand { hsc.sendHelp(sender, label); } - @Override - public boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) { - return hsc.onCommand(sender, cmd, label, args); - } - } \ No newline at end of file diff --git a/src/main/java/org/maxgamer/QuickShop/QuickShop.java b/src/main/java/org/maxgamer/QuickShop/QuickShop.java index a433062..bcb225a 100644 --- a/src/main/java/org/maxgamer/QuickShop/QuickShop.java +++ b/src/main/java/org/maxgamer/QuickShop/QuickShop.java @@ -328,8 +328,8 @@ public class QuickShop extends JavaPlugin { } // Command handlers - final QuickShopCommands commandExecutor = new QuickShopCommands(this); - getCommand("qs").setExecutor(commandExecutor); + new QuickShopCommands(this); + if (configManager.getFindDistance() > 100) { getLogger().warning("商店查找半径过大 可能导致服务器Lag! 推荐使用低于 100 的配置!"); }