Merge branch 'master' into pre/1.13

This commit is contained in:
Shane Freeder
2018-08-17 05:10:45 +01:00
18 changed files with 225 additions and 87 deletions

View File

@@ -1,4 +1,4 @@
From c38195222988bd5699993de420938b81bda0b0c2 Mon Sep 17 00:00:00 2001
From eb5718c051248c4902e979e9ff35028a9356ed1b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:24:42 -0500
Subject: [PATCH] Expand Explosions API
@@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index c1689168..d0d86e1a 100644
index 162a76e8b..056a4d6bb 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -711,6 +711,84 @@ public class Location implements Cloneable, ConfigurationSerializable {
@@ -745,6 +745,87 @@ public class Location implements Cloneable, ConfigurationSerializable {
}
return world.getNearbyEntitiesByType(clazz, this, xRadius, yRadius, zRadius, predicate);
}
@@ -58,6 +58,7 @@ index c1689168..d0d86e1a 100644
+ *
+ * Will break blocks and ignite blocks on fire.
+ *
+ * @param source The source entity of the explosion
+ * @param power The power of explosion, where 4F is TNT
+ * @return false if explosion was canceled, otherwise true
+ */
@@ -71,6 +72,7 @@ index c1689168..d0d86e1a 100644
+ *
+ * Will break blocks.
+ *
+ * @param source The source entity of the explosion
+ * @param power The power of explosion, where 4F is TNT
+ * @param setFire Whether or not to set blocks on fire
+ * @return false if explosion was canceled, otherwise true
@@ -83,6 +85,7 @@ index c1689168..d0d86e1a 100644
+ * Creates explosion at this location with given power and optionally
+ * setting blocks on fire, with the specified entity as the source.
+ *
+ * @param source The source entity of the explosion
+ * @param power The power of explosion, where 4F is TNT
+ * @param setFire Whether or not to set blocks on fire
+ * @param breakBlocks Whether or not to have blocks be destroyed
@@ -95,10 +98,10 @@ index c1689168..d0d86e1a 100644
@Override
public boolean equals(Object obj) {
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index fd3a63fa..81d9e1df 100644
index 5630c624a..ef3a2f2d2 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -857,6 +857,99 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -890,6 +890,102 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public boolean createExplosion(Location loc, float power, boolean setFire);
@@ -108,6 +111,7 @@ index fd3a63fa..81d9e1df 100644
+ * setting blocks on fire, with the specified entity as the source.
+ *
+ * @param source The source entity of the explosion
+ * @param loc Location to blow up
+ * @param power The power of explosion, where 4F is TNT
+ * @param setFire Whether or not to set blocks on fire
+ * @param breakBlocks Whether or not to have blocks be destroyed
@@ -122,6 +126,7 @@ index fd3a63fa..81d9e1df 100644
+ * Will destroy other blocks
+ *
+ * @param source The source entity of the explosion
+ * @param loc Location to blow up
+ * @param power The power of explosion, where 4F is TNT
+ * @param setFire Whether or not to set blocks on fire
+ * @return false if explosion was canceled, otherwise true
@@ -134,6 +139,7 @@ index fd3a63fa..81d9e1df 100644
+ * Will set blocks on fire and destroy blocks.
+ *
+ * @param source The source entity of the explosion
+ * @param loc Location to blow up
+ * @param power The power of explosion, where 4F is TNT
+ * @return false if explosion was canceled, otherwise true
+ */