mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 04:51:29 +01:00
Merge pull request #324 from Minestom/key-impl-support
NamespaceID should be compatible with other Key Implementations.
This commit is contained in:
commit
6173301a4b
@ -103,11 +103,10 @@ public class NamespaceID implements CharSequence, Key {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if(this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if(!(o instanceof Key)) return false;
|
||||||
NamespaceID that = (NamespaceID) o;
|
final Key that = (Key) o;
|
||||||
return Objects.equals(domain, that.domain) &&
|
return Objects.equals(this.domain, that.namespace()) && Objects.equals(this.path, that.value());
|
||||||
Objects.equals(path, that.path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user