CuboidSelection casting not working

Discussion in 'Programming Help' started by Notoh, Oct 1, 2016.

  1. Notoh

    Notoh New Member

    So I have a method to make sure there is a WE selection of my thing, but when I start my server I get this error:

    Code (Text):

    [16:43:07] [Server thread/ERROR]: Error occurred while enabling DvZRemake v0.4.4 (Is it up to date?)
    java.lang.ClassCastException: org.bukkit.configuration.MemorySection cannot be cast to org.bukkit.Location
        at me.notoh.dvz.main.dvzMaps.<init>(dvzMaps.java:46) ~[?:?]
        at me.notoh.dvz.main.dvzMapManager.setup(dvzMapManager.java:25) ~[?:?]
        at me.notoh.dvz.main.dvzEventHandler.onEnable(dvzEventHandler.java:59) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8-R0.1-SNAPSHOT.jar:git-Spigot-21fe707-e1ebe52]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
    [16:43:07] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
     
    And it the stack trace leads to:
    Code (Text):

            this.boundsofarena = new CuboidSelection(
                    (org.bukkit.World)Bukkit.getServer().getWorld((String)dvzConfig.getMaps().get(id + ".world")),
                    (Location) dvzConfig.getMaps().get(id + ".cornerA"),
                    (Location) dvzConfig.getMaps().get(id + ".cornerB"));
     
    For some reason it is saying it is not casting right... wtf?