Update EntityLib.java

This commit is contained in:
Tofaa 2024-02-16 18:21:59 +04:00 committed by GitHub
parent 62fc93c4c9
commit e7b9e9fff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -329,7 +329,10 @@ public final class EntityLib {
checkInit(); checkInit();
Object channel = packetEvents.getProtocolManager().getChannel(user); Object channel = packetEvents.getProtocolManager().getChannel(user);
if (channel == null) { if (channel == null) {
System.out.println("EntityLib could not send packet to user " + user); boolean b = Boolean.parseBoolean(System.getenv("entitylib_debug"));
if (b) {
System.out.println("EntityLib could not send packet to user " + user);
}
return; return;
} }
packetEvents.getProtocolManager().sendPacket(channel, wrapper); packetEvents.getProtocolManager().sendPacket(channel, wrapper);