Skip to content

Commit

Permalink
Maybe this will help?
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Feb 26, 2018
1 parent 1dfe778 commit 1ea22c8
Showing 1 changed file with 11 additions and 4 deletions.
Expand Up @@ -81,10 +81,17 @@ public Mine(Document document) throws MineException {

hasSpawn = (boolean) document.get("hasSpawn");
if (hasSpawn) {
spawn = new Location(worldOptional.get(), (double) document.get("spawnX"),
(double) document.get("spawnY"), (double) document.get("spawnZ"),
((Double) document.get("spawnPitch")).floatValue(),
((Double) document.get("spawnYaw")).floatValue());
try {
spawn = new Location(worldOptional.get(), (double) document.get("spawnX"),
(double) document.get("spawnY"), (double) document.get("spawnZ"),
((Double) document.get("spawnPitch")).floatValue(),
((Double) document.get("spawnYaw")).floatValue());
}catch(ClassCastException e){
spawn = new Location(worldOptional.get(), (double) document.get("spawnX"),
(double) document.get("spawnY"), (double) document.get("spawnZ"),
((Float) document.get("spawnPitch")),
((Float) document.get("spawnYaw")));
}
}

worldName = worldOptional.get().getName();
Expand Down

0 comments on commit 1ea22c8

Please sign in to comment.