From d4f33a1885d67ed4ee3bb1ae5f1d9816f80338d2 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sun, 23 Jun 2013 17:14:51 +0200 Subject: [PATCH] Do not cast to Double. Rather use Number. --- src/de/craftinc/gates/Gate.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/craftinc/gates/Gate.java b/src/de/craftinc/gates/Gate.java index 7e60530..e96c40b 100644 --- a/src/de/craftinc/gates/Gate.java +++ b/src/de/craftinc/gates/Gate.java @@ -274,13 +274,13 @@ public class Gate implements ConfigurationSerializable exit = LocationUtil.deserializeLocation((Map) map.get(exitKey)); if (map.containsKey(exitPitchKey)) { - exit.setPitch(((Double)map.get(exitPitchKey)).floatValue()); - exit.setYaw(((Double)map.get(exitYawKey)).floatValue()); + exit.setPitch(((Number)map.get(exitPitchKey)).floatValue()); + exit.setYaw(((Number)map.get(exitYawKey)).floatValue()); } if (map.containsKey(locationPitchKey)) { - location.setPitch(((Double)map.get(locationPitchKey)).floatValue()); - location.setYaw(((Double)map.get(locationYawKey)).floatValue()); + location.setPitch(((Number)map.get(locationPitchKey)).floatValue()); + location.setYaw(((Number)map.get(locationYawKey)).floatValue()); } gateBlockLocations = new HashSet();