LOOHP/Bookshelf

Bookshelf can not load after updating LWC

Closed this issue · 13 comments

What steps will reproduce the problem?

  1. Remove LWCX
  2. Updating LWC to v.5.0.16 #80
  3. Restarting server

##Desciption:
So. I'm using Bookshelf on my spigot server since first version. Yesterday I updated LWC.
After restarting my server the hook has an misstake or can not finish. Please read the Error.
##Server:
Plugin version: 3.0.8.0
Server version: 3493-Spigot-b081915-9d46b56 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
LWC version: LWC v5.0.16 #80

After updating Bookshelf does not working.
Maybe you can fix this.

LOOHP commented

The LWC supported by Bookshelf is LWCX, since its API has the necessary events for Bookshelves to hook into.
Must you be using the LWC you linked?

Yes. Because LWCX does not support ententies.

LOOHP commented

I'm pretty sure they do, I've always used LWCX and I can set it up to lock Item Frames and Armor Stands.

sorry

I posted first an issue to Transport-Pipes.
He created an update and fixed 11 bugs of this issue.

Now there is an other issue by your plugin.
Watch out please.

[21:53:41] [Server thread/ERROR]: Error occurred while enabling Bookshelf v3.0.8.0 (Is it up to date?)
java.lang.NoClassDefFoundError: com/griefcraft/scripting/event/LWCEntityInteractEvent
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
at com.griefcraft.scripting.ModuleLoader.doesObjectOverrideMethod(ModuleLoader.java:299) ~[?:?]
at com.griefcraft.scripting.ModuleLoader.registerFastCache(ModuleLoader.java:218) ~[?:?]
at com.griefcraft.scripting.ModuleLoader.registerModule(ModuleLoader.java:460) ~[?:?]
at com.loohp.bookshelf.listeners.hooks.LWCEvents.hookLWC(LWCEvents.java:54) ~[?:?]
at com.loohp.bookshelf.Bookshelf.onEnable(Bookshelf.java:295) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:518) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:432) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:612) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:263) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1007) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: com.griefcraft.scripting.event.LWCEntityInteractEvent
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
... 19 more

Wait. I think I update the version from 3.0.8.0 to 3.0.8.8 first.

This is using the latest version of bookshelfs.

[22:17:03] [Server thread/ERROR]: Error occurred while enabling Bookshelf v3.0.8.8 (Is it up to date?)
java.lang.NoClassDefFoundError: com/griefcraft/scripting/event/LWCEntityInteractEvent
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?]
at java.lang.Class.getDeclaredMethods(Class.java:2504) ~[?:?]
at com.griefcraft.scripting.ModuleLoader.doesObjectOverrideMethod(ModuleLoader.java:299) ~[?:?]
at com.griefcraft.scripting.ModuleLoader.registerFastCache(ModuleLoader.java:218) ~[?:?]
at com.griefcraft.scripting.ModuleLoader.registerModule(ModuleLoader.java:460) ~[?:?]
at com.loohp.bookshelf.listeners.hooks.LWCEvents.hookLWC(LWCEvents.java:54) ~[?:?]
at com.loohp.bookshelf.Bookshelf.onEnable(Bookshelf.java:298) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:518) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:432) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:612) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:263) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1007) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3493-Spigot-b081915-9d46b56]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: com.griefcraft.scripting.event.LWCEntityInteractEvent
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
... 19 more

@EventHandler(priority = EventPriority.HIGH)
  public void onProtectionInteract(LWCProtectionInteractEvent event) {
    Player player = event.[getPlayer] 
(https://www.tabnine.com/code/java/methods/com.griefcraft.scripting.event.LWCProtectionInteractEvent/getPlayer)();
    Block block = event.[getProtection] 
(https://www.tabnine.com/code/java/methods/com.griefcraft.scripting.event.LWCProtectionInteractEvent/getProtection)().getBlock();

    if (player == null || block == null) {
      return;
    }

    plugin.getSnitchManager().recordSnitchLWC(player, block, event.[getActions] 
 (https://www.tabnine.com/code/java/methods/com.griefcraft.scripting.event.LWCProtectionInteractEvent/getActions)());
  }
}

ORIGINAL LINK

So. for me it is to much.

I install and use LWCX now.

#12 should fix the issue

LOOHP commented

Merged #12 as 3.0.8.9