[ci skip] Use Nullable annotation for Entity source (#9435)
This commit is contained in:
parent
48ea66e97f
commit
d7d3f6371e
2 changed files with 9 additions and 8 deletions
|
@ -6,7 +6,7 @@ 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 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e011e327d 100644
|
||||
index 6693e3d8dc2519facb12db981a6b6325faa095bf..b7ff09ffdd3aecc1843d175bc76fe5fae1f48dde 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||
|
@ -17,10 +17,11 @@ index 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e
|
|||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -568,6 +569,87 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
@@ -568,6 +569,89 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
return centerLoc;
|
||||
}
|
||||
|
||||
+ // Paper start - Expand Explosions API
|
||||
+ /**
|
||||
+ * Creates explosion at this location with given power
|
||||
+ *
|
||||
|
@ -98,9 +99,10 @@ index 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e
|
|||
+ * @param breakBlocks Whether or not to have blocks be destroyed
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) {
|
||||
+ public boolean createExplosion(@Nullable Entity source, float power, boolean setFire, boolean breakBlocks) {
|
||||
+ return this.getWorld().createExplosion(source, this, power, setFire, breakBlocks);
|
||||
+ }
|
||||
+ // Paper end - Expand Explosions API
|
||||
+
|
||||
/**
|
||||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue