Fixed loading of gates created by version 2.0.0
This commit is contained in:
parent
936619a1b5
commit
bf1f2bcff2
@ -84,13 +84,15 @@ public class Gate extends BaseGate implements ConfigurationSerializable
|
|||||||
location = LocationSerializer.deserializeLocation((Map<String, Object>) map.get(locationKey));
|
location = LocationSerializer.deserializeLocation((Map<String, Object>) map.get(locationKey));
|
||||||
exit = LocationSerializer.deserializeLocation((Map<String, Object>) map.get(exitKey));
|
exit = LocationSerializer.deserializeLocation((Map<String, Object>) map.get(exitKey));
|
||||||
|
|
||||||
if (exit != null) {
|
if (map.containsKey(exitPitchKey)) {
|
||||||
exit.setPitch(((Double)map.get(exitPitchKey)).floatValue());
|
exit.setPitch(((Double)map.get(exitPitchKey)).floatValue());
|
||||||
exit.setYaw(((Double)map.get(exitYawKey)).floatValue());
|
exit.setYaw(((Double)map.get(exitYawKey)).floatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
location.setPitch(((Double)map.get(locationPitchKey)).floatValue());
|
if (map.containsKey(locationPitchKey)) {
|
||||||
location.setYaw(((Double)map.get(locationYawKey)).floatValue());
|
location.setPitch(((Double)map.get(locationPitchKey)).floatValue());
|
||||||
|
location.setYaw(((Double)map.get(locationYawKey)).floatValue());
|
||||||
|
}
|
||||||
|
|
||||||
gateBlockLocations = new HashSet<Location>();
|
gateBlockLocations = new HashSet<Location>();
|
||||||
List<Map<String, Object>> serializedGateBlocks = (List<Map<String, Object>>)map.get(gateBlocksKey);
|
List<Map<String, Object>> serializedGateBlocks = (List<Map<String, Object>>)map.get(gateBlocksKey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user