mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-11 11:40:41 +00:00
Catch CommandException
This commit is contained in:
parent
ba568a3f60
commit
76bce7c0ef
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue