22 lines
757 B
Diff
22 lines
757 B
Diff
From 2e924d63585468de921954ade22acf335dd0d643 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 30 Apr 2018 19:27:31 -0400
|
|
Subject: [PATCH] Location.isChunkLoaded() API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
|
index 0939a807..6c8b8edd 100644
|
|
--- a/src/main/java/org/bukkit/Location.java
|
|
+++ b/src/main/java/org/bukkit/Location.java
|
|
@@ -533,6 +533,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
|
return this;
|
|
}
|
|
|
|
+ public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (obj == null) {
|
|
--
|
|
2.25.0.windows.1
|
|
|