mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 10:37:41 +01:00
Fixed iConomy 4.0 API support
This commit is contained in:
parent
3ed8eb76c2
commit
e61b496ca4
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldguard.bukkit;
|
||||
|
||||
import com.nijikokun.bukkit.iConomy.iConomy;
|
||||
import com.sk89q.worldguard.protection.regionmanager.RegionManager;
|
||||
import com.sk89q.worldguard.blacklist.events.ItemAcquireBlacklistEvent;
|
||||
import org.bukkit.entity.Item;
|
||||
@ -42,6 +43,8 @@ public class WorldGuardPlayerListener extends PlayerListener {
|
||||
*/
|
||||
private WorldGuardPlugin plugin;
|
||||
|
||||
private boolean checkediConomy = false;
|
||||
|
||||
/**
|
||||
* Construct the object;
|
||||
*
|
||||
@ -177,6 +180,15 @@ public void onPlayerLogin(PlayerLoginEvent event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!checkediConomy) {
|
||||
iConomy iconomy = (iConomy)plugin.getServer().getPluginManager().getPlugin("iConomy");
|
||||
if (iconomy != null) {
|
||||
plugin.getWgConfiguration().setiConomy(iconomy);
|
||||
}
|
||||
|
||||
checkediConomy = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,8 +44,6 @@ public class WorldGuardPlugin extends JavaPlugin {
|
||||
new WorldGuardBlockListener(this);
|
||||
private final WorldGuardEntityListener entityListener =
|
||||
new WorldGuardEntityListener(this);
|
||||
private final WorldGuardServerListener serverListener =
|
||||
new WorldGuardServerListener(this);
|
||||
|
||||
private final CommandHandler commandHandler = new CommandHandler(this);
|
||||
private final GlobalRegionManager globalRegionManager = new GlobalRegionManager(this);
|
||||
@ -103,8 +101,6 @@ private void registerEvents() {
|
||||
pm.registerEvent(Event.Type.PLAYER_LOGIN, playerListener, Priority.Normal, this);
|
||||
pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Normal, this);
|
||||
|
||||
pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Priority.Monitor, this);
|
||||
|
||||
// 25 equals about 1s real time
|
||||
this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new TimedFlagsTimer(this), 25 * 5, 25 * 5);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user