1.19 - Field index 0 is out of bounds for length 0
YuInseo opened this issue ยท 3 comments
- This issue is not solved in a development build
Describe the bug
com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:289) ~[ProtocolLib.jar:?]
at net.skyexcel.server.lockmanager.packet.SignEdit$Menu.open(SignEdit.java:125) ~[SkyExcelNetwork-1.0-SNAPSHOT.jar:?]
at net.skyexcel.server.lockmanager.SkyExcelNetworkLock.foo(SkyExcelNetworkLock.java:47) ~[SkyExcelNetwork-1.0-SNAPSHOT.jar:?]
at net.skyexcel.server.lockmanager.SkyExcelNetworkLock.<init>(SkyExcelNetworkLock.java:21) ~[SkyExcelNetwork-1.0-SNAPSHOT.jar:?]
at net.skyexcel.server.SkyExcelNetworkMain.onEnable(SkyExcelNetworkMain.java:35) ~[SkyExcelNetwork-1.0-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:548) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:611) ~[purpur-1.19.2.jar:git-Purpur-1819]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:525) ~[purpur-1.19.2.jar:git-Purpur-1819]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.reload(CraftServer.java:1074) ~[purpur-1.19.2.jar:git-Purpur-1819]
at org.bukkit.Bukkit.reload(Bukkit.java:930) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:962) ~[purpur-1.19.2.jar:git-Purpur-1819]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchServerCommand(CraftServer.java:925) ~[purpur-1.19.2.jar:git-Purpur-1819]
at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:540) ~[purpur-1.19.2.jar:git-Purpur-1819]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:487) ~[purpur-1.19.2.jar:git-Purpur-1819]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.2.jar:git-Purpur-1819]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.2.jar:git-Purpur-1819]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1819]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
```
**Expected behavior**
A clear and concise description of what you expected to happen.
I followed https://www.spigotmc.org/threads/signmenu-1-16-5-get-player-sign-input.249381/
this resource, But I cannot open the sign editor to player
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Version Info**
Provide your ProtocolLib install info with `/protocol dump` through pastebin.
https://ci.dmulloy2.net/job/ProtocolLib/
I get the same error using ProtocolLib build 602 with (Paper 1.19.2)
I'm trying to send an action bar:
public static void sendActionBar(Player player, String message) {
ProtocolManager pm = ParadubschManager.getProtocolManager();
if (pm != null) {
PacketContainer packet = pm.createPacket(PacketType.Play.Server.CHAT);
packet.getChatComponents().write(0, WrappedChatComponent.fromText(message));
packet.getChatTypes().write(0, EnumWrappers.ChatType.GAME_INFO);
try {
pm.sendServerPacket(player, packet);
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
My stacktrace is pretty much the same as provided above.
In my case, I could resove this error, updating the pom.xml ProtocolLib version to 4.8.0 and PacketType.Play.Server.SET_ACTION_BAR_TEXT
to send Action Bars, because the API specifications have changed.
See: "Current API apecifications"
@YooInseo the specifications for "Open Sign Editor" have also changed.
See: "Open Sign Editor"