Fixed the fuzzy matcher

This commit is contained in:
Matthew Miller
2018-06-14 17:14:54 +10:00
parent a71e39d777
commit b292a39765
5 changed files with 78 additions and 24 deletions

View File

@ -19,6 +19,8 @@
package com.sk89q.worldedit.world.registry.state.value;
import java.util.Objects;
public class SimpleStateValue implements StateValue {
private String data;
@ -38,4 +40,13 @@ public class SimpleStateValue implements StateValue {
return this.data;
}
@Override
public boolean equals(Object obj) {
return obj instanceof StateValue && Objects.equals(((StateValue) obj).getData(), getData());
}
@Override
public int hashCode() {
return this.data.hashCode();
}
}