Catch CommandException

This commit is contained in:
Jesse Boyd 2016-07-14 20:29:11 +10:00
parent ba568a3f60
commit 76bce7c0ef

View File

@ -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) {