mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 07:59:28 +00:00
Added movement speed options
This commit is contained in:
@@ -116,6 +116,12 @@ public class EcoBoss extends PluginDependent {
|
||||
@Getter
|
||||
private final int attackDamage;
|
||||
|
||||
/**
|
||||
* The movement speed.
|
||||
*/
|
||||
@Getter
|
||||
private final int movementSpeed;
|
||||
|
||||
/**
|
||||
* The immunity options.
|
||||
*/
|
||||
@@ -253,6 +259,7 @@ public class EcoBoss extends PluginDependent {
|
||||
// Attributes
|
||||
this.attackDamage = this.getConfig().getInt("attack-damage");
|
||||
this.maxHealth = this.getConfig().getInt("max-health");
|
||||
this.movementSpeed = this.getConfig().getInt("movement-speed");
|
||||
|
||||
// Spawn Totem
|
||||
this.spawnTotemEnabled = this.getConfig().getBool("spawn-totem.enabled");
|
||||
@@ -450,6 +457,10 @@ public class EcoBoss extends PluginDependent {
|
||||
entity.setCustomName(this.getDisplayName());
|
||||
entity.setCustomNameVisible(true);
|
||||
|
||||
AttributeInstance movementSpeed = entity.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED);
|
||||
assert movementSpeed != null;
|
||||
movementSpeed.setBaseValue(this.getMovementSpeed());
|
||||
|
||||
AttributeInstance maxHealth = entity.getAttribute(Attribute.GENERIC_MAX_HEALTH);
|
||||
assert maxHealth != null;
|
||||
maxHealth.setBaseValue(this.getMaxHealth());
|
||||
|
||||
@@ -10,6 +10,7 @@ bossbar:
|
||||
|
||||
max-health: 600
|
||||
attack-damage: 50
|
||||
movement-speed: 0.6
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
@@ -8,8 +8,9 @@ bossbar:
|
||||
color: RED # Choose from: BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW
|
||||
style: SOLID # Choose from: SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
|
||||
|
||||
max-health: 900
|
||||
max-health: 1200
|
||||
attack-damage: 80
|
||||
movement-speed: 0.8
|
||||
|
||||
spawn-totem:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user