catch ClassCastException in the ItemDatabase update method (#563)

This commit is contained in:
Joo200 2023-08-14 21:01:49 +02:00 committed by GitHub
parent 9bbd6028d0
commit f3cf4cd96e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ public class ItemDatabase {
item.setBase64ItemCode(Base64.encodeObject(yaml.dump(itemStack)));
itemDao.update(item);
updated.getAndIncrement();
} catch (YAMLException e) {
} catch (YAMLException | ClassCastException e) {
ChestShop.getBukkitLogger().log(Level.SEVERE, "YAML of the item with ID " + Base62.encode(item.getId()) + " (" + item.getId() + ") is corrupted: \n" + serialized);
}
}