mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Fixed NPE caused by Spout players after a /reload
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
package com.gmail.nossr50.runnables;
|
||||
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
|
||||
import org.getspout.spoutapi.player.FileManager;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.SpoutConfig;
|
||||
@ -32,6 +34,12 @@ public class SpoutStart implements Runnable{
|
||||
|
||||
FileManager FM = SpoutManager.getFileManager();
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user