<player.item_in_hand.worth> does not work anymore?

n0nnie

Active member
I ran in a strange problem the last days.

If I do /ex narrate <player.item_in_hand> it works.
But /ex narrate <player.item_in_hand.worth> throws an exception I will show in the spoiler.

[08:53:01] [Server thread/INFO]: n0nnie issued server command: /ex narrate <player.item_in_hand>
[08:53:01] [Server thread/INFO]: [0;35;1m [0;37;1mStarting InstantQueue 'EXCOMMAND_KnowledgestormBurlingtonSue'... [m
[08:53:01] [Server thread/INFO]: [0;35;1m [0;37;1m[0;30;1mQueue 'EXCOMMAND_KnowledgestormBurlingtonSue' Executing: NARRATE "<player.item_in_hand>" [m
[08:53:01] [Server thread/INFO]: [0;35;1m+- Executing dCommand: NARRATE/p@n0nnie ---------+ [m
[08:53:01] [Server thread/INFO]: [0;35;1m [0;37;1m[0;30;1mFilled tag <[0;37;1mplayer.item_in_hand[0;30;1m> with '[0;37;1mi@cooked_beef[quantity=31][0;30;1m'. [m
[08:53:01] [Server thread/INFO]: [0;33;1m+> [0;30;1mExecuting '[0;33;1mNARRATE[0;30;1m': [0;30;1mNarrating='[0;33;1mi@cooked_beef[quantity=31][0;30;1m' [0;30;1mTargets='[0;33;1m[p@n0nnie][0;30;1m' [m
[08:53:01] [Server thread/INFO]: [0;35;1m [0;37;1mCompleting queue 'EXCOMMAND_KnowledgestormBurlingtonSue' in 3ms. [m
[08:53:09] [Server thread/INFO]: n0nnie issued server command: /ex narrate <player.item_in_hand.worth>
[08:53:09] [Server thread/INFO]: [0;35;1m [0;37;1mStarting InstantQueue 'EXCOMMAND_LanReferringDocument'... [m
[08:53:09] [Server thread/INFO]: [0;35;1m [0;37;1m[0;30;1mQueue 'EXCOMMAND_LanReferringDocument' Executing: NARRATE "<player.item_in_hand.worth>" [m
[08:53:09] [Server thread/INFO]: [0;35;1m+- Executing dCommand: NARRATE/p@n0nnie ---------+ [m
[08:53:09] [pool-828-thread-1/INFO]: [0;35;1m [0;31;1mERROR in queue 'EXCOMMAND_LanReferringDocument'! [0;37;1mInternal exception was thrown! [m
[08:53:09] [pool-828-thread-1/WARN]: java.lang.NoSuchMethodError: com.earth2me.essentials.Worth.getPrice(Lorg/bukkit/inventory/ItemStack;)Ljava/math/BigDecimal;
[08:53:09] [pool-828-thread-1/WARN]: at com.denizenscript.depenizen.bukkit.extensions.essentials.EssentialsItemExtension.getAttribute(EssentialsItemExtension.java:50)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizen.objects.dItem.getAttribute(dItem.java:1127)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizen.objects.dEntity.getAttribute(dEntity.java:1632)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizen.objects.dPlayer.getAttribute(dPlayer.java:2207)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizen.tags.core.PlayerTags.playerTags(PlayerTags.java:96)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizen.tags.core.PlayerTags$1.run(PlayerTags.java:32)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizencore.tags.TagManager.fireEvent(TagManager.java:109)
[08:53:09] [pool-828-thread-1/WARN]: at net.aufdemrand.denizencore.tags.TagManager$1.run(TagManager.java:308)
[08:53:09] [pool-828-thread-1/WARN]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[08:53:09] [pool-828-thread-1/WARN]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[08:53:09] [pool-828-thread-1/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[08:53:09] [pool-828-thread-1/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[08:53:09] [pool-828-thread-1/WARN]: at java.lang.Thread.run(Thread.java:745)
[08:53:09] [Server thread/INFO]: [0;35;1m [0;37;1m[0;30;1mFilled tag <[0;37;1mplayer.item_in_hand.worth[0;30;1m> with '[0;37;1mplayer.item_in_hand.worth[0;30;1m'. [m
[08:53:09] [Server thread/INFO]: [0;35;1m [0;31;1mERROR in queue 'EXCOMMAND_LanReferringDocument'! [0;37;1mTag <player.item_in_hand.worth> is invalid! [m
[08:53:09] [Server thread/INFO]: [0;33;1m+> [0;30;1mExecuting '[0;33;1mNARRATE[0;30;1m': [0;30;1mNarrating='[0;33;1mplayer.item_in_hand.worth[0;30;1m' [0;30;1mTargets='[0;33;1m[p@n0nnie][0;30;1m' [m
[08:53:09] [Server thread/INFO]: [0;35;1m [0;37;1mCompleting queue 'EXCOMMAND_LanReferringDocument' in 5ms. [m

I have latest Spigot
[08:46:09] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-f56e2e7-a65b73a (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
Version. It was builded on 29.01.2019 - 8:00 a.m. GMT+1

I am using Depenizen Version 1.0.0 build 429, Denizen Version 1.0.3-SNAPSHOT build 1660-REL, core version 1.20 Build 183 and EssentialsX 2.16.0.34

I am not sure if this is related to Denizendevelopers or EssentialsX Devs. Please help me
 

suspic

New member
Oct 3, 2017
4
1
0
23
It could be Depenizen's Essentials hook being slightly outdated? I'm particularly looking at this line:
java.lang.NoSuchMethodError: com.earth2me.essentials.Worth.getPrice(Lorg/bukkit/inventory/ItemStack;)Ljava/math/BigDecimal;
 

mcmonkey

Administrator
Staff member
Helper
December 2017, EssentialsX broke the API layout: https://github.com/EssentialsX/Essentials/commit/1a820ad9b7d2564d836f3044f770aec56c0b04a1#diff-18a0a16d39ae8577010668d121f038f4L24
 

n0nnie

Active member
mcmonkey said:
December 2017, EssentialsX broke the API layout: https://github.com/EssentialsX/Essentials/commit/1a820ad9b7d2564d836f3044f770aec56c0b04a1#diff-18a0a16d39ae8577010668d121f038f4L24

This means, that the worth tag will never work again?

I was about to do something like https://one.denizenscript.com/denizen/repo/entry/136 but without worth I have to look for something else or I have to stick to my crappy Shopplugin which breaks on every update of Minecraft. I thought if I am doing a shop by myself, why not use the worth.yml I have set up in hours
 

mcmonkey

Administrator
Staff member
Helper
n0nnie said:
mcmonkey said:
December 2017, EssentialsX broke the API layout: https://github.com/EssentialsX/Essentials/commit/1a820ad9b7d2564d836f3044f770aec56c0b04a1#diff-18a0a16d39ae8577010668d121f038f4L24

This means, that the worth tag will never work again?

I was about to do something like https://one.denizenscript.com/denizen/repo/entry/136 but without worth I have to look for something else or I have to stick to my crappy Shopplugin which breaks on every update of Minecraft. I thought if I am doing a shop by myself, why not use the worth.yml I have set up in hours
No, it means we need to update Depenizen for EssentialsX's shit.

Also, you know you can read the worth.yml file directly through Denizen, right? Yaml command.
 

n0nnie

Active member
mcmonkey said:
n0nnie said:
mcmonkey said:
December 2017, EssentialsX broke the API layout: https://github.com/EssentialsX/Essentials/commit/1a820ad9b7d2564d836f3044f770aec56c0b04a1#diff-18a0a16d39ae8577010668d121f038f4L24

This means, that the worth tag will never work again?

I was about to do something like https://one.denizenscript.com/denizen/repo/entry/136 but without worth I have to look for something else or I have to stick to my crappy Shopplugin which breaks on every update of Minecraft. I thought if I am doing a shop by myself, why not use the worth.yml I have set up in hours
No, it means we need to update Depenizen for EssentialsX's shit.

Also, you know you can read the worth.yml file directly through Denizen, right? Yaml command.

Ah ok. So I will wait patiently and look for new builds, thank you for the info =)

I know the yaml command, but do I have to copy it to denizen folder then, or is there a way to do a path to essentials folder?
 

mcmonkey

Administrator
Staff member
Helper
n0nnie said:
Ah ok. So I will wait patiently and look for new builds, thank you for the info =)

I know the yaml command, but do I have to copy it to denizen folder then, or is there a way to do a path to essentials folder?

Use "../" to raise a folder. Since the default starting folder is the Denizen plugin folder, you can use "../Essentials/worth.yml".
 

n0nnie

Active member
mcmonkey said:
n0nnie said:
Ah ok. So I will wait patiently and look for new builds, thank you for the info =)

I know the yaml command, but do I have to copy it to denizen folder then, or is there a way to do a path to essentials folder?

Use "../" to raise a folder. Since the default starting folder is the Denizen plugin folder, you can use "../Essentials/worth.yml".

That just revolutionized my understandig of yaml. Thank you so much =)
 

mcmonkey

Administrator
Staff member
Helper
It looks like Depenizen is linked against the original (Bukkit-era) version of Essentials.
I'm going to update it to work with EssentialsX instead.