mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Un-experimentalize Entity TP APIs (#9964)
This commit is contained in:
@@ -22,7 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * @see org.bukkit.entity.Player#lookAt(Position, LookAnchor)
|
+ * @see org.bukkit.entity.Player#lookAt(Position, LookAnchor)
|
||||||
+ * @see org.bukkit.entity.Player#lookAt(Entity, LookAnchor, LookAnchor)
|
+ * @see org.bukkit.entity.Player#lookAt(Entity, LookAnchor, LookAnchor)
|
||||||
+ */
|
+ */
|
||||||
+@org.jetbrains.annotations.ApiStatus.Experimental
|
|
||||||
+public enum LookAnchor {
|
+public enum LookAnchor {
|
||||||
+ /**
|
+ /**
|
||||||
+ * Represents the entity's feet.
|
+ * Represents the entity's feet.
|
||||||
@@ -45,7 +44,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+import org.bukkit.Location;
|
+import org.bukkit.Location;
|
||||||
+import org.bukkit.event.player.PlayerTeleportEvent;
|
+import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
+import org.jetbrains.annotations.ApiStatus;
|
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Represents a flag that can be set on teleportation that may
|
+ * Represents a flag that can be set on teleportation that may
|
||||||
@@ -54,7 +52,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * @see EntityState
|
+ * @see EntityState
|
||||||
+ * @see Relative
|
+ * @see Relative
|
||||||
+ */
|
+ */
|
||||||
+@ApiStatus.Experimental
|
|
||||||
+public sealed interface TeleportFlag permits TeleportFlag.EntityState, TeleportFlag.Relative {
|
+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...)
|
+ * @see org.bukkit.entity.Player#teleport(Location, PlayerTeleportEvent.TeleportCause, TeleportFlag...)
|
||||||
+ */
|
+ */
|
||||||
+ @ApiStatus.Experimental
|
|
||||||
+ enum Relative implements TeleportFlag {
|
+ enum Relative implements TeleportFlag {
|
||||||
+ /**
|
+ /**
|
||||||
+ * Represents the player's X coordinate
|
+ * Represents the player's X coordinate
|
||||||
@@ -96,7 +92,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * Represents flags that effect the entity's state on
|
+ * Represents flags that effect the entity's state on
|
||||||
+ * teleportation.
|
+ * teleportation.
|
||||||
+ */
|
+ */
|
||||||
+ @ApiStatus.Experimental
|
|
||||||
+ enum EntityState implements TeleportFlag {
|
+ enum EntityState implements TeleportFlag {
|
||||||
+ /**
|
+ /**
|
||||||
+ * If all passengers should not be required to be removed prior to teleportation.
|
+ * 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
|
+ * @param teleportFlags Flags to be used in this teleportation
|
||||||
+ * @return <code>true</code> if the teleport was successful
|
+ * @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) {
|
+ default boolean teleport(@NotNull Location location, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags) {
|
||||||
+ return this.teleport(location, TeleportCause.PLUGIN, teleportFlags);
|
+ return this.teleport(location, TeleportCause.PLUGIN, teleportFlags);
|
||||||
+ }
|
+ }
|
||||||
@@ -157,7 +151,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * @param teleportFlags Flags to be used in this teleportation
|
+ * @param teleportFlags Flags to be used in this teleportation
|
||||||
+ * @return <code>true</code> if the teleport was successful
|
+ * @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);
|
+ boolean teleport(@NotNull Location location, @NotNull TeleportCause cause, @NotNull io.papermc.paper.entity.TeleportFlag @NotNull... teleportFlags);
|
||||||
+ // Paper end - Teleport API
|
+ // Paper end - Teleport API
|
||||||
+
|
+
|
||||||
@@ -179,7 +172,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * @param yaw the yaw
|
+ * @param yaw the yaw
|
||||||
+ * @param pitch the pitch
|
+ * @param pitch the pitch
|
||||||
+ */
|
+ */
|
||||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
|
||||||
+ void setRotation(float yaw, float pitch);
|
+ void setRotation(float yaw, float pitch);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
@@ -190,7 +182,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * @param z z coordinate
|
+ * @param z z coordinate
|
||||||
+ * @param playerAnchor What part of the player should face the given position
|
+ * @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);
|
+ 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 position Position to look at in the player's current world
|
||||||
+ * @param playerAnchor What part of the player should face the given position
|
+ * @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) {
|
+ 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);
|
+ 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 playerAnchor What part of the player should face the entity
|
||||||
+ * @param entityAnchor What part of the entity the player should face
|
+ * @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);
|
+ 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
|
+ // Paper end - Teleport API
|
||||||
+
|
+
|
||||||
@@ -242,7 +231,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Teleport API
|
+ // 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) {
|
+ 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);
|
+ super(player, from, to);
|
||||||
+ this.teleportFlagSet = teleportFlagSet;
|
+ this.teleportFlagSet = teleportFlagSet;
|
||||||
@@ -275,7 +264,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ *
|
+ *
|
||||||
+ * @return an immutable set of relative teleportation flags
|
+ * @return an immutable set of relative teleportation flags
|
||||||
+ */
|
+ */
|
||||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ public java.util.Set<io.papermc.paper.entity.TeleportFlag.@NotNull Relative> getRelativeTeleportationFlags() {
|
+ public java.util.Set<io.papermc.paper.entity.TeleportFlag.@NotNull Relative> getRelativeTeleportationFlags() {
|
||||||
+ return this.teleportFlagSet;
|
+ return this.teleportFlagSet;
|
||||||
|
Reference in New Issue
Block a user