cloudnode-pro / BankAccounts

A Minecraft economy plugin that enables players to hold multiple bank accounts.
https://modrinth.com/plugin/bankaccounts
GNU General Public License v3.0
7 stars 3 forks source link

POS Double chest full of items not working correctly #35

Closed kai-gitt closed 1 year ago

kai-gitt commented 1 year ago

When creating a POS with a double chest full to the brim with items (6 rows filled), opening the GUI fails as it tries to open a inventory with more than 7 rows.

fig 1. inventory filled with 6 rows of items

Error log while opening the POS ```java [19:16:47 ERROR]: Could not pass event PlayerInteractEvent to BankAccounts v1.4.2 java.lang.IllegalArgumentException: Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got 63) at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-31.1-jre.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.createInventory(CraftServer.java:2286) ~[paper-1.20.1.jar:git-Paper-134] at org.bukkit.Bukkit.createInventory(Bukkit.java:1748) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at pro.cloudnode.smp.bankaccounts.POS.openOwnerGui(POS.java:300) ~[BankAccounts.jar:?] at pro.cloudnode.smp.bankaccounts.events.PlayerInteract.onPlayerInteractEvent(PlayerInteract.java:32) ~[BankAccounts.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor6.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-134] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-134] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-134] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:591) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:537) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:2003) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:37) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1339) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1316) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1309) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1287) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175) ~[paper-1.20.1.jar:git-Paper-134] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-134] at java.lang.Thread.run(Thread.java:833) ~[?:?] ```