2019-02-24 01:17:41 +08:00
|
|
|
From 2b2f63ce1bf3c15f8688b6fb80eed9a83b292114 Mon Sep 17 00:00:00 2001
|
2018-05-01 07:27:59 +08:00
|
|
|
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 5c3d42cc..1ddebf3c 100644
|
|
|
|
--- a/src/main/java/org/bukkit/Location.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Location.java
|
|
|
|
@@ -491,6 +491,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public boolean isChunkLoaded() { return world.isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
|
|
|
@Override
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (obj == null) {
|
|
|
|
--
|
2019-02-24 01:17:41 +08:00
|
|
|
2.20.1
|
2018-05-01 07:27:59 +08:00
|
|
|
|