mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
Don't throw commands if the plugin is disabled
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
de5eddce7d
commit
bfad019c31
@ -27,6 +27,10 @@ public final class PluginCommand extends Command {
|
||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||
boolean success = false;
|
||||
|
||||
if (!owningPlugin.isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
success = executor.onCommand(sender, this, commandLabel, args);
|
||||
} catch (Throwable ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user