Upgrade cloud & gradle, fix unregistering of plugins command
This commit is contained in:
parent
f444c42a2f
commit
9e54ce35da
10 changed files with 29 additions and 16 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package net.frankheijden.serverutils.bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import net.frankheijden.serverutils.bukkit.entities.BukkitPlugin;
|
||||
|
|
@ -46,6 +47,7 @@ public class ServerUtils extends JavaPlugin {
|
|||
public void onDisable() {
|
||||
super.onDisable();
|
||||
restoreBukkitPluginCommand();
|
||||
RCraftServer.syncCommands(Collections.emptySet());
|
||||
plugin.disable();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -313,12 +313,15 @@ public class BukkitPluginManager extends AbstractPluginManager<Plugin, BukkitPlu
|
|||
return;
|
||||
}
|
||||
|
||||
for (String command : commands) {
|
||||
map.remove(command);
|
||||
List<Command> unregisteredCommands = new ArrayList<>();
|
||||
for (String commandName : commands) {
|
||||
Command command = map.remove(commandName);
|
||||
if (command == null) continue;
|
||||
|
||||
unregisteredCommands.add(command);
|
||||
}
|
||||
|
||||
RCommandDispatcher.removeCommands(Arrays.asList(commands));
|
||||
RCraftServer.updateCommands();
|
||||
unregisterExactCommands(unregisteredCommands);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue