From 8aa88ddfef4c1270e60fa643483453e2369d9bd1 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 24 Nov 2015 15:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Tab=E8=A1=A5=E5=85=A8=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B0=E7=89=88PH...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../maxgamer/QuickShop/Command/QuickShopCommands.java | 10 ++-------- src/main/java/org/maxgamer/QuickShop/QuickShop.java | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) 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 的配置!"); }