make npcs always have teams
This commit is contained in:
parent
bdbbd0bef9
commit
1f5bea5f8e
2 changed files with 2 additions and 13 deletions
|
@ -51,12 +51,13 @@ public class V1_8Factory implements PacketFactory {
|
|||
new WrapperPlayServerSpawnEntity(entity.getEntityId(), Optional.of(entity.getUuid()), entity.getType(), location.toVector3d(),
|
||||
location.getPitch(), location.getYaw(), location.getYaw(), 0, Optional.empty()));
|
||||
sendAllMetadata(player, entity, properties);
|
||||
createTeam(player, entity, properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyEntity(Player player, PacketEntity entity, PropertyHolder properties) {
|
||||
sendPacket(player, new WrapperPlayServerDestroyEntities(entity.getEntityId()));
|
||||
if (entity.getType() == EntityTypes.PLAYER) removeTeam(player, entity);
|
||||
removeTeam(player, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,16 +23,4 @@ public class V1_9Factory extends V1_8Factory {
|
|||
if (properties.hasProperty(EntityProperty.NAME)) data.addAll(MetadataFactory.get().name(properties.getProperty(EntityProperty.NAME)));
|
||||
sendMetadata(player, entity, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnEntity(Player player, PacketEntity entity, PropertyHolder properties) {
|
||||
super.spawnEntity(player, entity, properties);
|
||||
if (properties.hasProperty(EntityProperty.GLOW)) createTeam(player, entity, properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyEntity(Player player, PacketEntity entity, PropertyHolder properties) {
|
||||
super.destroyEntity(player, entity, properties);
|
||||
if (entity.getType() != EntityTypes.PLAYER && properties.hasProperty(EntityProperty.GLOW)) removeTeam(player, entity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue