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:
Owen1212055
2023-03-04 17:07:23 -05:00
parent d922f2e369
commit 2dd20a5904
3 changed files with 122 additions and 120 deletions

View File

@@ -119,7 +119,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @Deprecated
+ @Override
+ public @NotNull java.util.Set<io.papermc.paper.entity.@NotNull RelativeTeleportFlag> getRelativeTeleportationFlags() {
+ public @NotNull java.util.Set<io.papermc.paper.entity.TeleportFlag.@NotNull Relative> getRelativeTeleportationFlags() {
+ return super.getRelativeTeleportationFlags();
+ }
+ // Paper end