Null check hologram entity

This commit is contained in:
fullwall 2024-04-22 16:14:54 +08:00
parent 77d34b53e6
commit b09a8bae56
2 changed files with 2 additions and 7 deletions

View File

@ -592,7 +592,8 @@ public class HologramTrait extends Trait {
@Override
public Collection<Entity> getEntities() {
return hologram != null ? ImmutableList.of(hologram.getEntity()) : Collections.emptyList();
return hologram != null && hologram.getEntity() != null ? ImmutableList.of(hologram.getEntity())
: Collections.emptyList();
}
@Override

View File

@ -106,12 +106,6 @@ public class FoxTrait extends Trait {
this.type = type;
}
public enum FoxModifier {
FACEPLANTED,
INTERESTED,
POUNCING;
}
@Command(
aliases = { "npc" },
usage = "fox --type type --sleeping [true|false] --sitting [true|false] --crouching [true|false] --interested [true|false] --pouncing [true|false] --faceplanted [true|false]",