9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2026-01-06 15:41:56 +00:00

fix: "attribute modifier already applied" error, close #348

This commit is contained in:
William
2024-07-26 16:44:04 +01:00
parent 8e9850dd19
commit 83b5209a75
2 changed files with 8 additions and 2 deletions

View File

@@ -366,7 +366,13 @@ public interface Data {
@Override
public boolean equals(Object obj) {
return obj instanceof Modifier modifier && modifier.uuid().equals(uuid());
if (obj instanceof Modifier other) {
if (uuid == null || other.uuid == null) {
return name.equals(other.name);
}
return uuid.equals(other.uuid);
}
return super.equals(obj);
}
public double modify(double value) {