mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 10:12:06 -07:00
SPIGOT-5353: Expand explosion API by adding source entity
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -990,6 +990,21 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
*/
|
||||
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks);
|
||||
|
||||
/**
|
||||
* Creates explosion at given coordinates with given power and optionally
|
||||
* setting blocks on fire or breaking blocks.
|
||||
*
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @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
|
||||
* @param source the source entity, used for tracking damage
|
||||
* @return false if explosion was canceled, otherwise true
|
||||
*/
|
||||
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, @Nullable Entity source);
|
||||
|
||||
/**
|
||||
* Creates explosion at given coordinates with given power
|
||||
*
|
||||
@@ -1010,6 +1025,31 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
/**
|
||||
* Creates explosion at given coordinates with given power and optionally
|
||||
* setting blocks on fire or breaking blocks.
|
||||
*
|
||||
* @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
|
||||
* @return false if explosion was canceled, otherwise true
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks);
|
||||
|
||||
/**
|
||||
* Creates explosion at given coordinates with given power and optionally
|
||||
* setting blocks on fire or breaking blocks.
|
||||
*
|
||||
* @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
|
||||
* @param source the source entity, used for tracking damage
|
||||
* @return false if explosion was canceled, otherwise true
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire, boolean breakBlocks, @Nullable Entity source);
|
||||
|
||||
/**
|
||||
* Gets the {@link Environment} type of this world
|
||||
*
|
||||
|
Reference in New Issue
Block a user