Fix Packet

This commit is contained in:
sky 2020-02-28 14:36:16 +08:00
parent 811caa43b3
commit 75a90dd404
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
1package io.izzel.taboolib.module.db.local;
package io.izzel.taboolib.module.db.local;
import io.izzel.taboolib.util.Files;
import org.bukkit.Bukkit;

View File

@ -9,6 +9,7 @@ import io.netty.channel.ChannelPromise;
import org.bukkit.entity.Player;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -54,6 +55,7 @@ public abstract class ChannelExecutor {
if (TPacketHandler.getListeners().stream().flatMap(Collection::stream).anyMatch(packetListener -> !packetListener.onSend(player, o) || !packetListener.onSend(player, new Packet(o)))) {
return;
}
} catch (ConcurrentModificationException ignore) {
} catch (Exception e) {
e.printStackTrace();
}
@ -66,6 +68,7 @@ public abstract class ChannelExecutor {
if (TPacketHandler.getListeners().stream().flatMap(Collection::stream).anyMatch(packetListener -> !packetListener.onReceive(player, o) || !packetListener.onReceive(player, new Packet(o)))) {
return;
}
} catch (ConcurrentModificationException ignore) {
} catch (Exception e) {
e.printStackTrace();
}