2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Sat, 21 Jan 2017 17:03:10 -0600
|
|
|
|
Subject: [PATCH] Expose WorldBorder#isInBounds(Location) check
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/WorldBorder.java b/src/main/java/org/bukkit/WorldBorder.java
|
2022-08-05 16:10:44 +02:00
|
|
|
index b1c08a7fc5856bcc29ee64d0a87b95a8ac940ddc..0f2f17f0a443ec5087b3373293b23f663be9dbe1 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/WorldBorder.java
|
|
|
|
+++ b/src/main/java/org/bukkit/WorldBorder.java
|
2022-08-05 16:10:44 +02:00
|
|
|
@@ -162,4 +162,18 @@ public interface WorldBorder {
|
|
|
|
* @return The absolute maximum center coordinate of the WorldBorder
|
2021-06-11 14:02:28 +02:00
|
|
|
*/
|
2022-08-05 16:10:44 +02:00
|
|
|
public double getMaxCenterCoordinate();
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Checks if the location is within the boundaries of this border.
|
|
|
|
+ *
|
|
|
|
+ * @param location specific location to check
|
|
|
|
+ * @return true if the location is within the bounds of this border, false otherwise.
|
|
|
|
+ * @deprecated use {@link #isInside(Location)} for an upstream compatible replacement
|
|
|
|
+ */
|
|
|
|
+ @Deprecated
|
|
|
|
+ public default boolean isInBounds(@NotNull Location location) {
|
|
|
|
+ return this.isInside(location);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|