mastercake10 / uShop

A simple shop plugin for selling items
GNU General Public License v3.0
3 stars 8 forks source link

Item value not being calculated in /sell menu #29

Open ByteLabDev opened 5 months ago

ByteLabDev commented 5 months ago

What steps will reproduce the issue?

  1. /sell to open sell menu
  2. Place any item into the sell menu
  3. Console outputs error
  4. Clicking on sell button doesn't do anything, outputs another error

What was supposed to happen?

The item should calculate its price and sell

What happened instead?

Nothing happens, an error is outputted

What version of this plugin are you using?

1.7.6

What Spigot version are you using? Paste the output of /version below.

This server is running Paper version git-Paper-1620 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

What plugins do you have installed? Paste the output of /plugins below.

AnimatedScoreboard, AuthMe, BetterRTP, ConsoleSpamFix, CoreProtect, DiscordSRV, dynmap, Dynmap-Towny, Essentials, EssentialsChat, LuckPerms, Maintenance, PlaceholderAPI, PluginHider, ProtocolLib, SkinsRestorer, spark, TAB, TheNewEconomy, Towny, TownyChat, uShop, Vault, ViaVersion, WorldBorder

Are any errors related to this plugin in your console or logs? If so, paste below.

Placing item in sell menu:

2024-03-31 15:30:38.160740+03:00[15:30:38 WARN]: [uShop] Plugin uShop v1.7.6 generated an exception while executing task 13
2024-03-31 15:30:38.160780+03:00java.lang.NoSuchMethodError: 'java.math.BigDecimal com.earth2me.essentials.Worth.getPrice(org.bukkit.inventory.ItemStack)'
2024-03-31 15:30:38.160793+03:00at uShop.Main.getPrice(Main.java:112) ~[?:?]
2024-03-31 15:30:38.160804+03:00at uShop.Main.lambda$0(Main.java:65) ~[?:?]
2024-03-31 15:30:38.160817+03:00at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:64) ~[patched_1.12.2.jar:git-Paper-1620]
2024-03-31 15:30:38.160829+03:00at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.12.2.jar:git-Paper-1620]
2024-03-31 15:30:38.160839+03:00at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.12.2.jar:git-Paper-1620]
2024-03-31 15:30:38.160850+03:00at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
2024-03-31 15:30:38.160861+03:00at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
2024-03-31 15:30:38.160872+03:00at java.lang.Thread.run(Unknown Source) [?:?]

Trying to sell the item:

- [Sun 15:38:07 ERROR Minecraft] Could not pass event InventoryClickEvent to uShop v1.7.6
java.lang.NoSuchMethodError: 'java.math.BigDecimal com.earth2me.essentials.Worth.getPrice(org.bukkit.inventory.ItemStack)'
    at uShop.Main.getPrice(Main.java:160)
    at uShop.Main.calcPrices(Main.java:150)
    at uShop.Listeners.onClick(Listeners.java:45)
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor29.execute(Unknown Source)
    at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70)
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513)
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:2002)
    at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:33)
    at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:10)
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850)
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423)
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774)
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666)
    at java.base/java.lang.Thread.run(Unknown Source)

Any additional information that you would like to provide that may be relevant to the issue?

I only get this error when I enable Essentials pricing