Class DamageType
java.lang.Object
com.github.darksoulq.abyssallib.world.entity.DamageType
Represents a custom damage type to be registered into the Paper
DamageType registry.
Each DamageType can have custom audio effects, exhaustion, and scaling behavior.
Instances are registered automatically via a DeferredRegistry
in plugin bootstrap.
-
Constructor Summary
ConstructorsConstructorDescriptionDamageType(net.kyori.adventure.key.Key id) Creates a new customDamageTypewith the given identifier. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.github.darksoulq.abyssallib.world.entity.DamageType.Builderbuilder(net.kyori.adventure.key.Key id) voidregister(io.papermc.paper.plugin.bootstrap.BootstrapContext ctx) org.bukkit.damage.DamageSourcewithCause(org.bukkit.entity.Entity cause) org.bukkit.damage.DamageSourcewithDirect(org.bukkit.entity.Entity direct) org.bukkit.damage.DamageSourcewithLocation(org.bukkit.Location loc)
-
Constructor Details
-
DamageType
public DamageType(net.kyori.adventure.key.Key id) Creates a new customDamageTypewith the given identifier.- Parameters:
id- Unique namespaced ID for this damage type.
-
-
Method Details
-
withCause
public org.bukkit.damage.DamageSource withCause(org.bukkit.entity.Entity cause) -
withDirect
public org.bukkit.damage.DamageSource withDirect(org.bukkit.entity.Entity direct) -
withLocation
public org.bukkit.damage.DamageSource withLocation(org.bukkit.Location loc) -
register
public void register(io.papermc.paper.plugin.bootstrap.BootstrapContext ctx) -
builder
public static com.github.darksoulq.abyssallib.world.entity.DamageType.Builder builder(net.kyori.adventure.key.Key id)
-