2020-04-02 23:07:06 +02:00
|
|
|
From 6f24ef7d7b7146b9d2c032252b7866657b31c3a1 Mon Sep 17 00:00:00 2001
|
2018-05-01 01:27:59 +02: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
|
2020-04-02 23:07:06 +02:00
|
|
|
index 0939a8070..6c8b8eddc 100644
|
2018-05-01 01:27:59 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Location.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Location.java
|
2019-05-06 04:58:04 +02:00
|
|
|
@@ -533,6 +533,7 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
2018-05-01 01:27:59 +02:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2019-05-06 04:58:04 +02:00
|
|
|
+ public boolean isChunkLoaded() { return this.getWorld().isChunkLoaded(locToBlock(x) >> 4, locToBlock(z) >> 4); } // Paper
|
2018-05-01 01:27:59 +02:00
|
|
|
@Override
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (obj == null) {
|
|
|
|
--
|
2020-04-02 23:07:06 +02:00
|
|
|
2.25.1
|
2018-05-01 01:27:59 +02:00
|
|
|
|