Fix Exception error reported by IDE

I am not sure why Eclipse is saying this is an error.
This commit is contained in:
tastybento 2022-03-18 13:59:29 +00:00
parent 6d59e79e78
commit fd44e03b7b

View File

@ -57,7 +57,7 @@ public class IslandInfo {
try {
String dateTimeFormat = plugin.getLocalesManager().get("commands.admin.info.last-login-date-time-format");
formattedDate = new SimpleDateFormat(dateTimeFormat).format(new Date(lastPlayed));
} catch (NullPointerException | IllegalArgumentException ignored) {
} catch (Exception ignored) {
formattedDate = new Date(lastPlayed).toString();
}
user.sendMessage("commands.admin.info.last-login","[date]", formattedDate);