Fix Exception if server is full

Could not pass event 'cn.nukkit.event.player.PlayerQuitEvent' to
'FastAsyncWorldEdit v17.05.29-a607d85-699-13.0.8': null on
com.boydti.fawe.nukkit.optimization.FaweNukkit
cn.nukkit.utils.EventException
at
cn.nukkit.plugin.MethodEventExecutor.execute(MethodEventExecutor.java:34)
at
cn.nukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:56)
at cn.nukkit.plugin.PluginManager.callEvent(PluginManager.java:553)
at cn.nukkit.Player.close(Player.java:3893)
at cn.nukkit.Player.close(Player.java:3879)
at cn.nukkit.Player.kick(Player.java:3732)
at cn.nukkit.Player.handleDataPacket(Player.java:1959)
at cn.nukkit.network.Network.processPackets(Network.java:180)
at cn.nukkit.network.Network.processBatch(Network.java:151)
at cn.nukkit.Player.handleDataPacket(Player.java:1920)
at
cn.nukkit.network.RakNetInterface.handleEncapsulated(RakNetInterface.java:157)
at
cn.nukkit.raknet.server.ServerHandler.handlePacket(ServerHandler.java:123)
at cn.nukkit.network.RakNetInterface.process(RakNetInterface.java:68)
at cn.nukkit.network.Network.processInterfaces(Network.java:75)
at cn.nukkit.Server.tick(Server.java:990)
at cn.nukkit.Server.tickProcessor(Server.java:788)
at cn.nukkit.Server.start(Server.java:767)
at cn.nukkit.Server.<init>(Server.java:458)
at cn.nukkit.Nukkit.main(Nukkit.java:68)
Caused by:
com.sk89q.worldedit.extension.platform.NoCapablePlatformException: No
platform was found supporting CONFIGURATION
at
com.sk89q.worldedit.extension.platform.PlatformManager.queryCapability(PlatformManager.java:186)
at
com.sk89q.worldedit.extension.platform.PlatformManager.getConfiguration(PlatformManager.java:314)
at com.sk89q.worldedit.WorldEdit.getConfiguration(WorldEdit.java:801)
at
com.sk89q.worldedit.session.SessionManager.get(SessionManager.java:172)
at com.sk89q.worldedit.WorldEdit.getSession(WorldEdit.java:210)
at com.boydti.fawe.object.FawePlayer.getSession(FawePlayer.java:382)
at com.boydti.fawe.object.FawePlayer.unregister(FawePlayer.java:453)
at
com.boydti.fawe.nukkit.optimization.FaweNukkit.onPlayerQuit(FaweNukkit.java:45)
at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
cn.nukkit.plugin.MethodEventExecutor.execute(MethodEventExecutor.java:29)
... 18 more
This commit is contained in:
Goodstuff4UonYT 2017-06-18 11:07:10 +02:00
parent 0c7ed30026
commit dbc0d31b80

View File

@ -46,12 +46,14 @@ public class FaweNukkit implements IFawe, Listener {
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
if (!event.getReason().equals("disconnectionScreen.serverFull")) {
FawePlayer fp = FawePlayer.wrap(player);
if (fp != null) {
fp.unregister();
}
Fawe.get().unregister(event.getPlayer().getName());
}
}
@Override
public void debug(String s) {