mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
SPIGOT-7383: Add EntityDamageEvent.DamageCause#KILL and EntityDamageEvent.DamageCause#WORLD_BORDER
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
486c2ad801
commit
192986747c
@ -8,6 +8,7 @@ import java.util.EnumMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.WorldBorder;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
@ -260,6 +261,18 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
|||||||
*/
|
*/
|
||||||
public enum DamageCause {
|
public enum DamageCause {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Damage caused by /kill command
|
||||||
|
* <p>
|
||||||
|
* Damage: {@link Float#MAX_VALUE}
|
||||||
|
*/
|
||||||
|
KILL,
|
||||||
|
/**
|
||||||
|
* Damage caused by the World Border
|
||||||
|
* <p>
|
||||||
|
* Damage: {@link WorldBorder#getDamageAmount()}
|
||||||
|
*/
|
||||||
|
WORLD_BORDER,
|
||||||
/**
|
/**
|
||||||
* Damage caused when an entity contacts a block such as a Cactus,
|
* Damage caused when an entity contacts a block such as a Cactus,
|
||||||
* Dripstone (Stalagmite) or Berry Bush.
|
* Dripstone (Stalagmite) or Berry Bush.
|
||||||
@ -356,7 +369,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
|||||||
* Damage caused by committing suicide.
|
* Damage caused by committing suicide.
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Note:</b> This is currently only used by plugins, default commands
|
* <b>Note:</b> This is currently only used by plugins, default commands
|
||||||
* like /minecraft:kill use {@link #VOID} to damage players.
|
* like /minecraft:kill use {@link #KILL} to damage players.
|
||||||
* <p>
|
* <p>
|
||||||
* Damage: variable
|
* Damage: variable
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user