Add TeleportFlags (#8855)

Abstracts relative teleport flags and instead makes a generic TeleportFlag option. This has the benefit of being able to easily add new flags in the future.
This adds a new flag, which allows you to keep inventories open when teleporting players (vanilla behavior).

These are breaking changes to the teleport api, however, it's still marked as experimental so I find this a fair change.
This commit is contained in:
Owen 2023-03-04 17:07:23 -05:00 committed by GitHub
parent 8a815a0eae
commit d30cda1273
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 157 additions and 155 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 6cd6cb256bde958416a0e4b13fc1d3df74f230fd..78f53ee557276de85f0431ebcb146445b1f4fb92 100644
index 3145a5cba793d94ca649eb99dd6b69bed5bb759c..b5e5b3c88820a571f4feb439b1e4ebf7dd22555b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1160,6 +1160,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1163,6 +1163,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return Pose.values()[this.getHandle().getPose().ordinal()];
}