File Details
HYTALEDEVLIB-0.3.5.jar
- R
- Jan 19, 2026
- 119.11 KB
- 101
- Early Access
File Name
HYTALEDEVLIB-0.3.5.jar
Supported Versions
- Early Access
Version 0.3.5
New Features
StatsHelper - Entity Stats Management
- NEW: Complete entity stats management system for health, stamina, mana, and more
getStat(entity, statName)/setStat(entity, statName, value)- Get/set any stat by nameaddStat(entity, statName, amount)- Add to stat (can be negative to subtract)- Convenience methods - Quick access to common stats
getHealth()/setHealth()- Health statgetStamina()/setStamina()- Stamina statgetMana()/setMana()- Mana statgetOxygen()/setOxygen()- Oxygen stat
- Stat queries
getStatMin()/getStatMax()- Get min/max valuesgetStatPercentage()- Get stat as percentage (0.0 to 1.0)hasStat()- Check if entity has a stat
- Min/Max operations
maximizeStat()- Set stat to maximumminimizeStat()- Set stat to minimumresetStat()- Reset to initial/default value
- Stat modifiers - Add buffs/debuffs to stats
addModifier()- Add custom modifier with target and calculation typeaddAdditiveModifier()- Add flat bonus (e.g., +20 health from armor)addMultiplicativeModifier()- Add percentage bonus (e.g., 1.5x health from potion)removeModifier()- Remove modifier by keygetModifier()- Get modifier by key
- Auto-clamping - Values automatically clamped between min and max
- Modifier stacking - Multiple modifiers with different keys stack
DeathHelper - Entity Death Tracking
- NEW: Complete entity death tracking system with killer info and damage source
onEntityDeath(world, callback)- Register callback for entity deaths- EntityDeath class - Comprehensive death information object with helper methods
getEntityName()- Get name of entity that died (player username or NPC role name)isPlayer()- Check if entity is a playergetKillerName()- Get name of killer entityisKillerPlayer()- Check if killer is a playerwasKilledByEntity()- Check if killed by another entitywasKilledByProjectile()- Check if killed by projectilewasKilledByEnvironment()- Check if killed by environment (fall, drown, etc.)getPosition()- Get death position coordinatesgetDamageInfo()- Get full damage informationgetDamageSource()- Get damage source (EntitySource, ProjectileSource, etc.)getEnvironmentType()- Get environment type if killed by environment
- Automatic name resolution - Extracts player usernames and NPC role names automatically
- NPC role names - Returns actual NPC types (e.g., "Cow", "Skeleton_Fighter", "Deer_Doe")
- ECS integration - Uses
DeathComponentadditions to detect deaths
Changes
EcsEventHelper - Player Entity Access
- ENHANCED: Added player entity parameter to block event callbacks
onBlockBreak(world, callback)- Now has overload withEntity playerEntityparameteronBlockPlace(world, callback)- Now has overload withEntity playerEntityparameteronBlockDamage(world, callback)- Now has overload withEntity playerEntityparameter- Benefits:
- Identify which player broke/placed/damaged blocks
- Access player stats directly in event callbacks
- Apply stat changes based on block interactions
- Check player permissions for block actions
- Track player-specific statistics
- Send messages to specific players
- Backward compatible - Original callbacks without player entity still work
EventHelper - Item Event Player Entity Access
- ENHANCED: Added player entity parameter to item event callbacks
onItemDrop(plugin, callback)- Now has overload withEntity playerEntityparameteronItemPickup(plugin, callback)- Now has overload withEntity playerEntityparameteronCraftRecipe(plugin, callback)- Now has overload withEntity playerEntityparameter- Benefits:
- Identify which player dropped/picked up/crafted items
- Access player stats directly in event callbacks
- Apply stat changes based on item actions (e.g., gain mana on pickup)
- Check player permissions for item actions
- Track player-specific item statistics
- Send targeted messages to specific players
- Backward compatible - Original callbacks without player entity still work
EquipmentHelper - Equipment Change Cancellation
- NEW: Cancel equipment changes to prevent equipping/unequipping specific items
EquipmentChange.setCancelled(true)- Cancel the equipment changeEquipmentChange.isCancelled()- Check if change was cancelled- Automatic reversion - Cancelled changes restore old item to equipment slot and return new item to source inventory
- Preserves item data - Returns items to exact original slots, preserving durability, metadata, and damage

