mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-12 18:57:28 +00:00
Use standard (not Identity) HashMaps for OptionKeys and NodeMetadataKeys
This commit is contained in:
3 files changed
+8
-5
No files matched your search
@@ -32,10 +32,12 @@ import java.util.Objects;
|
||||
final class SimpleOptionKey<T> implements OptionKey<T> {
|
||||
private final String name;
|
||||
private final Class<T> type;
|
||||
private final int hashCode;
|
||||
|
||||
SimpleOptionKey(String name, Class<T> type) {
|
||||
this.name = name.toLowerCase();
|
||||
this.type = type;
|
||||
this.hashCode = Objects.hash(this.name, this.type); // cache hashcode
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,6 +66,6 @@ final class SimpleOptionKey<T> implements OptionKey<T> {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.name, this.type);
|
||||
return this.hashCode;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user