Un-experimentalize Entity TP APIs (#9964)

This commit is contained in:
Jake Potrebic 2023-11-28 11:40:25 -08:00
parent cea171de11
commit a60f62506f

View file

@ -22,7 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @see org.bukkit.entity.Player#lookAt(Position, LookAnchor)
+ * @see org.bukkit.entity.Player#lookAt(Entity, LookAnchor, LookAnchor)
+ */
+@org.jetbrains.annotations.ApiStatus.Experimental
+public enum LookAnchor {
+ /**
+ * Represents the entity's feet.
@ -45,7 +44,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+import org.bukkit.Location;
+import org.bukkit.event.player.PlayerTeleportEvent;
+import org.jetbrains.annotations.ApiStatus;
+
+/**
+ * Represents a flag that can be set on teleportation that may
@ -54,7 +52,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @see EntityState
+ * @see Relative
+ */
+@ApiStatus.Experimental
+public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportFlag.Relative {
+
+ /**
@ -68,7 +65,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @see org.bukkit.entity.Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
+ */
+ @ApiStatus.Experimental
+ enum Relative implements TeleportFlag {
+ /**
+ * Represents the player's X coordinate
@ -96,7 +92,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * Represents flags that effect the entity's state on
+ * teleportation.
+ */
+ @ApiStatus.Experimental
+ enum EntityState implements TeleportFlag {
+ /**
+ * If all passengers should not be required to be removed prior to teleportation.
@ -144,7 +139,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param teleportFlags Flags to be used in this teleportation
+ * @return <code>true</code> if the teleport was successful
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ default boolean teleport(@NotNull Location location, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags) {
+ return this.teleport(location, TeleportCause.PLUGIN, teleportFlags);
+ }
@ -157,7 +151,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param teleportFlags Flags to be used in this teleportation
+ * @return <code>true</code> if the teleport was successful
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ boolean teleport(@NotNull Location location, @NotNull TeleportCause cause, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags);
+ // Paper end - Teleport API
+
@ -179,7 +172,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param yaw the yaw
+ * @param pitch the pitch
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ void setRotation(float yaw, float pitch);
+
+ /**
@ -190,7 +182,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param z z coordinate
+ * @param playerAnchor What part of the player should face the given position
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ void lookAt(double x, double y, double z, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor);
+
+ /**
@ -199,7 +190,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param position Position to look at in the player's current world
+ * @param playerAnchor What part of the player should face the given position
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ default void lookAt(@NotNull io.papermc.paper.math.Position position, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor) {
+ this.lookAt(position.x(), position.y(), position.z(), playerAnchor);
+ }
@ -211,7 +201,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param playerAnchor What part of the player should face the entity
+ * @param entityAnchor What part of the entity the player should face
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
+ // Paper end - Teleport API
+
@ -242,7 +231,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - Teleport API
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ @org.jetbrains.annotations.ApiStatus.Internal
+ public PlayerTeleportEvent(@NotNull final Player player, @NotNull final Location from, @Nullable final Location to, @NotNull final TeleportCause cause, @NotNull java.util.Set<io.papermc.paper.entity.TeleportFlag.@NotNull Relative> teleportFlagSet) {
+ super(player, from, to);
+ this.teleportFlagSet = teleportFlagSet;
@ -275,7 +264,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @return an immutable set of relative teleportation flags
+ */
+ @org.jetbrains.annotations.ApiStatus.Experimental
+ @NotNull
+ public java.util.Set<io.papermc.paper.entity.TeleportFlag.@NotNull Relative> getRelativeTeleportationFlags() {
+ return this.teleportFlagSet;