mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-26 11:07:39 +01:00
Slight optimization in YamlDatabaseHandler
This commit is contained in:
parent
a735bfdf5c
commit
6977a31830
@ -490,17 +490,19 @@ public class YamlDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
|
|||||||
if (clazz.equals(Long.class) && value.getClass().equals(Integer.class)) {
|
if (clazz.equals(Long.class) && value.getClass().equals(Integer.class)) {
|
||||||
return Long.valueOf((Integer) value);
|
return Long.valueOf((Integer) value);
|
||||||
}
|
}
|
||||||
if (clazz.equals(Integer.class) && value.getClass().equals(String.class)) {
|
if (value.getClass().equals(String.class)) {
|
||||||
return Integer.valueOf((String)value);
|
if (clazz.equals(Integer.class)) {
|
||||||
|
return Integer.valueOf((String) value);
|
||||||
}
|
}
|
||||||
if (clazz.equals(Long.class) && value.getClass().equals(String.class)) {
|
if (clazz.equals(Long.class)) {
|
||||||
return Long.valueOf((String)value);
|
return Long.valueOf((String) value);
|
||||||
}
|
}
|
||||||
if (clazz.equals(Double.class) && value.getClass().equals(String.class)) {
|
if (clazz.equals(Double.class)) {
|
||||||
return Double.valueOf((String)value);
|
return Double.valueOf((String) value);
|
||||||
|
}
|
||||||
|
if (clazz.equals(Float.class)) {
|
||||||
|
return Float.valueOf((String) value);
|
||||||
}
|
}
|
||||||
if (clazz.equals(Float.class) && value.getClass().equals(String.class)) {
|
|
||||||
return Float.valueOf((String)value);
|
|
||||||
}
|
}
|
||||||
if (clazz.equals(UUID.class)) {
|
if (clazz.equals(UUID.class)) {
|
||||||
value = UUID.fromString((String)value);
|
value = UUID.fromString((String)value);
|
||||||
|
Loading…
Reference in New Issue
Block a user