[BUG] Left-click on sign doesn't start the elevator #25

Closed
opened 2020-02-13 07:23:22 +00:00 by SlimeDog · 14 comments
SlimeDog commented 2020-02-13 07:23:22 +00:00 (Migrated from github.com)

Describe the bug
Left-click on sign doesn't start the elevator. It does produce a number of console/log errors (see below).

To Reproduce
Steps to reproduce the behavior:

  • Configure elevator. The elevator is callable from either floor (1 and 2), and moves between floors when called from the floor where it is not currently located. When I right-click the sign in the cabin, the floor number changes.
  • Left-click the sign. The elevator does not move, but console/log errors are generated.

Spigot version:
1.15.2 (Jenkins 2628)

Plugin version
0.5.1 (v10lift info incorrectly reports 0.5)

Console/log errors

[23:14:58] [Server thread/ERROR]: Could not pass event BlockPlaceEvent to BentoBox v1.11.1-SNAPSHOT-b1652
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:541) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:528) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at com.rngservers.irondoors.events.Events.onIronDoor(Events.java:39) ~[?:?]
        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:315) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:541) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:528) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:442) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:441) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1251) ~[?:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
        at world.bentobox.bentobox.listeners.flags.protection.LecternListener.onPlaceBooksOnLectern(LecternListener.java:25) ~[?:?]
        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:315) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e]
        ... 28 more

The location is not on a BentoBox island. This issue may be caused by clicking with a null item, instead of AIR (this issue has arisen with recent Spigot builds), or it may be something else entirely. What is clear: it has nothing to do with BentoBox. See, for example, [https://gitlab.com/RandomUnknown/irondoors/issues/1](this issue) from another plugin.

**Describe the bug** Left-click on sign doesn't start the elevator. It does produce a number of console/log errors (see below). **To Reproduce** Steps to reproduce the behavior: - Configure elevator. The elevator is callable from either floor (1 and 2), and moves between floors when called from the floor where it is not currently located. When I right-click the sign in the cabin, the floor number changes. - Left-click the sign. The elevator does not move, but console/log errors are generated. **Spigot version:** 1.15.2 (Jenkins 2628) **Plugin version** 0.5.1 (**v10lift info** incorrectly reports 0.5) **Console/log errors** ``` [23:14:58] [Server thread/ERROR]: Could not pass event BlockPlaceEvent to BentoBox v1.11.1-SNAPSHOT-b1652 org.bukkit.event.EventException: null at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:319) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:541) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:528) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at com.rngservers.irondoors.events.Events.onIronDoor(Events.java:39) ~[?:?] 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:315) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:541) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:528) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:442) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:441) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1251) ~[?:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] at java.lang.Thread.run(Thread.java:834) [?:?] Caused by: java.lang.NullPointerException at world.bentobox.bentobox.listeners.flags.protection.LecternListener.onPlaceBooksOnLectern(LecternListener.java:25) ~[?:?] 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:315) ~[spigot-1.15.2.jar-2020-02-10-2322:git-Spigot-c574e08-d171d7e] ... 28 more ``` The location is not on a BentoBox island. This issue may be caused by clicking with a null item, instead of AIR (this issue has arisen with recent Spigot builds), or it may be something else entirely. What is clear: it has nothing to do with BentoBox. See, for example, [https://gitlab.com/RandomUnknown/irondoors/issues/1](this issue) from another plugin.
stijnb1234 commented 2020-02-13 09:06:13 +00:00 (Migrated from github.com)

I will check if I can reproduce this issue and fix it.

I will check if I can reproduce this issue and fix it.
SlimeDog commented 2020-02-16 23:38:51 +00:00 (Migrated from github.com)

Thanks. Works like a charm the first time. Doesn't work after that. Right-click still changes the target floor, but left-click doesn't run the elevator.

Thanks. Works like a charm the first time. Doesn't work after that. Right-click still changes the target floor, but left-click doesn't run the elevator.
stijnb1234 commented 2020-02-17 06:12:05 +00:00 (Migrated from github.com)

Any errors on left click?

Any errors on left click?
SlimeDog commented 2020-02-17 06:46:07 +00:00 (Migrated from github.com)
  • There are no errors in-game or in console/log on left-click with object (STONE) in hand. But nothing happens.
  • There are errors generated in console/log on left-click with empty hand, which I assume are related to the issue described above. Is empty hand translated to AIR or null?
  • Right-click continues to function in either case.
  • Call buttons (inputs) continue to function in either case.
- There are no errors in-game or in console/log on left-click with object (STONE) in hand. But nothing happens. - There are errors generated in console/log on left-click with empty hand, which I assume are related to the issue described above. Is empty hand translated to AIR or null? - Right-click continues to function in either case. - Call buttons (inputs) continue to function in either case.
SlimeDog commented 2020-02-17 06:58:41 +00:00 (Migrated from github.com)

It would be good to solve this issue, but as I noted in the Discussion forum, exposing the "run elevator" command would work around it, and get my elevators running.

It would be good to solve this issue, but as I noted in the Discussion forum, exposing the "run elevator" command would work around it, and get my elevators running.
SlimeDog commented 2020-02-17 17:15:07 +00:00 (Migrated from github.com)

I think I've isolated something useful. It seems that the above defect applies in adventure mode (this elevator is in an adventure world). In creative and survival modes, left-click works. That is why the elevator seemed to work occasionally; I was often -- but not always -- in creative mode while building, then in adventure mode for "live" testing. I hope this distinction will help resolve the issue.

I think I've isolated something useful. It seems that the above defect applies in **adventure** mode (this elevator is in an adventure world). In **creative** and **survival** modes, left-click works. That is why the elevator seemed to work occasionally; I was often -- but not always -- in **creative** mode while building, then in **adventure** mode for "live" testing. I hope this distinction will help resolve the issue.
stijnb1234 commented 2020-02-17 17:21:18 +00:00 (Migrated from github.com)

That certainly helps to find a solution. It is indeed true that the lift only works in Survival & Creative. I'll remove that check, because it's unnecessary nowadays.

That certainly helps to find a solution. It is indeed true that the lift only works in Survival & Creative. I'll remove that check, because it's unnecessary nowadays.
stijnb1234 commented 2020-02-17 17:35:01 +00:00 (Migrated from github.com)
  • There are errors generated in console/log on left-click with empty hand, which I assume are related to the issue described above. Is empty hand translated to AIR or null?

This can't be related to my plugin, because I don't have any checks for items in hands (only off hand checks)

> * There are errors generated in console/log on left-click with empty hand, which I assume are related to the issue described above. Is empty hand translated to AIR or null? This can't be related to my plugin, because I don't have any checks for items in hands (only off hand checks)
SlimeDog commented 2020-02-17 17:49:13 +00:00 (Migrated from github.com)

Great! You might want to ensure that the offhand checks use AIR rather than null.

Great! You might want to ensure that the offhand checks use AIR rather than null.
SlimeDog commented 2020-02-17 19:34:23 +00:00 (Migrated from github.com)

That certainly helps to find a solution. It is indeed true that the lift only works in Survival & Creative. I'll remove that check, because it's unnecessary nowadays.

With that resolved, I installed a second elevator in a (survival mode) high-rise. It works great!

> That certainly helps to find a solution. It is indeed true that the lift only works in Survival & Creative. I'll remove that check, because it's unnecessary nowadays. With that resolved, I installed a second elevator in a (survival mode) high-rise. It works great!
stijnb1234 commented 2020-02-17 19:35:49 +00:00 (Migrated from github.com)

Nice! I will close this issue after fixing the adventure problems.

Nice! I will close this issue after fixing the adventure problems.
SlimeDog commented 2020-02-22 15:23:41 +00:00 (Migrated from github.com)

V10Lift 0.5.2
Thanks for the update. Just a note: Still to joy in adventure mode.

V10Lift 0.5.2 Thanks for the update. Just a note: Still to joy in adventure mode.
stijnb1234 commented 2020-02-22 15:26:34 +00:00 (Migrated from github.com)

I know.

This issue is still open for that reason. I need to debug a little bit to find out what the reason is.

I know. This issue is still open for that reason. I need to debug a little bit to find out what the reason is.
SlimeDog commented 2020-02-25 01:19:49 +00:00 (Migrated from github.com)

Suggestion: remove the can't reproduce tag.

Suggestion: remove the **can't reproduce** tag.
Sign in to join this conversation.
No description provided.