mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-11-07 03:09:52 +01:00
Fixes #40
This commit is contained in:
parent
1a6c99cf40
commit
02c6fe50d5
@ -135,15 +135,15 @@ public class ProtocolLibHookImpl implements ProtocolLibHook {
|
||||
}
|
||||
|
||||
} else if (packet.getType() == PacketType.Play.Server.SPAWN_ENTITY) {
|
||||
|
||||
|
||||
WrapperPlayServerSpawnEntity spawnEntityPacket = new WrapperPlayServerSpawnEntity(packet);
|
||||
int objectId = spawnEntityPacket.getType();
|
||||
if (objectId != ObjectTypes.ITEM_STACK && objectId != ObjectTypes.ARMOR_STAND) {
|
||||
Entity entity = spawnEntityPacket.getEntity(event);
|
||||
|
||||
if (entity == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Entity entity = spawnEntityPacket.getEntity(event);
|
||||
if (entity == null) {
|
||||
if (!isHologramType(entity.getType())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ public class ProtocolLibHookImpl implements ProtocolLibHook {
|
||||
}
|
||||
|
||||
} else if (packet.getType() == PacketType.Play.Server.ENTITY_METADATA) {
|
||||
|
||||
|
||||
WrapperPlayServerEntityMetadata entityMetadataPacket = new WrapperPlayServerEntityMetadata(packet);
|
||||
Entity entity = entityMetadataPacket.getEntity(event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user