mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-11 19:50:38 +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)) {
|
if (!cmd.checkArgs(player, newArgs) || !cmd.canExecute(player, true)) {
|
||||||
return;
|
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) {
|
public boolean checkArgs(PlotPlayer player, String[] args) {
|
||||||
|
|
Loading…
Reference in a new issue