From a455f22a3eb26ba895082db90375d839452161cd Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 29 Oct 2016 21:46:36 +1100 Subject: [PATCH] Fix cast exception with foge --- forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java | 4 ++-- forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java | 4 ++-- forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java | 4 ++-- forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java index 1e2ce731..39135328 100644 --- a/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge110/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -104,10 +104,10 @@ public class FaweForge implements IFawe { @Override public String getWorldName(World world) { if (world instanceof WorldWrapper) { - world = ((WorldWrapper) world).getParent(); + return getWorldName(((WorldWrapper) world).getParent()); } else if (world instanceof EditSession) { - world = ((EditSession) world).getWorld(); + return getWorldName(((EditSession) world).getWorld()); } return getWorldName(((ForgeWorld) world).getWorld()); diff --git a/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java index 265f499c..d6930b40 100644 --- a/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge1710/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -101,10 +101,10 @@ public class FaweForge implements IFawe { @Override public String getWorldName(World world) { if (world instanceof WorldWrapper) { - world = ((WorldWrapper) world).getParent(); + return getWorldName(((WorldWrapper) world).getParent()); } else if (world instanceof EditSession) { - world = ((EditSession) world).getWorld(); + return getWorldName(((EditSession) world).getWorld()); } return getWorldName(((ForgeWorld) world).getWorld()); } diff --git a/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java index fdc89e64..af2eb8d9 100644 --- a/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge189/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -104,10 +104,10 @@ public class FaweForge implements IFawe { @Override public String getWorldName(World world) { if (world instanceof WorldWrapper) { - world = ((WorldWrapper) world).getParent(); + return getWorldName(((WorldWrapper) world).getParent()); } else if (world instanceof EditSession) { - world = ((EditSession) world).getWorld(); + return getWorldName(((EditSession) world).getWorld()); } return getWorldName(((ForgeWorld) world).getWorld()); } diff --git a/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java b/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java index e3a7661d..a04c57ed 100644 --- a/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java +++ b/forge194/src/main/java/com/boydti/fawe/forge/FaweForge.java @@ -104,10 +104,10 @@ public class FaweForge implements IFawe { @Override public String getWorldName(World world) { if (world instanceof WorldWrapper) { - world = ((WorldWrapper) world).getParent(); + return getWorldName(((WorldWrapper) world).getParent()); } else if (world instanceof EditSession) { - world = ((EditSession) world).getWorld(); + return getWorldName(((EditSession) world).getWorld()); } return getWorldName(((ForgeWorld) world).getWorld()); }