Make sure to update CommandBook installed status in onEnable

This commit is contained in:
zml2008 2012-04-07 13:46:25 -07:00
parent fe1e09289f
commit ad5b1cdcba
2 changed files with 8 additions and 5 deletions

View File

@ -137,6 +137,7 @@ public void load() {
"regions.use-scheduler", true); "regions.use-scheduler", true);
autoGodMode = config.getBoolean( autoGodMode = config.getBoolean(
"auto-invincible", config.getBoolean("auto-invincible-permission", false)); "auto-invincible", config.getBoolean("auto-invincible-permission", false));
config.removeProperty("auto-invincible-permission");
usePlayerMove = config.getBoolean( usePlayerMove = config.getBoolean(
"use-player-move-event", true); "use-player-move-event", true);
@ -211,6 +212,7 @@ public void forgetPlayer(LocalPlayer player) {
*/ */
@Deprecated @Deprecated
public void enableGodMode(Player player) { public void enableGodMode(Player player) {
hasGodMode.add(player.getName()); hasGodMode.add(player.getName());
} }

View File

@ -160,6 +160,7 @@ public void run() {
(new WorldGuardWeatherListener(this)).registerEvents(); (new WorldGuardWeatherListener(this)).registerEvents();
(new WorldGuardVehicleListener(this)).registerEvents(); (new WorldGuardVehicleListener(this)).registerEvents();
(new WorldGuardServerListener(this)).registerEvents(); (new WorldGuardServerListener(this)).registerEvents();
configuration.updateCommandBookGodMode();
if (getServer().getPluginManager().isPluginEnabled("CommandBook")) { if (getServer().getPluginManager().isPluginEnabled("CommandBook")) {
getServer().getPluginManager().registerEvents(new WorldGuardCommandBookListener(this), this); getServer().getPluginManager().registerEvents(new WorldGuardCommandBookListener(this), this);