mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 02:10:30 +01:00
30 lines
997 B
Diff
30 lines
997 B
Diff
From 498f77bac894f37bb813f93a2d3da2c127a2384f Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Thu, 6 Nov 2014 18:29:20 -0600
|
|
Subject: [PATCH] Add async chunk load API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
|
index ab73174..c962e7d 100644
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
+++ b/src/main/java/org/bukkit/World.java
|
|
@@ -129,6 +129,15 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|
*/
|
|
public Chunk getChunkAt(Block block);
|
|
|
|
+ // PaperSpigot start - Async chunk load API
|
|
+ public static interface ChunkLoadCallback {
|
|
+ public void onLoad(Chunk chunk);
|
|
+ }
|
|
+ public void getChunkAtAsync(int x, int z, ChunkLoadCallback cb);
|
|
+ public void getChunkAtAsync(Location location, ChunkLoadCallback cb);
|
|
+ public void getChunkAtAsync(Block block, ChunkLoadCallback cb);
|
|
+ // PaperSpigot end
|
|
+
|
|
/**
|
|
* Checks if the specified {@link Chunk} is loaded
|
|
*
|
|
--
|
|
1.9.1
|
|
|