Easy NPC

Easy NPC

2M Downloads

[Bug] Error in trading /items adder

xiwxi opened this issue · 3 comments

commented

Maincraft version: 1.20.1 forge
easyNPC version: easy_npc-forge-1.20.1-5.6.0.jar
plugin itemadder : ItemsAdder_3.6.4-release-2.jar

Everything is fine with the functions but when I make a trade I get the following error and the NPC opens the trading tab but does not show anything about the trading

1

next error in console

[06:26:14 WARN]: [ItemsAdder] Task #2079 for ItemsAdder v3.6.4-release-2 generated an exception
java.lang.AbstractMethodError: Receiver class de.markusbordihn.easynpc.entity.easynpc.npc.Villager does not define or inherit an implementation of the resolved method 'abstract org.bukkit.craftbukkit.v1_20_R1.inventory.CraftMerchant getCraftMerchant()' of interface net.minecraft.world.item.trading.Merchant.
at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftInventoryMerchant.getMerchant(CraftInventoryMerchant.java:35) ~[forge-1.20.1-47.3.10-universal.jar%23345!/:?]
at ia.m.oX.a(SourceFile:87) ~[?:?]
at ia.m.oX.a(SourceFile:47) ~[?:?]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:78) ~[forge-1.20.1-47.3.10-universal.jar%23345!/:?]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:416) ~[forge-1.20.1-47.3.10-universal.jar%23345!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:1137) ~[server-1.20.1-20230612.114412-srg.jar%23340!/:?]
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:360) ~[server-1.20.1-20230612.114412-srg.jar%23340!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:1071) ~[server-1.20.1-20230612.114412-srg.jar%23340!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:910) ~[server-1.20.1-20230612.114412-srg.jar%23340!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:286) ~[server-1.20.1-20230612.114412-srg.jar%23340!/:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]

....

2

commented

According to the log, CraftInventoryMerchant expects a getCraftMerchant, which isn't defined for NPCs.
It seems that a Merchant plugin is assuming the NPC is a standard Trader entity, which it isn’t.

Are you using any specific Merchant or Trading plugin?
If so, I can take a closer look at their code. However, if the plugin is not open-source, there's not much I can do.
In that case, the issue should be reported to the plugin's developer, asking them to exclude Easy NPC entities from their modifications.

commented

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.

commented

This issue was closed because it has been stalled for 5 days with no activity.