Deprecate origin for vibrations (#7898)

This commit is contained in:
Owen1212055 2022-06-08 16:44:59 -04:00
parent 130e8c090b
commit 01cf853f91

View file

@ -183,6 +183,37 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
ScoreboardManager getScoreboardManager();
/**
diff --git a/src/main/java/org/bukkit/Vibration.java b/src/main/java/org/bukkit/Vibration.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Vibration.java
+++ b/src/main/java/org/bukkit/Vibration.java
@@ -0,0 +0,0 @@ public class Vibration {
private final Destination destination;
private final int arrivalTime;
+ // Paper start
+ public Vibration(@NotNull Destination destination, @NotNull int arrivalTime) {
+ this.destination = destination;
+ this.arrivalTime = arrivalTime;
+ this.origin = new Location(null, 0, 0, 0); // Dummy origin because getter expects null
+ }
+
+ @Deprecated(forRemoval = true) // Paper end
public Vibration(@NotNull Location origin, @NotNull Destination destination, @NotNull int arrivalTime) {
this.origin = origin;
this.destination = destination;
@@ -0,0 +0,0 @@ public class Vibration {
/**
* Get the origin of the vibration.
*
+ * @deprecated unused as of 1.19
* @return origin
*/
@NotNull
+ @Deprecated(forRemoval = true) // Paper
public Location getOrigin() {
return origin;
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/World.java