geforkt von Mirrors/Paper
Switched to native weak hashmap instead of guavas for SimplePluginManager
By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Ursprung
9dcc5147c6
Commit
6d19165044
@ -1,7 +1,6 @@
|
|||||||
package org.bukkit.plugin;
|
package org.bukkit.plugin;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.MapMaker;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -18,6 +17,7 @@ import java.util.HashSet;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.WeakHashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
@ -472,7 +472,7 @@ public final class SimplePluginManager implements PluginManager {
|
|||||||
Map<Permissible, Boolean> map = permSubs.get(name);
|
Map<Permissible, Boolean> map = permSubs.get(name);
|
||||||
|
|
||||||
if (map == null) {
|
if (map == null) {
|
||||||
map = new MapMaker().weakKeys().makeMap();
|
map = new WeakHashMap<Permissible, Boolean>();
|
||||||
permSubs.put(name, map);
|
permSubs.put(name, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,7 +507,7 @@ public final class SimplePluginManager implements PluginManager {
|
|||||||
Map<Permissible, Boolean> map = defSubs.get(op);
|
Map<Permissible, Boolean> map = defSubs.get(op);
|
||||||
|
|
||||||
if (map == null) {
|
if (map == null) {
|
||||||
map = new MapMaker().weakKeys().makeMap();
|
map = new WeakHashMap<Permissible, Boolean>();
|
||||||
defSubs.put(op, map);
|
defSubs.put(op, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren