Package be.seeseemelk.mockbukkit.damage
Class DamageTypeMock
java.lang.Object
be.seeseemelk.mockbukkit.damage.DamageTypeMock
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed,DamageType,Keyed,Translatable
-
Field Summary
Fields inherited from interface org.bukkit.damage.DamageType
ARROW, BAD_RESPAWN_POINT, CACTUS, CRAMMING, DRAGON_BREATH, DROWN, DRY_OUT, EXPLOSION, FALL, FALLING_ANVIL, FALLING_BLOCK, FALLING_STALACTITE, FIREBALL, FIREWORKS, FLY_INTO_WALL, FREEZE, GENERIC, GENERIC_KILL, HOT_FLOOR, IN_FIRE, IN_WALL, INDIRECT_MAGIC, LAVA, LIGHTNING_BOLT, MAGIC, MOB_ATTACK, MOB_ATTACK_NO_AGGRO, MOB_PROJECTILE, ON_FIRE, OUT_OF_WORLD, OUTSIDE_BORDER, PLAYER_ATTACK, PLAYER_EXPLOSION, SONIC_BOOM, STALAGMITE, STARVE, STING, SWEET_BERRY_BUSH, THORNS, THROWN, TRIDENT, UNATTRIBUTED_FIREBALL, WITHER, WITHER_SKULL -
Constructor Summary
ConstructorsConstructorDescriptionDamageTypeMock(@NotNull DamageScaling damageScaling, @NotNull DamageEffectMock damageEffect, @NotNull NamespacedKey key, @NotNull DeathMessageType deathMessageType, float exhaustion) DamageTypeMock(com.google.gson.JsonObject data) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic DamageTypeMockfrom(com.google.gson.JsonObject data) Create aDamageTypeMockfrom aJsonObject.@NotNull DamageEffect@NotNull DamageScaling@NotNull DeathMessageTypefloat@NotNull NamespacedKeygetKey()@NotNull String
-
Constructor Details
-
DamageTypeMock
public DamageTypeMock(@NotNull @NotNull DamageScaling damageScaling, @NotNull @NotNull DamageEffectMock damageEffect, @NotNull @NotNull NamespacedKey key, @NotNull @NotNull DeathMessageType deathMessageType, float exhaustion) -
DamageTypeMock
Deprecated, for removal: This API element is subject to removal in a future version.Will be replaced with {from(JsonObject)}.
-
-
Method Details
-
from
Create aDamageTypeMockfrom aJsonObject.Example:
{ "key": "minecraft:in_fire", "damageScaling": "WHEN_CAUSED_BY_LIVING_NON_PLAYER", "sound": "minecraft:entity.player.hurt_on_fire", "deathMessageType": "DEFAULT", "exhaustion": 0.1 }- Parameters:
data- The json data.- Returns:
- The damage type created from the JSON
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceDamageType- Specified by:
getTranslationKeyin interfaceTranslatable
-
getDamageScaling
- Specified by:
getDamageScalingin interfaceDamageType
-
getDamageEffect
- Specified by:
getDamageEffectin interfaceDamageType
-
getDeathMessageType
- Specified by:
getDeathMessageTypein interfaceDamageType
-
getExhaustion
public float getExhaustion()- Specified by:
getExhaustionin interfaceDamageType
-
getKey
-
from(JsonObject)}.