Closed redkk0523 closed 1 year ago
I have actually worked on this and examined how the Integrations works.
I found the it only partly works and that we will need the Developer of Shopkeeper to help because Im not in control with the trading event, and I think he is.
Version 4.5.0 supports partly Shopkeeper. If you enable Shopkeeper integration in config.yml you will be able to SELL items and get BagOfGold. Buying items does still not work.
v4.5.1 - buying is working too now, but there are still bugs.
BagOfGold 4.5.1 + CustomItemsLib 1.0.4-SNAPSHOT
https://jenkins.lindegaard.one/job/CustomItemsLib/
Now seems to bee working, but I need some server owners to help me with the testing.
I have tested on these combinations
But I have never played much with the Merchant Inventory, so there might be some actions I dont know.
If you find any bugs, please explain in detail how I can reproduce the bug.
Let me know if you are going to test this
and please use the V4.50-SHAPSHOT or newer from my https://jenkins.lindegaard.one/job/BagOfGold/
Hey sir i really love the idea of a tangible currency, though im just having an issue with shopkeeper, when i set the trade for lets say 1 bagofgold to an item while having like let's say 5 pcs for bagofgold, when i shift + click to trade all it duplicates the bagofgold item. it gives me back 10 pcs im getting this error
[23:27:18 ERROR]: Could not pass event InventoryClickEvent to BagOfGold v4.0.8 java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "isCurrentSlot" is null at one.lindegaard.BagOfGold.rewards.BagOfGoldItems.onInventoryClickReward(BagOfGoldItems.java:1025) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor57.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[minecraft_server.jar:git-Paper-788] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[minecraft_server.jar:git-Paper-788] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[minecraft_server.jar:git-Paper-788] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2715) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1266) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1259) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1220) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1134) ~[minecraft_server.jar:git-Paper-788] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[minecraft_server.jar:git-Paper-788] at java.lang.Thread.run(Thread.java:831) [?:?]
looks like whenever i sell stuff the bagofgold checks the inventory if i still have the bagofgold, then if null it gives me back the whole stack of bagofgold resulting to a duplication. idk if its just shopkeeper only acknowledges item with no secondary value aside from the item itself.
im thinking just a suggestion maybe you can make the bagofgold reward item something as a like a block maybe idk and change the stack size to let's say more than 64 the idea is still there "tangible currency" though idk if native minecraft code will make it possible
here's a video https://drive.google.com/file/d/1Hi1pF7-BPwubhcX-dm1Ln0DMP1qZmuy-/view?usp=sharing