Damage.EnvironmentSource
Package: com.hypixel.hytale.server.core.modules.entity.damage
public static class Damage.EnvironmentSource implements Damage.SourceA Damage.Source for damage caused by the environment rather than an entity or command. Carries a string type identifier describing the environmental hazard (e.g., lava, fire, thorns).
Constructor
Section titled “Constructor”public EnvironmentSource(@Nonnull String type)Creates an environment source with the given type identifier.
Methods
Section titled “Methods”@Nonnullpublic String getType()Returns the environment type identifier string.
@Nonnull@Overridepublic Message getDeathMessage(@Nonnull Damage info, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor)Returns a localized death message using the server.general.killedBy translation key, parameterized with the environment type string.
Fields
Section titled “Fields”| Field | Type | Modifiers | Description |
|---|---|---|---|
type | String | private final | The environment hazard type identifier. |
Related Types
Section titled “Related Types”- Damage — the damage event
- Damage.Source — parent interface
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.