13
0
geforkt von Mirrors/Paper
Paper/Spigot-API-Patches/0097-Location.isChunkLoaded-API.patch
2019-04-23 10:35:52 +01:00

22 Zeilen
737 B
Diff

From efd52e4dee3ebc0d26304f02ce2e7ac55a834e96 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 39e57fe1..5c6e25c8 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -505,6 +505,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) {
--
2.21.0