diff --git a/src/main/java/net/minestom/server/entity/Entity.java b/src/main/java/net/minestom/server/entity/Entity.java index c5162c5f6..d60766d8e 100644 --- a/src/main/java/net/minestom/server/entity/Entity.java +++ b/src/main/java/net/minestom/server/entity/Entity.java @@ -626,8 +626,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return the entity type */ - @NotNull - public EntityType getEntityType() { + public @NotNull EntityType getEntityType() { return entityType; } @@ -636,8 +635,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return the entity unique id */ - @NotNull - public UUID getUuid() { + public @NotNull UUID getUuid() { return uuid; } @@ -650,7 +648,6 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler // Refresh internal map Entity.ENTITY_BY_UUID.remove(this.uuid); Entity.ENTITY_BY_UUID.put(uuid, this); - this.uuid = uuid; } @@ -668,8 +665,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return the entity bounding box */ - @NotNull - public BoundingBox getBoundingBox() { + public @NotNull BoundingBox getBoundingBox() { return boundingBox; } @@ -868,8 +864,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return the entity vehicle, or null if there is not any */ - @Nullable - public Entity getVehicle() { + public @Nullable Entity getVehicle() { return vehicle; } @@ -927,13 +922,11 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return an unmodifiable list containing all the entity passengers */ - @NotNull - public Set getPassengers() { + public @NotNull Set<@NotNull Entity> getPassengers() { return Collections.unmodifiableSet(passengers); } - @NotNull - protected SetPassengersPacket getPassengersPacket() { + protected @NotNull SetPassengersPacket getPassengersPacket() { SetPassengersPacket passengersPacket = new SetPassengersPacket(); passengersPacket.vehicleEntityId = getEntityId(); @@ -1064,8 +1057,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return the entity pose */ - @NotNull - public Pose getPose() { + public @NotNull Pose getPose() { return this.entityMeta.getPose(); } @@ -1253,8 +1245,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler * * @return an unmodifiable list of all this entity effects */ - @NotNull - public List getActiveEffects() { + public @NotNull List<@NotNull TimedPotion> getActiveEffects() { return Collections.unmodifiableList(effects); }