qruet / AnvilLot

Allows for vanilla anvils to extend beyond the vanilla price cap of 39 experience in a non intrusive way.
6 stars 4 forks source link

Can't interact with anvil #2

Closed griverat closed 5 years ago

griverat commented 5 years ago

Server Version What spigot/paper/craftbukkit/etc. version are you using? git-Paper-80 (MC: 1.14.2)

Plugin Version What version of MaxRepairCost are you using? 2.12

Describe the bug Can't repair any items. The user gets set to creative mode when interacting with an anvil an won't be able close the UI.

This error floods the server log

[10:39:16] [Craft Scheduler Thread - 23/WARN]: [MaxRepairCost] Plugin MaxRepairCost v2.12 generated an exception while executing task 13
java.lang.IllegalStateException: InventoryCloseEvent may only be triggered synchronously.
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:524) ~[patched_1.14.2.jar:git-Paper-80]
    at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:1332) ~[patched_1.14.2.jar:git-Paper-80]
    at net.minecraft.server.v1_14_R1.EntityPlayer.closeInventory(EntityPlayer.java:1247) ~[patched_1.14.2.jar:git-Paper-80]
    at org.bukkit.craftbukkit.v1_14_R1.entity.CraftHumanEntity.closeInventory(CraftHumanEntity.java:620) ~[patched_1.14.2.jar:git-Paper-80]
    at me.geekles.repaircost.checks.ModeCheck.terminate(ModeCheck.java:31) ~[?:?]
    at me.geekles.repaircost.checks.ModeCheck.update(ModeCheck.java:47) ~[?:?]
    at me.geekles.repaircost.checks.ModeCheckManager$CheckRunnable.lambda$run$0(ModeCheckManager.java:85) ~[?:?]
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_212]
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_212]
    at me.geekles.repaircost.checks.ModeCheckManager$CheckRunnable.run(ModeCheckManager.java:85) ~[?:?]
    at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.14.2.jar:git-Paper-80]
    at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.14.2.jar:git-Paper-80]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.14.2.jar:git-Paper-80]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

To Reproduce Try to interact with the anvil and this error triggers.

qruet commented 5 years ago

Thank you for reporting it. I'll look into the issue as soon as I can.

McJono commented 5 years ago

I believe I'm getting the same issue from what I can tell just in different wording.

Server Version What spigot/paper/craftbukkit/etc. version are you using? spigot 1.14.1 (MC: 1.14.1)

Plugin Version What version of MaxRepairCost are you using? 2.12

Describe the bug When you click on the anvil it changes you into a weird variation of creative where you can't do anything and the server still appears to believe you are in survival (kicked for flying for example). The same error as above but worded differently seems to spam the console.

[04:54:12] [Craft Scheduler Thread - 21/WARN]: [MaxRepairCost] Plugin MaxRepairCost v2.12 generated an exception while executing task 12

java.lang.IllegalStateException: InventoryCloseEvent cannot be triggered asynchronously from another thread.
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[spigot_server.jar:git-Spigot-03bd4b0-fcb9f90]
    at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:1213) ~[spigot_server.jar:git-Spigot-03bd4b0-fcb9f90]
    at net.minecraft.server.v1_14_R1.EntityPlayer.closeInventory(EntityPlayer.java:1148) ~[spigot_server.jar:git-Spigot-03bd4b0-fcb9f90]
    at org.bukkit.craftbukkit.v1_14_R1.entity.CraftHumanEntity.closeInventory(CraftHumanEntity.java:617) ~[spigot_server.jar:git-Spigot-03bd4b0-fcb9f90]
    at me.geekles.repaircost.checks.ModeCheck.terminate(ModeCheck.java:31) ~[?:?]
    at me.geekles.repaircost.checks.ModeCheck.update(ModeCheck.java:47) ~[?:?]
    at me.geekles.repaircost.checks.ModeCheckManager$CheckRunnable.lambda$run$0(ModeCheckManager.java:85) ~[?:?]
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_171]
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_171]
    at me.geekles.repaircost.checks.ModeCheckManager$CheckRunnable.run(ModeCheckManager.java:85) ~[?:?]
    at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot_server.jar:git-Spigot-03bd4b0-fcb9f90]
    at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot_server.jar:git-Spigot-03bd4b0-fcb9f90]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]

To Reproduce Try to interact with the anvil and this error triggers.

qruet commented 5 years ago

Resolved.