mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-03 01:19:42 +01:00
Handle CommandException in WorldGuardPlugin.convertThrowable().
This commit is contained in:
parent
e43ce420a3
commit
a35cb9277e
@ -351,6 +351,8 @@ public String convertThrowable(@Nullable Throwable throwable) {
|
|||||||
return "WorldGuard: Task was interrupted";
|
return "WorldGuard: Task was interrupted";
|
||||||
} else if (throwable instanceof UnresolvedNamesException) {
|
} else if (throwable instanceof UnresolvedNamesException) {
|
||||||
return throwable.getMessage();
|
return throwable.getMessage();
|
||||||
|
} else if (throwable instanceof CommandException) {
|
||||||
|
return throwable.getMessage();
|
||||||
} else {
|
} else {
|
||||||
getLogger().log(Level.WARNING, "WorldGuard encountered an unexpected error", throwable);
|
getLogger().log(Level.WARNING, "WorldGuard encountered an unexpected error", throwable);
|
||||||
return "WorldGuard: An unexpected error occurred! Please see the server console.";
|
return "WorldGuard: An unexpected error occurred! Please see the server console.";
|
||||||
|
Loading…
Reference in New Issue
Block a user