feat: Entity#teleportAsync method with TeleportFlags (#10371)

* feat: Entity#teleportAsync method with TeleportFlags

* use method-local class

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
Bridge
2024-04-06 22:38:37 +02:00
parent 68e86d7297
commit 7de6922d21
13 changed files with 100 additions and 84 deletions

View File

@@ -98,10 +98,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return ret;
return this.spigot;
}
// Spigot end
+
+ // Paper start - entity origin API
+ @Override
+ public Location getOrigin() {
+ Vector originVector = this.getHandle().getOriginVector();
@@ -116,5 +117,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ //noinspection ConstantConditions
+ return originVector.toLocation(world);
+ }
// Paper end
+ // Paper end - entity origin API
}