diff --git a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java index 7f56b43..28ee724 100644 --- a/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java +++ b/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java @@ -121,7 +121,12 @@ public class WrapperEntity implements Tickable, TrackedEntity { } public void remove() { - parent.removeEntity(this, true); + if (parent != null) { + parent.removeEntity(this, true); + } + else { + despawn(); + } } public void despawn() { @@ -382,6 +387,8 @@ public class WrapperEntity implements Tickable, TrackedEntity { new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround), new WrapperPlayServerEntityHeadLook(entityId, yaw) ); + this.location.setYaw(yaw); + this.location.setPitch(pitch); } public void rotateHead(Location location) { diff --git a/build.gradle.kts b/build.gradle.kts index 646d9e5..12a148f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ import java.io.ByteArrayOutputStream -val fullVersion = "2.4.5" +val fullVersion = "2.4.7" val snapshot = true group = "me.tofaa.entitylib"