mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
NamespaceID should be compatible with other Key Implementations.
This commit is contained in:
parent
a4e18b95dd
commit
925c2d6090
@ -103,11 +103,10 @@ public class NamespaceID implements CharSequence, Key {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
NamespaceID that = (NamespaceID) o;
|
||||
return Objects.equals(domain, that.domain) &&
|
||||
Objects.equals(path, that.path);
|
||||
if(this == o) return true;
|
||||
if(!(o instanceof Key)) return false;
|
||||
final Key that = (Key) o;
|
||||
return Objects.equals(this.domain, that.namespace()) && Objects.equals(this.path, that.value());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user