EventException on change world
SlimeDog opened this issue ยท 3 comments
Spigot 1.13.2
EHM 3.13.1-9bf2604
Multiverse_Core 2.7.0-SNAPSHOT-b747
I do not understand why EHM is involved, since neither the event world (world_city_the_end) nor the destination world (world_city) is configured for EHM.
[22:33:26 INFO]: PLAYER issued server command: /mvtp world_city_the_end
[22:33:27 INFO]: Scanning for legacy world dragon fight...
[22:33:27 INFO]: Found that the dragon has not yet been killed in this world.
[22:33:35 INFO]: PLAYER issued server command: /gamemode creative
[22:35:54 INFO]: PLAYER issued server command: /mvtp city
[22:35:55 ERROR]: Could not pass event PlayerChangedWorldEvent to ExtraHardMode v3.13.1-9bf2604
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:309) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.PlayerList.moveToWorld(PlayerList.java:717) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer.teleport(CraftPlayer.java:624) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity.teleport(CraftEntity.java:295) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at com.onarandombox.MultiverseCore.utils.SimpleSafeTTeleporter.safelyTeleport(SimpleSafeTTeleporter.java:215) ~[?:?]
at com.onarandombox.MultiverseCore.utils.SimpleSafeTTeleporter.teleport(SimpleSafeTTeleporter.java:335) ~[?:?]
at com.onarandombox.MultiverseCore.commands.TeleportCommand.runCommand(TeleportCommand.java:163) ~[?:?]
at com.pneumaticraft.commandhandler.multiverse.CommandHandler.checkAndRunCommand(CommandHandler.java:279) ~[?:?]
at com.pneumaticraft.commandhandler.multiverse.CommandHandler.processFoundCommands(CommandHandler.java:143) ~[?:?]
at com.pneumaticraft.commandhandler.multiverse.CommandHandler.locateAndRunCommand(CommandHandler.java:93) ~[?:?]
at com.onarandombox.MultiverseCore.MultiverseCore.onCommand(MultiverseCore.java:917) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:139) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:702) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1636) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1476) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.a(SourceFile:10) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) [spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:896) [spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831) [spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729) [spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.IllegalArgumentException: Max health must be greater than 0
at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at org.bukkit.craftbukkit.v1_13_R2.entity.CraftLivingEntity.setMaxHealth(CraftLivingEntity.java:118) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
at com.extrahardmode.features.monsters.Glydia.onPlayerChangeWorld(Glydia.java:364) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[spigot-1.13.2.jar-2019-01-24-2305:git-Spigot-f56e2e7-1748af8]
... 29 more
I know I've seen this error before but I guess it might've been on my server and not reported (or GitHub search is failing me, which is entirely possible)... but for some reason I remember this being reported... Because I remember tagging @erik1988 for messing this up for disabled worlds... (he PR'd a change to set the max health of the enderdragon. It's using the value 0 since the world is disabled, and that's what it returns for disabled worlds. There should be a 0 check before attempting to apply.)
That should do it. Thanks.
Return values should always be checked, never assumed good.