mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Catch CommandException
This commit is contained in:
parent
ba568a3f60
commit
76bce7c0ef
@ -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;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
cmd.execute(player, newArgs, confirm, whenDone);
|
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 New Issue
Block a user