Improve handling of runnable used to reset shulker box viewer count #64

Closed
opened 2017-03-21 15:28:30 -04:00 by dartasen · 6 comments
dartasen commented 2017-03-21 15:28:30 -04:00 (Migrated from github.com)

When you open a shulker box with the silent option, an error appears on console but also a message in chat like "Couldn't send silent chest" 👎

Using latest spigot 1.11 🗡

When you open a shulker box with the silent option, an error appears on console but also a message in chat like "Couldn't send silent chest" 👎 Using latest spigot 1.11 🗡
Jikoo commented 2017-03-21 17:37:28 -04:00 (Migrated from github.com)

And the console error would be? Please paste the full trace.

And the console error would be? Please paste the full trace.
dartasen commented 2017-03-22 13:02:04 -04:00 (Migrated from github.com)

``[18:02:13] [Server thread/WARN]: java.lang.IllegalArgumentException: Plugin cannot be null
[18:02:13] [Server thread/WARN]: at org.apache.commons.lang.Validate.notNull(Validate.java:192)
[18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.validate(CraftScheduler.java:400)
[18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:126)
[18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:109)
[18:02:13] [Server thread/WARN]: at org.bukkit.scheduler.BukkitRunnable.runTaskLater(BukkitRunnable.java:64)
[18:02:13] [Server thread/WARN]: at com.lishid.openinv.internal.v1_11_R1.AnySilentContainer.activateContainer(AnySilentContainer.java:275)
[18:02:13] [Server thread/WARN]: at com.lishid.openinv.listeners.PlayerListener.onPlayerInteract(PlayerListener.java:75)
[18:02:13] [Server thread/WARN]: at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
[18:02:13] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[18:02:13] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Method.java:498)
[18:02:13] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
[18:02:13] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[18:02:13] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[18:02:13] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:234)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PlayerInteractManager.a(PlayerInteractManager.java:444)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:904)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:37)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[18:02:13] [Server thread/WARN]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[18:02:13] [Server thread/WARN]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678)
[18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576)
[18:02:13] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:745)

``[18:02:13] [Server thread/WARN]: java.lang.IllegalArgumentException: Plugin cannot be null [18:02:13] [Server thread/WARN]: at org.apache.commons.lang.Validate.notNull(Validate.java:192) [18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.validate(CraftScheduler.java:400) [18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:126) [18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:109) [18:02:13] [Server thread/WARN]: at org.bukkit.scheduler.BukkitRunnable.runTaskLater(BukkitRunnable.java:64) [18:02:13] [Server thread/WARN]: at com.lishid.openinv.internal.v1_11_R1.AnySilentContainer.activateContainer(AnySilentContainer.java:275) [18:02:13] [Server thread/WARN]: at com.lishid.openinv.listeners.PlayerListener.onPlayerInteract(PlayerListener.java:75) [18:02:13] [Server thread/WARN]: at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source) [18:02:13] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [18:02:13] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Method.java:498) [18:02:13] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) [18:02:13] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [18:02:13] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [18:02:13] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [18:02:13] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_11_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:234) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PlayerInteractManager.a(PlayerInteractManager.java:444) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:904) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:37) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [18:02:13] [Server thread/WARN]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [18:02:13] [Server thread/WARN]: at java.util.concurrent.FutureTask.run(FutureTask.java:266) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [18:02:13] [Server thread/WARN]: at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [18:02:13] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:745)
Jikoo commented 2017-03-22 21:04:31 -04:00 (Migrated from github.com)

What server version/OpenInv version? The error is caused by a null plugin instance being returned by the plugin manager, however, that should not be possible unless you're running a version of OpenInv that is not named "OpenInv"- this line.

What server version/OpenInv version? The error is caused by a null plugin instance being returned by the plugin manager, however, that should not be possible unless you're running a version of OpenInv that is not named "OpenInv"- [this line](https://github.com/lishid/OpenInv/blob/f54481e872b7e1c948b4de54fa2c9726b199fd1f/internal/v1_11_R1/src/main/java/com/lishid/openinv/internal/v1_11_R1/AnySilentContainer.java#L275).
dartasen commented 2017-03-25 08:17:56 -04:00 (Migrated from github.com)

Hey, I'm using both latest version of Spigot and Openinv 🥇
Oh sorry, I renamed my plugins to prevent OP moderator to see them

Hey, I'm using both latest version of Spigot and Openinv 🥇 Oh sorry, I renamed my plugins to prevent OP moderator to see them
Jikoo commented 2017-03-25 08:24:21 -04:00 (Migrated from github.com)

Please consider using permissions instead of op status. It's really not a good idea to have someone you don't trust opped. You could also remove their ability to use /plugins and /version.

I'll leave this open because the method used to obtain the plugin instance for use in the runnable is hacky, but I don't consider this to be an OpenInv issue as you're modifying the files.

Please consider using permissions instead of op status. It's really not a good idea to have someone you don't trust opped. You could also remove their ability to use /plugins and /version. I'll leave this open because the method used to obtain the plugin instance for use in the runnable is hacky, but I don't consider this to be an OpenInv issue as you're modifying the files.
Jikoo commented 2017-07-04 13:27:58 -04:00 (Migrated from github.com)

Going to close this. If the new method does not work in 1.11 we'll chalk it up to a Minecraft limitation, and people who want to use older versions will have to suffer with the downsides that come with them. You can now (pending me drafting a release) modify the name in the plugin.yml to your heart's content, though, as stated previously, you really should just use a permissions plugin.

Going to close this. If the new method does not work in 1.11 we'll chalk it up to a Minecraft limitation, and people who want to use older versions will have to suffer with the downsides that come with them. You can now (pending me drafting a release) modify the name in the plugin.yml to your heart's content, though, as stated previously, you really should just use a permissions plugin.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: minster586/OpenInv#64
No description provided.