Add API to send game events (#6444)

This commit is contained in:
Jake Potrebic 2021-08-21 07:26:42 -07:00 committed by GitHub
parent ccbb51078a
commit 18d1602724
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 4 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] More World API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index e149ab9b4ccd1b98791c3ebe5e9c7eb97de853af..145780fc900531687036003d3eec2057f205679c 100644
index e149ab9b4ccd1b98791c3ebe5e9c7eb97de853af..4d8be6f200dbe2bd534a7f62152074dca59f9db4 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3564,6 +3564,105 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -3564,6 +3564,114 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@Nullable
public Location locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored);
@ -109,6 +109,15 @@ index e149ab9b4ccd1b98791c3ebe5e9c7eb97de853af..145780fc900531687036003d3eec2057
+ */
+ @NotNull
+ Collection<Material> getInfiniburn();
+
+ /**
+ * Posts a specified game event at a location
+ *
+ * @param sourceEntity optional source entity
+ * @param gameEvent the game event to post
+ * @param position the position in the world where to post the event to listeners
+ */
+ void sendGameEvent(@Nullable Entity sourceEntity, @NotNull GameEvent gameEvent, @NotNull Vector position);
+ // Paper end
+
// Spigot start