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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user