mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Catch CommandException
This commit is contained in:
@ -333,7 +333,11 @@ public abstract class Command {
|
||||
if (!cmd.checkArgs(player, newArgs) || !cmd.canExecute(player, true)) {
|
||||
return;
|
||||
}
|
||||
cmd.execute(player, newArgs, confirm, whenDone);
|
||||
try {
|
||||
cmd.execute(player, newArgs, confirm, whenDone);
|
||||
} catch (CommandException e) {
|
||||
e.perform(player);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkArgs(PlotPlayer player, String[] args) {
|
||||
|
Reference in New Issue
Block a user