mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Location.isChunkLoaded() API
This commit is contained in:
parent
dbc775c09c
commit
0eba89f673
1 changed files with 21 additions and 0 deletions
21
Spigot-API-Patches/0101-Location.isChunkLoaded-API.patch
Normal file
21
Spigot-API-Patches/0101-Location.isChunkLoaded-API.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
From b471767c119f5c816db37bd7ba3d0e845feb2792 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 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.17.0
|
||||
|
Loading…
Reference in a new issue