9
0
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:
Auxilor
2021-03-13 14:25:26 +00:00
parent 77931479a3
commit 01cd2cdbef
3 changed files with 14 additions and 1 deletions

View File

@@ -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());

View File

@@ -10,6 +10,7 @@ bossbar:
max-health: 600
attack-damage: 50
movement-speed: 0.6
spawn-totem:
enabled: true

View File

@@ -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