Deprecate origin for vibrations (#7898)
This commit is contained in:
parent
467a16642a
commit
da8027352c
|
@ -183,6 +183,37 @@ index b8ed8d5d48cb4f1b2f598e2c48e4423ab2d899f4..102ce4e488d5b6fd4a19766e9fa02d29
|
||||||
ScoreboardManager getScoreboardManager();
|
ScoreboardManager getScoreboardManager();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
diff --git a/src/main/java/org/bukkit/Vibration.java b/src/main/java/org/bukkit/Vibration.java
|
||||||
|
index 8d568d21fcbf706f55cda087bd7222ac60889c0a..209a302c3a2ed333780ed760314a6ed352fc0767 100644
|
||||||
|
--- a/src/main/java/org/bukkit/Vibration.java
|
||||||
|
+++ b/src/main/java/org/bukkit/Vibration.java
|
||||||
|
@@ -13,6 +13,14 @@ 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;
|
||||||
|
@@ -22,9 +30,11 @@ 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
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||||
index b4c77e92f286e0159c8f25a063a964aaf1b1bd8c..4f9f8e51e1a99a2d19643d105b839562ebe0b600 100644
|
index b4c77e92f286e0159c8f25a063a964aaf1b1bd8c..4f9f8e51e1a99a2d19643d105b839562ebe0b600 100644
|
||||||
--- a/src/main/java/org/bukkit/World.java
|
--- a/src/main/java/org/bukkit/World.java
|
||||||
|
|
Loading…
Reference in New Issue