Null check hologram entity
This commit is contained in:
parent
77d34b53e6
commit
b09a8bae56
|
@ -592,7 +592,8 @@ public class HologramTrait extends Trait {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Entity> getEntities() {
|
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
|
@Override
|
||||||
|
|
|
@ -106,12 +106,6 @@ public class FoxTrait extends Trait {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum FoxModifier {
|
|
||||||
FACEPLANTED,
|
|
||||||
INTERESTED,
|
|
||||||
POUNCING;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "npc" },
|
aliases = { "npc" },
|
||||||
usage = "fox --type type --sleeping [true|false] --sitting [true|false] --crouching [true|false] --interested [true|false] --pouncing [true|false] --faceplanted [true|false]",
|
usage = "fox --type type --sleeping [true|false] --sitting [true|false] --crouching [true|false] --interested [true|false] --pouncing [true|false] --faceplanted [true|false]",
|
||||||
|
|
Loading…
Reference in New Issue