mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-08-26 07:45:34 +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)) {
|
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) {
|
||||||
|
Reference in New Issue
Block a user