mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-02-28 18:01:04 +01:00
Attempt to fix error with ProtocolLib's temporary players
This commit is contained in:
parent
81fb3ef028
commit
98e5827a8a
@ -8,6 +8,8 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.comphenix.net.sf.cglib.proxy.Factory;
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.comphenix.protocol.events.ListenerPriority;
|
||||
@ -102,6 +104,10 @@ public class ProtocolLibHookImpl implements ProtocolLibHook {
|
||||
public void onPacketSending(PacketEvent event) {
|
||||
|
||||
PacketContainer packet = event.getPacket();
|
||||
|
||||
if (event.getPlayer() instanceof Factory) {
|
||||
return; // Ignore temporary players (reference: https://github.com/dmulloy2/ProtocolLib/issues/349)
|
||||
}
|
||||
|
||||
// Spawn entity packet
|
||||
if (packet.getType() == PacketType.Play.Server.SPAWN_ENTITY_LIVING) {
|
||||
|
Loading…
Reference in New Issue
Block a user