geforkt von Mirrors/Paper
SPIGOT-3748: Throw error message if executing disabled command
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
2eee02bdd6
Commit
9d7599793b
@ -33,7 +33,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo
|
|||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
|
||||||
if (!owningPlugin.isEnabled()) {
|
if (!owningPlugin.isEnabled()) {
|
||||||
return false;
|
throw new CommandException("Cannot execute command '" + commandLabel + "' in plugin " + owningPlugin.getDescription().getFullName() + " - plugin is disabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!testPermission(sender)) {
|
if (!testPermission(sender)) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren