Fixed NPE caused by Spout players after a /reload

This commit is contained in:
bm01 2012-06-28 06:50:47 +02:00
parent 32e9de6e9a
commit 0c1a8eff85
2 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Version 1.3.10-dev
+ Added ability for custom blocks to drop a range of items. + Added ability for custom blocks to drop a range of items.
+ Added Ability API functions + Added Ability API functions
+ Added 50% & 150% XP boost perks + Added 50% & 150% XP boost perks
= Fixed NPE caused by Spout players after a /reload
= Fixed ConcurrentModificationException on world unload = Fixed ConcurrentModificationException on world unload
= Fixed players never being removed from memory (memory leak) = Fixed players never being removed from memory (memory leak)
= Fixed admin chat being seen by everyone = Fixed admin chat being seen by everyone

View File

@ -1,7 +1,9 @@
package com.gmail.nossr50.runnables; package com.gmail.nossr50.runnables;
import org.getspout.spoutapi.SpoutManager; import org.getspout.spoutapi.SpoutManager;
import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
import org.getspout.spoutapi.player.FileManager; import org.getspout.spoutapi.player.FileManager;
import org.getspout.spoutapi.player.SpoutPlayer;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.SpoutConfig; import com.gmail.nossr50.config.SpoutConfig;
@ -32,6 +34,12 @@ public class SpoutStart implements Runnable{
FileManager FM = SpoutManager.getFileManager(); FileManager FM = SpoutManager.getFileManager();
FM.addToPreLoginCache(plugin, SpoutStuff.getFiles()); FM.addToPreLoginCache(plugin, SpoutStuff.getFiles());
//Handle spout players after a /reload
for (SpoutPlayer spoutPlayer : SpoutManager.getPlayerManager().getOnlinePlayers()) {
SpoutCraftEnableEvent spoutCraftEnableEvent = new SpoutCraftEnableEvent(spoutPlayer);
mcMMO.p.getServer().getPluginManager().callEvent(spoutCraftEnableEvent);
}
} }
} }
} }