mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-15 10:45:21 +01:00
Hide item deserialization errors unless using development branch (fixes #550)
This commit is contained in:
parent
957bf70c26
commit
aaa7a3536a
@ -65,7 +65,7 @@ public class EntityStatement {
|
||||
|
||||
resultSet.close();
|
||||
}
|
||||
catch (Exception e) { // only display this exception on development branch
|
||||
catch (Exception e) { // only display exception on development branch
|
||||
if (!ConfigHandler.EDITION_BRANCH.contains("-dev")) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -586,9 +586,18 @@ public class Util extends Queue {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ItemMeta deserializeItemMeta(Class<? extends ItemMeta> itemMetaClass, Map<String, Object> args) {
|
||||
DelegateDeserialization delegate = itemMetaClass.getAnnotation(DelegateDeserialization.class);
|
||||
return (ItemMeta) ConfigurationSerialization.deserializeObject(args, delegate.value());
|
||||
public static ItemMeta deserializeItemMetax(Class<? extends ItemMeta> itemMetaClass, Map<String, Object> args) {
|
||||
try {
|
||||
DelegateDeserialization delegate = itemMetaClass.getAnnotation(DelegateDeserialization.class);
|
||||
return (ItemMeta) ConfigurationSerialization.deserializeObject(args, delegate.value());
|
||||
}
|
||||
catch (Exception e) { // only display exception on development branch
|
||||
if (!ConfigHandler.EDITION_BRANCH.contains("-dev")) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <K, V extends Comparable<? super V>> SortedSet<Map.Entry<K, V>> entriesSortedByValues(Map<K, V> map) {
|
||||
|
Loading…
Reference in New Issue
Block a user