Do not cast to Double. Rather use Number.
This commit is contained in:
parent
b50a2b27d3
commit
d4f33a1885
@ -274,13 +274,13 @@ public class Gate implements ConfigurationSerializable
|
|||||||
exit = LocationUtil.deserializeLocation((Map<String, Object>) map.get(exitKey));
|
exit = LocationUtil.deserializeLocation((Map<String, Object>) map.get(exitKey));
|
||||||
|
|
||||||
if (map.containsKey(exitPitchKey)) {
|
if (map.containsKey(exitPitchKey)) {
|
||||||
exit.setPitch(((Double)map.get(exitPitchKey)).floatValue());
|
exit.setPitch(((Number)map.get(exitPitchKey)).floatValue());
|
||||||
exit.setYaw(((Double)map.get(exitYawKey)).floatValue());
|
exit.setYaw(((Number)map.get(exitYawKey)).floatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (map.containsKey(locationPitchKey)) {
|
if (map.containsKey(locationPitchKey)) {
|
||||||
location.setPitch(((Double)map.get(locationPitchKey)).floatValue());
|
location.setPitch(((Number)map.get(locationPitchKey)).floatValue());
|
||||||
location.setYaw(((Double)map.get(locationYawKey)).floatValue());
|
location.setYaw(((Number)map.get(locationYawKey)).floatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
gateBlockLocations = new HashSet<Location>();
|
gateBlockLocations = new HashSet<Location>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user