Re-ordered plugin enable process.

This commit is contained in:
sk89q 2011-06-22 08:43:10 -07:00
parent 4f3198b1bd
commit b62ada53c3

View File

@ -133,13 +133,6 @@ public void onEnable() {
// Load permissions // Load permissions
(new PermissionsResolverServerListener(perms)).register(this); (new PermissionsResolverServerListener(perms)).register(this);
// Register events
(new WorldGuardPlayerListener(this)).registerEvents();
(new WorldGuardBlockListener(this)).registerEvents();
(new WorldGuardEntityListener(this)).registerEvents();
(new WorldGuardWeatherListener(this)).registerEvents();
(new WorldGuardWorldListener(this)).registerEvents();
flagStateManager = new FlagStateManager(this); flagStateManager = new FlagStateManager(this);
if (configuration.useRegionsScheduler) { if (configuration.useRegionsScheduler) {
@ -157,6 +150,13 @@ public void onEnable() {
} }
} }
// Register events
(new WorldGuardPlayerListener(this)).registerEvents();
(new WorldGuardBlockListener(this)).registerEvents();
(new WorldGuardEntityListener(this)).registerEvents();
(new WorldGuardWeatherListener(this)).registerEvents();
(new WorldGuardWorldListener(this)).registerEvents();
logger.info("WorldGuard " + this.getDescription().getVersion() + " enabled."); logger.info("WorldGuard " + this.getDescription().getVersion() + " enabled.");
} }