1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

自动判断是否启用虚拟悬浮物...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2016-01-17 08:39:10 +08:00
parent abc81b93ed
commit 764f8a8446
3 changed files with 3 additions and 13 deletions

View File

@ -91,7 +91,7 @@ public class ConfigManager {
fakeItem = true; fakeItem = true;
} catch (final Error | Exception e) { } catch (final Error | Exception e) {
plugin.getLogger().warning("+========================================="); plugin.getLogger().warning("+=========================================");
plugin.getLogger().warning("| 警告: 虚拟物品启动失败 使用原版悬浮物品..."); plugin.getLogger().warning("| 警告: 启动虚拟物品失败 使用原版悬浮物品...");
plugin.getLogger().warning("+========================================="); plugin.getLogger().warning("+=========================================");
} }
} }

View File

@ -43,7 +43,6 @@ import org.maxgamer.QuickShop.Listeners.ProtectListener;
import org.maxgamer.QuickShop.Listeners.WorldListener; import org.maxgamer.QuickShop.Listeners.WorldListener;
import org.maxgamer.QuickShop.Listeners.WowSuchCleanerListener; import org.maxgamer.QuickShop.Listeners.WowSuchCleanerListener;
import org.maxgamer.QuickShop.Shop.ContainerShop; import org.maxgamer.QuickShop.Shop.ContainerShop;
import org.maxgamer.QuickShop.Shop.FakeItem;
import org.maxgamer.QuickShop.Shop.Shop; import org.maxgamer.QuickShop.Shop.Shop;
import org.maxgamer.QuickShop.Shop.ShopManager; import org.maxgamer.QuickShop.Shop.ShopManager;
import org.maxgamer.QuickShop.Shop.ShopType; import org.maxgamer.QuickShop.Shop.ShopType;
@ -296,14 +295,6 @@ public class QuickShop extends JavaPlugin {
// Create the shop manager. // Create the shop manager.
configManager = new ConfigManager(this); configManager = new ConfigManager(this);
shopManager = new ShopManager(this); shopManager = new ShopManager(this);
if (configManager.isFakeItem()) {
if (!FakeItem.isRegistered()) {
try {
FakeItem.register(this);
} catch (final Exception e) {
}
}
}
if (configManager.isLogAction()) { if (configManager.isLogAction()) {
// Logger Handler // Logger Handler
this.logWatcher = new LogWatcher(this, new File(this.getDataFolder(), "qs.log")); this.logWatcher = new LogWatcher(this, new File(this.getDataFolder(), "qs.log"));

View File

@ -55,10 +55,10 @@ public class FakeItem implements DisplayItem {
pm.enablePlugin(p); pm.enablePlugin(p);
} }
if (!p.isEnabled()) { if (!p.isEnabled()) {
throw new IllegalStateException("The ProtocolLib enable Failed."); throw new IllegalStateException("前置插件ProtocolLib启动失败 请检查版本.");
} }
} else { } else {
throw new IllegalStateException("The Server Not Found ProtocolLib."); throw new IllegalStateException("服务器未找到前置插件ProtocolLib.");
} }
final PacketAdapter chunkPacketListener = new PacketAdapter(plugin, PacketType.Play.Server.MAP_CHUNK) { final PacketAdapter chunkPacketListener = new PacketAdapter(plugin, PacketType.Play.Server.MAP_CHUNK) {
@Override @Override
@ -102,7 +102,6 @@ public class FakeItem implements DisplayItem {
} }
} }
}; };
ProtocolLibrary.getProtocolManager().addPacketListener(chunkPacketListener); ProtocolLibrary.getProtocolManager().addPacketListener(chunkPacketListener);
ProtocolLibrary.getProtocolManager().addPacketListener(chunkBulkPacketListener); ProtocolLibrary.getProtocolManager().addPacketListener(chunkBulkPacketListener);
registered = true; registered = true;