Fix unregisterCommand(s) - second try
This commit is contained in:
parent
f6e41c856c
commit
1a7efeabc4
@ -82,7 +82,7 @@ public class PluginManager
|
||||
*/
|
||||
public void unregisterCommand(Command command)
|
||||
{
|
||||
commandMap.values().remove( command );
|
||||
while ( commandMap.values().remove( command ) );
|
||||
commandsByPlugin.values().remove( command );
|
||||
}
|
||||
|
||||
@ -95,7 +95,8 @@ public class PluginManager
|
||||
{
|
||||
for ( Iterator<Command> it = commandsByPlugin.get( plugin ).iterator(); it.hasNext(); )
|
||||
{
|
||||
commandMap.values().remove( it.next() );
|
||||
Command command = it.next();
|
||||
while ( commandMap.values().remove( command ) );
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user