Skip to content

CansteinBerlin/AttributeManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AttributeManager

A Paper plugin for easily modifying entity attributes in a controlled manner. Allows server admins to set per-entity or server-wide global attribute values, with values persisting across player reconnects.

Commands

Each enabled attribute registers its own command based on the attribute name (e.g. scale, max_health/max_health).

/<attribute> <selector|global> <set|reset> [value]
Form Description
/<attribute> <selector> set <value> Sets the attribute to value for all matched entities
/<attribute> <selector> reset Resets the attribute to its default (or global value if one is active) for matched entities
/<attribute> global set <value> Sets a server-wide default applied to all online players and any player who joins
/<attribute> global reset Clears the global default, restoring per-entity overrides or Minecraft defaults on join

<selector> accepts any valid Minecraft entity selector, e.g. @a, @p, PlayerName, @e[type=zombie].

Examples

/scale global set 0.5
/max_health @a set 40
/movement_speed PlayerName reset
/scale global reset

Permissions

Each attribute command has its own permission node:

attributemanager.command.<attribute_key>

The <attribute_key> is the full Minecraft namespaced key value of the attribute, e.g.:

Command Permission
/scale attributemanager.command.generic.scale
/max_health attributemanager.command.generic.max_health
/movement_speed attributemanager.command.generic.movement_speed

Enabling attributes

Each attribute is disabled by default. Set an attribute to true to register its command. A server restart is required after changing these.

Available attributes:

Key Description
armor Armor points
armor_toughness Armor toughness
attack_damage Melee attack damage
attack_knockback Attack knockback
attack_speed Attack speed
block_break_speed Block breaking speed
block_interaction_range Block interaction range
burning_time Duration entities burn
entity_interaction_range Entity interaction range
explosion_knockback_resistance Explosion knockback resistance
fall_damage_multiplier Fall damage multiplier
flying_speed Flying speed
follow_range Mob follow range
gravity Gravity strength
jump_strength Jump height
knockback_resistance Knockback resistance
luck Luck
max_absorption Max absorption hearts
max_health Max health
mining_efficiency Mining efficiency
movement_efficiency Movement efficiency
movement_speed Movement speed
oxygen_bonus Underwater breathing bonus
safe_fall_distance Safe fall distance
scale Entity scale (size)
sneaking_speed Sneaking speed
spawn_reinforcements Zombie reinforcement chance
step_height Step height
submerged_mining_speed Mining speed while submerged
sweeping_damage_ration Sweeping damage ratio
water_movement_efficiency Water movement efficiency

Language

All player-facing messages are configurable under lang: using & color codes.

How global vs. per-entity values interact

  • global set applies a value to all currently online players and stores it as the server default for new joins.
  • <selector> set stores a per-entity override on top of the global value.
  • <selector> reset removes the per-entity override; the player reverts to the global value (if active) or the Minecraft default.
  • global reset clears the global default; players with a per-entity override keep it, others revert to the Minecraft default.
  • Values are applied again on player join, so they survive disconnects.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages