mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Don't throw commands if the plugin is disabled
This commit is contained in:
parent
1de6f5bef8
commit
0b35cd8127
1 changed files with 4 additions and 0 deletions
|
@ -27,6 +27,10 @@ public final class PluginCommand extends Command {
|
||||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
|
||||||
|
if (!owningPlugin.isEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
success = executor.onCommand(sender, this, commandLabel, args);
|
success = executor.onCommand(sender, this, commandLabel, args);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue