CommandHelper

CommandHelper

46.5k Downloads

set_itemmeta() error

Silversunset01 opened this issue ยท 3 comments

commented

Hello! I took a chance on running CH on a 1.16.1 paper server and came across this issue where set_itemmeta() is erroring out. Thought i'd pass it along in case you needed to know.

my test server is currently running paper (API version 1.16.1-R0.1-SNAPSHOT)

the command i was trying to run is (using the example from the methodscript docs to make sure it wasnt just my mistake):

*:/testmeta [$] = >>>
	set_itemmeta(null, array(display: 'Amazing Sword', lore: array('Look at my sword', 'my sword is amazing')))
<<<

the error i received was this:

[21:25:18] [Server thread/INFO]: Silversunset issued server command: /testmeta
[21:25:18] [Server thread/INFO]: [CommandHelper] Running alias on Silversunset ---> /testmeta
[21:25:18] [Server thread/WARN]: [0;31;22mUh oh! You've found an error in [0;36;22mCore[0;31;22m.
[21:25:18] [Server thread/WARN]: This happened while running your code, so you may be able to find a workaround, (though since this is an Error, maybe not) but is ultimately an issue in Core.
[21:25:18] [Server thread/WARN]: The following code caused the error:
[21:25:18] [Server thread/WARN]: [0;37;22mset_itemmeta(null, {display: Amazing Sword, lore: {Look at my sword, my sword is amazing}})
[21:25:18] [Server thread/WARN]: [0;31;22mon or around [0;33;22m/home/maynard/test/plugins/CommandHelper/LocalPackages/itemlore.msa[0;37;22m:[0;36;22m25[0;31;22m.
[21:25:18] [Server thread/WARN]: Please report this to the developers, and be sure to include the version numbers:
[21:25:18] [Server thread/WARN]: [0;36;22mServer[0;31;22m version: [m1.16.1-R0.1-SNAPSHOT[0;31;22m;
[21:25:18] [Server thread/WARN]: [0;36;22mCommandHelper[0;31;22m version: [m3.3.4[0;31;22m;
[21:25:18] [Server thread/WARN]: Loaded extensions and versions:
[21:25:18] [Server thread/WARN]: [0;36;22mCore[0;31;22m ([m3.3.4[0;31;22m)
[21:25:18] [Server thread/WARN]: Here's the stacktrace:
[21:25:18] [Server thread/WARN]: [mjava.lang.NoClassDefFoundError: org/bukkit/inventory/meta/CompassMeta
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.abstraction.bukkit.BukkitConvertor.BukkitGetCorrectMeta(BukkitConvertor.java:576)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.abstraction.bukkit.BukkitMCItemFactory.getItemMeta(BukkitMCItemFactory.java:51)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.ObjectGenerator.itemMeta(ObjectGenerator.java:678)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.functions.ItemMeta$set_itemmeta.exec(ItemMeta.java:199)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.Script.eval(Script.java:409)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:2771)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:2729)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.Script.run(Script.java:200)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.core.AliasCore.alias(AliasCore.java:148)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.commandhelper.CommandHelperListener.runAlias(CommandHelperListener.java:62)
[21:25:18] [Server thread/WARN]: 	at com.laytonsmith.commandhelper.CommandHelperListener.onPlayerCommandPreprocess(CommandHelperListener.java:91)
[21:25:18] [Server thread/WARN]: 	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor75.execute(Unknown Source)
[21:25:18] [Server thread/WARN]: 	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[21:25:18] [Server thread/WARN]: 	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[21:25:18] [Server thread/WARN]: 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[21:25:18] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.PlayerConnection.handleCommand(PlayerConnection.java:1900)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:1719)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.PacketPlayInChat.a(PacketPlayInChat.java:47)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.PacketPlayInChat.a(PacketPlayInChat.java:5)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.TickTask.run(SourceFile:18)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.MinecraftServer.aZ(MinecraftServer.java:1136)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.MinecraftServer.executeNext(MinecraftServer.java:1129)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1090)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1004)
[21:25:18] [Server thread/WARN]: 	at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[21:25:18] [Server thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:835)
[21:25:18] [Server thread/WARN]: 
commented

I think you're using an out-dated build of Paper. At this early stage of 1.16.1 development I was assuming every time someone updates CH for 1.16.1 they are also updating the server jar, since there's been some critical fixes. CompassMeta was added on July 1st (build 30 of Paper). The out-dated build period on Spigot was only 1 day when I had added the Compass Meta a day later.

commented

Ah didn't realize I was that far behind on paper. I will update and see if that fixes it!

commented

Alrighty, confirmed the newer version of paper (from today) has this issue fixed. Good to know its an easy fix for next time!