mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-23 00:15:08 +00:00
Correct players not being properly released
This commit is contained in:
parent
a469c732cc
commit
adc35e9ad5
1 changed files with 11 additions and 1 deletions
|
@ -543,7 +543,17 @@ public class OpenInv extends JavaPlugin implements IOpenInv {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void releaseAllPlayers(final Plugin plugin) {
|
public void releaseAllPlayers(final Plugin plugin) {
|
||||||
this.pluginUsage.removeAll(plugin.getClass());
|
Iterator<Map.Entry<String, Class<? extends Plugin>>> iterator = this.pluginUsage.entries().iterator();
|
||||||
|
|
||||||
|
if (!iterator.hasNext()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Map.Entry<String, Class<? extends Plugin>> entry = iterator.next(); iterator.hasNext(); entry = iterator.next()) {
|
||||||
|
if (entry.getValue().equals(plugin.getClass())) {
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue