3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-API-Patches/0096-Location.isChunkLoaded-API.patch

22 Zeilen
737 B
Diff

2018-07-23 10:39:55 +02:00
From d6390344700e8736df3210e7fe2b54d942dd0b3f 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
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) {
--
2.18.0
2018-05-01 01:27:59 +02:00