diff --git a/plugin/plugin-core/src/main/java/com/lishid/openinv/OpenInv.java b/plugin/plugin-core/src/main/java/com/lishid/openinv/OpenInv.java index 6c1975d..e37127e 100644 --- a/plugin/plugin-core/src/main/java/com/lishid/openinv/OpenInv.java +++ b/plugin/plugin-core/src/main/java/com/lishid/openinv/OpenInv.java @@ -543,7 +543,17 @@ public class OpenInv extends JavaPlugin implements IOpenInv { } public void releaseAllPlayers(final Plugin plugin) { - this.pluginUsage.removeAll(plugin.getClass()); + Iterator>> iterator = this.pluginUsage.entries().iterator(); + + if (!iterator.hasNext()) { + return; + } + + for (Map.Entry> entry = iterator.next(); iterator.hasNext(); entry = iterator.next()) { + if (entry.getValue().equals(plugin.getClass())) { + iterator.remove(); + } + } } @Override