Scripting for Attribute Handling on Players, Items, Totals, etc

This commit is contained in:
Kam committed 2025-03-14 05:35:23 -04:00
1 parent 7f5ba9a1c4
commit 9691c90ffc
13 files changed
+242 -46

No files matched your search

@@ -1,13 +1,15 @@
package kamkeel.npcs.controllers.data.attribute;
import noppes.npcs.api.handler.data.ICustomAttribute;
public class PlayerAttribute implements ICustomAttribute {
private final AttributeDefinition attribute;
private float baseValue;
public float value;
public PlayerAttribute(AttributeDefinition attribute, float baseValue) {
public PlayerAttribute(AttributeDefinition attribute, float value) {
this.attribute = attribute;
this.baseValue = baseValue;
this.value = value;
}
@Override
@@ -17,11 +19,6 @@ public class PlayerAttribute implements ICustomAttribute {
@Override
public float getValue() {
return baseValue;
}
@Override
public void setValue(float value) {
this.baseValue = value;
return value;
}
}