Update Upstream

This commit is contained in:
Spottedleaf
2019-05-05 19:58:04 -07:00
parent 52cd8744e0
commit f9f71eb14e
321 changed files with 809 additions and 856 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add "getNearbyXXX" methods to Location
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 34e90167..f3ae58ee 100644
index 4f695faf..5730d5f4 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -0,0 +0,0 @@ import org.bukkit.util.Vector;
@@ -41,6 +41,7 @@ index 34e90167..f3ae58ee 100644
+ */
+ @NotNull
+ public Collection<Entity> getNearbyEntities(double x, double y, double z) {
+ World world = this.getWorld();
+ if (world == null) {
+ throw new IllegalArgumentException("Location has no world");
+ }
@@ -263,6 +264,7 @@ index 34e90167..f3ae58ee 100644
+ */
+ @NotNull
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(@Nullable Class<? extends Entity> clazz, double xRadius, double yRadius, double zRadius, @Nullable Predicate<T> predicate) {
+ World world = this.getWorld();
+ if (world == null) {
+ throw new IllegalArgumentException("Location has no world");
+ }