WesJD / AnvilGUI

Capture user input in Minecraft through an anvil GUI in under 20 lines of code
MIT License
481 stars 114 forks source link

Support 1.21.1 #350

Closed MathsAnalysis closed 2 months ago

MathsAnalysis commented 2 months ago

Add support for 1.21.1

spnda commented 2 months ago

The 1.21 wrapper seems to work for 1.21.1 for me. I just quickly started a 1.21.1 Paper server and all seemed well.

Did you encounter any issues yourself? Or do some specific things not work? Providing as much information as you know is always helpful for the developers.

MathsAnalysis commented 2 months ago
by: java.lang.ExceptionInInitializerError: Exception java.lang.IllegalStateException: AnvilGUI does not support server version "1_21_R1" [in thread "Server thread"]
[survival-1]>   at survival-bukkit.jar/net.wesjd.anvilgui.version.VersionMatcher.match(VersionMatcher.java:52) ~[?:?]
[survival-1]>   at survival-bukkit.jar/net.wesjd.anvilgui.AnvilGUI.<clinit>(AnvilGUI.java:43) ~[?:?]
[survival-1]>   at survival-bukkit.jar/net.wesjd.anvilgui.AnvilGUI$Builder.<init>(AnvilGUI.java:428) ~[?:?]
[survival-1]>   at survival-bukkit.jar/it.obsmc.survival.utils.Anvil.<init>(Anvil.java:17) ~[?:?]
[survival-1]>   at survival-bukkit.jar/it.obsmc.survival.town.model.utils.TownUtility.sendTownNameAnvil(TownUtility.java:107) ~[?:?]
[survival-1]>   at survival-bukkit.jar/it.obsmc.survival.menu.TownListMenu.lambda$getHomeItem$5(TownListMenu.java:146) ~[?:?]
[survival-1]>   at survival-bukkit.jar/dev.pixelstudios.xutils.menu.MenuItem.lambda$action$0(MenuItem.java:71) ~[?:?]
[survival-1]>   at survival-bukkit.jar/dev.pixelstudios.xutils.menu.MenuItem.onClick(MenuItem.java:118) ~[?:?]
[survival-1]>   at survival-bukkit.jar/dev.pixelstudios.xutils.menu.MenuListener.onClick(MenuListener.java:32) ~[?:?]
[survival-1]>   at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor799.execute(Unknown Source) ~[?:?]
[survival-1]>   at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:79) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:59) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3137) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.TickTask.run(TickTask.java:18) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:150) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1551) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:204) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:124) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1528) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1521) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:134) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1480) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1487) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
[survival-1]>   at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1332) ~[universe-1.21.1.jar:1.21.1-DEV-1f02d72]
spnda commented 2 months ago
MathsAnalysis commented 2 months ago

Screenshot 2024-08-15 072630

MathsAnalysis commented 2 months ago

This is the version I'm using for my plugin.