Multitallented / Civs

A town building and modular spell plugin
GNU General Public License v3.0
51 stars 31 forks source link

An error occurred when clicking on the town in SelectTown. #230

Closed MSCMDD closed 7 months ago

MSCMDD commented 1 year ago

An error occurred when clicking on the town in SelectTown.

[12:51:04 ERROR]: Unable to find any translation for town-enter-peaceful
[12:52:41 ERROR]: Unable to find any translation for town-enter-peaceful
[13:07:23 ERROR]: Exception thrown during inventory click
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at org.redcastlemedia.multitallented.civs.menus.MenuManager.openMenuFromString(MenuManager.java:347) ~[civs-1.11.2.jar:?]
        at org.redcastlemedia.multitallented.civs.menus.CustomMenu.doActionAndCancel(CustomMenu.java:267) ~[civs-1.11.2.jar:?]
        at org.redcastlemedia.multitallented.civs.menus.towns.SelectTownMenu.doActionAndCancel(SelectTownMenu.java:138) ~[civs-1.11.2.jar:?]
        at org.redcastlemedia.multitallented.civs.menus.CustomMenu.onInventoryClick(CustomMenu.java:237) ~[civs-1.11.2.jar:?]
        at org.redcastlemedia.multitallented.civs.menus.MenuManager.onInventoryClick(MenuManager.java:145) ~[civs-1.11.2.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor132.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:git-Pufferfish-27]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[pufferfish-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3239) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        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:1340) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1317) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1310) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1288) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1176) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[pufferfish-1.20.1.jar:git-Pufferfish-27]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
MSCMDD commented 1 year ago

我已经知道到底是什么使其触发了,我发现当城镇名带有“&”时就会报错 I already know what triggered it, and I found that when the town name contains'&', an error will be reported