mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-18 01:18:54 +00:00
move respawn item task...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
d338369bb1
commit
a9cc5cc3c8
@ -226,12 +226,6 @@ public class QuickShop extends JavaPlugin {
|
|||||||
ItemConfig.load(this);
|
ItemConfig.load(this);
|
||||||
// Create the shop manager.
|
// Create the shop manager.
|
||||||
this.shopManager = new ShopManager(this);
|
this.shopManager = new ShopManager(this);
|
||||||
if (this.display) {
|
|
||||||
// Display item handler thread
|
|
||||||
getLogger().info("开启悬浮物品刷新线程...");
|
|
||||||
final ItemWatcher itemWatcher = new ItemWatcher(this);
|
|
||||||
itemWatcherTask = Bukkit.getScheduler().runTaskTimer(this, itemWatcher, 600, 600);
|
|
||||||
}
|
|
||||||
if (this.getConfig().getBoolean("log-actions")) {
|
if (this.getConfig().getBoolean("log-actions")) {
|
||||||
// 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"));
|
||||||
@ -243,9 +237,8 @@ public class QuickShop extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
ConfigurationSection limitCfg = this.getConfig().getConfigurationSection("limits");
|
ConfigurationSection limitCfg = this.getConfig().getConfigurationSection("limits");
|
||||||
if (limitCfg != null) {
|
if (limitCfg != null) {
|
||||||
getLogger().info("发现物品限制配置...");
|
|
||||||
this.limit = limitCfg.getBoolean("use", false);
|
this.limit = limitCfg.getBoolean("use", false);
|
||||||
getLogger().info("Limits.use: " + limit);
|
getLogger().info("商店创建限制: " + limit);
|
||||||
limitCfg = limitCfg.getConfigurationSection("ranks");
|
limitCfg = limitCfg.getConfigurationSection("ranks");
|
||||||
for (final String key : limitCfg.getKeys(true)) {
|
for (final String key : limitCfg.getKeys(true)) {
|
||||||
limits.put(key, limitCfg.getInt(key));
|
limits.put(key, limitCfg.getInt(key));
|
||||||
@ -351,13 +344,16 @@ public class QuickShop extends JavaPlugin {
|
|||||||
MsgUtil.loadTransactionMessages();
|
MsgUtil.loadTransactionMessages();
|
||||||
MsgUtil.clean();
|
MsgUtil.clean();
|
||||||
// Register events
|
// Register events
|
||||||
getLogger().info("注册监听器...");
|
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(blockListener, this);
|
Bukkit.getServer().getPluginManager().registerEvents(blockListener, this);
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(playerListener, this);
|
Bukkit.getServer().getPluginManager().registerEvents(playerListener, this);
|
||||||
|
Bukkit.getServer().getPluginManager().registerEvents(worldListener, this);
|
||||||
if (this.display) {
|
if (this.display) {
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(chunkListener, this);
|
Bukkit.getServer().getPluginManager().registerEvents(chunkListener, this);
|
||||||
|
// Display item handler thread
|
||||||
|
getLogger().info("开启悬浮物品刷新线程...");
|
||||||
|
final ItemWatcher itemWatcher = new ItemWatcher(this);
|
||||||
|
itemWatcherTask = Bukkit.getScheduler().runTaskTimer(this, itemWatcher, 20, 600);
|
||||||
}
|
}
|
||||||
Bukkit.getServer().getPluginManager().registerEvents(worldListener, this);
|
|
||||||
if (this.getConfig().getBoolean("force-bukkit-chat-handler", false) && Bukkit.getPluginManager().getPlugin("Herochat") != null) {
|
if (this.getConfig().getBoolean("force-bukkit-chat-handler", false) && Bukkit.getPluginManager().getPlugin("Herochat") != null) {
|
||||||
this.getLogger().info("Found Herochat... Hooking!");
|
this.getLogger().info("Found Herochat... Hooking!");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user