BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
334 stars 136 forks source link

console flooded with PlayerMoveEvent in worlds we are not using it in. #877

Closed mrfloris closed 5 years ago

mrfloris commented 5 years ago

Description

Describe the bug

Woke up today to the console being flooded with a bunch of exception errors that I didn't notice the other day.

[15:49:10 ERROR]: Could not pass event PlayerMoveEvent to BentoBox v1.6.0-SNAPSHOT-b1301
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:507) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:492) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:945) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.PacketPlayInFlying.a(SourceFile:126) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:9) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        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:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:896) [spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831) [spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729) [spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -5, length 3
        at java.lang.String.checkBoundsBeginEnd(String.java:3319) ~[?:?]
        at java.lang.String.substring(String.java:1874) ~[?:?]
        at world.bentobox.bentobox.util.Util.stripName(Util.java:212) ~[?:?]
        at world.bentobox.bentobox.util.Util.sameWorld(Util.java:204) ~[?:?]
        at world.bentobox.acidisland.listeners.AcidEffect.onPlayerMove(AcidEffect.java:86) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor270.invoke(Unknown Source) ~[?:?]
        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:312) ~[spigot-1.13.2.jar:git-Spigot-1a3504a-84f3da3]
        ... 15 more

Steps to reproduce the behavior

I do not know how to reproduce this, do a fresh install and don't touch it, come back a day later? ..

Screenshots and videos

n/a

Expected behavior

I do not expect any exception errors.

Environment

Server

Plugins

CMI, Multiverse-core, Multiverse-inventories, Worldguard, Worldedit, bentobox

BentoBox setup

BentoBox and Addons
>bentobox version
[15:56:03 INFO]: Running SPIGOT 1.13.2.
[15:56:03 INFO]: BentoBox version: 1.6.0-SNAPSHOT-b1301
[15:56:03 INFO]: Database: JSON
[15:56:03 INFO]: Loaded Game Worlds:
[15:56:03 INFO]: acid (acid): Overworld, Nether, End
[15:56:03 INFO]: cave (cave): Overworld, Nether, End
[15:56:03 INFO]: skyblock (skyblock): Overworld, Nether, End
[15:56:03 INFO]: skygrid (skygrid): Overworld, Nether, End
[15:56:03 INFO]: Loaded Addons:
[15:56:03 INFO]: AcidIsland 1.6.0-SNAPSHOT (ENABLED)
[15:56:03 INFO]: BSkyBlock 1.6.0-SNAPSHOT (ENABLED)
[15:56:03 INFO]: CaveBlock ${version}${build.number} (ENABLED)
[15:56:03 INFO]: Level 1.6.0-SNAPSHOT (ENABLED)
[15:56:03 INFO]: MagicCobblestoneGenerator 1.5.0.1 (ENABLED)
[15:56:03 INFO]: SkyGrid 1.6.0 (ENABLED)
>
Configuration

Additional context

mrfloris commented 5 years ago

I see there's an out of bounds notice and mention of acid. I "assume" this might mean there's an issue with player movement in a world when it comes to the acid add-on. I've removed the acid add-on, restarted the server and the problem went away. It doesn't fix it, but at least the console is usable again until this is fixed.

tastybento commented 5 years ago

The issue is that you have worlds on your server that are Nether or End but don't follow the convention of their names ending in "_nether" or "_the_end" so my code is barfing. I'll make it more robust.

tastybento commented 5 years ago

Thank for the report.