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;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.MapMaker;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
@ -18,6 +17,7 @@ import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Matcher;
|
||||
import org.bukkit.Server;
|
||||
@ -472,7 +472,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
Map<Permissible, Boolean> map = permSubs.get(name);
|
||||
|
||||
if (map == null) {
|
||||
map = new MapMaker().weakKeys().makeMap();
|
||||
map = new WeakHashMap<Permissible, Boolean>();
|
||||
permSubs.put(name, map);
|
||||
}
|
||||
|
||||
@ -507,7 +507,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
Map<Permissible, Boolean> map = defSubs.get(op);
|
||||
|
||||
if (map == null) {
|
||||
map = new MapMaker().weakKeys().makeMap();
|
||||
map = new WeakHashMap<Permissible, Boolean>();
|
||||
defSubs.put(op, map);
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren