Add Urgent API for Async Chunks API and use it for Async Teleport
This also cleans up the implementation of Async Chunks to get rid of most Consumer callbacks and instead return futures. This lets us propogate errors correctly up the future chain (barring one isn't lost even deeper in the chain...) So exceptions can now bubble to plugins using getChunkAtAsync
This commit is contained in:
parent
ad8e59dc79
commit
e5f6489602
20 changed files with 308 additions and 147 deletions
|
@ -5,7 +5,7 @@ Subject: [PATCH] Spawn Reason API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 421ad6a91ceb38fd62684d18f109d7cf8526605a..906ee6827dc6956b3c1657bde75ef8481e16dce2 100644
|
||||
index be4d6ca8e8ec4c2e6643eaecc19f11466e14658c..9518da825ed752c5a477ca9132de50f923f9192d 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -17,7 +17,7 @@ index 421ad6a91ceb38fd62684d18f109d7cf8526605a..906ee6827dc6956b3c1657bde75ef848
|
|||
import org.bukkit.generator.ChunkGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -2037,6 +2039,12 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -2146,6 +2148,12 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@NotNull
|
||||
public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz) throws IllegalArgumentException;
|
||||
|
||||
|
@ -30,7 +30,7 @@ index 421ad6a91ceb38fd62684d18f109d7cf8526605a..906ee6827dc6956b3c1657bde75ef848
|
|||
/**
|
||||
* Spawn an entity of a specific class at the given {@link Location}, with
|
||||
* the supplied function run before the entity is added to the world.
|
||||
@@ -2054,7 +2062,28 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
@@ -2163,7 +2171,28 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
* {@link Entity} requested cannot be spawned
|
||||
*/
|
||||
@NotNull
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue