Saved location menu doesn't open if you have more than 90
DrPepplies opened this issue ยท 2 comments
Describe the bug
If you save more than 90 saved destinations, you can't open the menu anymore to view them. There's no in game error but the console does log it out.
Also if you save exactly 90, you can't see the 90th as the menu stops at 89 and there's no next page button (only previous).
To Reproduce
- Save 91 saves
- Try and open the saved location menu (either from a save sign or from control centre)
- Nothing happens, and console shows an error
Screenshots
No response
Log files
[Server thread/ERROR]: Could not pass event InventoryClickEvent to TARDIS v4.9.0-b2421
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.checkElementIndex(LinkedList.java:559) ~[?:?]
at java.util.LinkedList.get(LinkedList.java:480) ~[?:?]
at me.eccentric_nz.TARDIS.travel.TARDISSaveSignInventory.getItemStack(TARDISSaveSignInventory.java:109) ~[TARDIS-2421.jar:?]
at me.eccentric_nz.TARDIS.travel.TARDISSaveSignInventory.<init>(TARDISSaveSignInventory.java:54) ~[TARDIS-2421.jar:?]
at me.eccentric_nz.TARDIS.control.TARDISControlMenuListener.onControlMenuInteract(TARDISControlMenuListener.java:233) ~[TARDIS-2421.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor589.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:git-Paper-276]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:629) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:2860) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:13) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-276]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-276]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
'/tardis version' output
Server version: git-Paper-276 (MC: 1.18.2)
TARDIS version: 4.9.0-b2421
TARDISChunkGenerator version: 4.9.0
dynmap version: 3.4-beta-2-761
WorldBorder version: 1.9.10 (beta)
Multiverse-Core version: 4.3.2-SNAPSHOT-b870
WorldGuard version: 7.0.8-SNAPSHOT+2191-271b32a
CoreProtect version: 21.2
Fixed in build 2426
You can use the /tardis list saves
command to access > 90 saves - click a save in the list to load it