testserver/Spigot-API-Patches/0096-Location.isChunkLoaded...

22 lines
747 B
Diff
Raw Normal View History

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