mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
SPIGOT-5353: Expand explosion API by adding source entity
By: md_5 <git@md-5.net>
This commit is contained in:
parent
5b756e3926
commit
fe63b8897f
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user