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