Improved command sync
This commit is contained in:
@@ -62,10 +62,10 @@ public abstract class PluginCommand extends HandledCommand implements CommandExe
|
|||||||
CommandMap commandMap = getCommandMap();
|
CommandMap commandMap = getCommandMap();
|
||||||
|
|
||||||
commandMap.register(this.getPlugin().getName().toLowerCase(), new DelegatedBukkitCommand(this));
|
commandMap.register(this.getPlugin().getName().toLowerCase(), new DelegatedBukkitCommand(this));
|
||||||
|
}
|
||||||
|
|
||||||
Eco.get().syncCommands();
|
Eco.get().syncCommands();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unregisters the command from the server.
|
* Unregisters the command from the server.
|
||||||
@@ -77,6 +77,8 @@ public abstract class PluginCommand extends HandledCommand implements CommandExe
|
|||||||
if (found != null) {
|
if (found != null) {
|
||||||
found.unregister(commandMap);
|
found.unregister(commandMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Eco.get().syncCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user