From 7a6fb4d601741a1aac2307eadba0e3c311813f88 Mon Sep 17 00:00:00 2001 From: KrystilizeNevaDies <57762380+KrystilizeNevaDies@users.noreply.github.com> Date: Tue, 6 Apr 2021 04:43:19 +1000 Subject: [PATCH] Format FishingHookMeta + make owner not null --- .../metadata/other/FishingHookMeta.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/main/java/net/minestom/server/entity/metadata/other/FishingHookMeta.java b/src/main/java/net/minestom/server/entity/metadata/other/FishingHookMeta.java index 02e734d1f..9661fc54a 100644 --- a/src/main/java/net/minestom/server/entity/metadata/other/FishingHookMeta.java +++ b/src/main/java/net/minestom/server/entity/metadata/other/FishingHookMeta.java @@ -27,14 +27,15 @@ public class FishingHookMeta extends EntityMeta implements ObjectDataProvider { int entityID = value == null ? 0 : value.getEntityId() + 1; super.metadata.setIndex((byte) 7, Metadata.VarInt(entityID)); } - @Nullable - public Entity getOwnerEntity() { - return owner; - } + + @NotNull + public Entity getOwnerEntity() { + return owner; + } - public void setOwnerEntity(@Nullable Entity value) { - this.owner = value; - } + public void setOwnerEntity(@NotNull Entity value) { + this.owner = value; + } public boolean isCatchable() { return super.metadata.getIndex((byte) 8, false); @@ -44,13 +45,13 @@ public class FishingHookMeta extends EntityMeta implements ObjectDataProvider { super.metadata.setIndex((byte) 8, Metadata.Boolean(value)); } - @Override - public int getObjectData() { - return owner.getEntityId(); - } + @Override + public int getObjectData() { + return owner.getEntityId(); + } - @Override - public boolean requiresVelocityPacketAtSpawn() { - return false; - } + @Override + public boolean requiresVelocityPacketAtSpawn() { + return false; + } }