Fix compatibility with modified SimplePluginManager in Mohist fork

eab0f722a4/src/main/java/org/bukkit/plugin/SimplePluginManager.java (L674)
This commit is contained in:
Luck 2020-05-20 21:37:07 +01:00
parent 1ca1bcf1d1
commit 13ebc87b29
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -44,6 +44,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -121,6 +122,21 @@ public final class LuckPermsSubscriptionMap extends HashMap<String, Map<Permissi
return super.put(key, value);
}
@Override
public void putAll(Map<? extends String, ? extends Map<Permissible, Boolean>> m) {
m.forEach(this::put);
}
@Override
public Map<Permissible, Boolean> putIfAbsent(String key, Map<Permissible, Boolean> value) {
return get(key);
}
@Override
public Map<Permissible, Boolean> computeIfAbsent(String key, Function<? super String, ? extends Map<Permissible, Boolean>> mappingFunction) {
return get(key);
}
// if the key isn't null and is a string, #get will always return a value for it
@Override
public boolean containsKey(Object key) {