SPIGOT-7799, #1039: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent

By: antiPerson <nathat890@outlook.com>
This commit is contained in:
Bukkit/Spigot
2024-07-06 17:19:42 +10:00
parent abc756fce8
commit 58999b263e
3 changed files with 65 additions and 7 deletions

View File

@@ -0,0 +1,37 @@
package org.bukkit;
import org.jetbrains.annotations.ApiStatus;
/**
* Represents the outcome of an explosion.
*/
@ApiStatus.Experimental
public enum ExplosionResult {
/**
* Represents an explosion where no change took place.
*
* This is the case when {@link org.bukkit.GameRule#MOB_GRIEFING} is
* disabled.
*/
KEEP,
/**
* Represents an explosion where all destroyed blocks drop their items.
*
* This is the case when
* {@link org.bukkit.GameRule#TNT_EXPLOSION_DROP_DECAY} or
* {@link org.bukkit.GameRule#BLOCK_EXPLOSION_DROP_DECAY} is disabled.
*/
DESTROY,
/**
* Represents an explosion where explosions cause only some blocks to drop.
*/
DESTROY_WITH_DECAY,
/**
* Represents an explosion where a block change/update has happened.
*
* For example, when a wind charge is used it will cause nearby buttons,
* levers and bells to be activated.
*/
TRIGGER_BLOCK
}