#Index Out Of Bounds when Bukkit.createWorld() is used

1 messages · Page 1 of 1 (latest)

rancid pecan
#

For some reason Bukkit.createWorld() isn't working

I'm just trying to load a world (or create one if it doesn't exist) by name

// I'm 100% sure there's nothing wrong with worldName
loginWorld = Bukkit.createWorld(new WorldCreator(worldName)); // problem is on this line, look at the stacktrace below for info
#

StackTrace

[16:37:09 ERROR]: Error occurred while enabling SCFAlogin v1.0-SNAPSHOT (Is it up to date?)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:659) ~[?:1.8.0_302]
        at java.util.ArrayList.get(ArrayList.java:435) ~[?:1.8.0_302]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.getDefaultGameMode(CraftServer.java:1503) ~[patched_1.12.2.jar:git-Paper-1618]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.createWorld(CraftServer.java:956) ~[patched_1.12.2.jar:git-Paper-1618]
        at org.bukkit.Bukkit.createWorld(Bukkit.java:488) ~[patched_1.12.2.jar:git-Paper-1618]
        at me.SCFA.login.storage.Config.refreshConfig(Config.java:45) ~[?:?]
        at me.SCFA.login.SCFAlogin.onEnable(SCFAlogin.java:29) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1618]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1618]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1618]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1618]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1618]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:223) ~[patched_1.12.2.jar:git-Paper-1618]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1618]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]

The problem isn't on the world itself. I deleted it and it keeps giving the same errors

#

I looked at the docs but they doesn't talk about possible exceptions

tiny heath
#

Does it occur without paper

#

Looks like something weird to do with the default gamemode

rancid pecan
#

@tiny heath same results with spigot

tiny heath
#

Interesting

#

Not sure what advice to give, you won't get support on the issue tracker since you are using 1.12

rancid pecan
#

Fixed the problem

#

it was just me being extremely stupid