You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is not solved in a development build (Using 5.1.1-Snapshot)
Describe the bug
I am not sure if this is a bug or I am just very stupid.
I am creating a packetwrapper for SCOREBOARD_DISPLAY_OBJECTIVE and while trying to set the position (list, sidebar, belowName)
I get the following error
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:316) ~[ProtocolLib.jar:?]
at me.wasn325.coreapi.core.packets.WrapperPlayServerScoreboardDisplayObjective.setPosition(WrapperPlayServerScoreboardDisplayObjective.java:51) ~[coreapi.jar:?]
Describe the bug
I am not sure if this is a bug or I am just very stupid.
I am creating a packetwrapper for SCOREBOARD_DISPLAY_OBJECTIVE and while trying to set the position (list, sidebar, belowName)
I get the following error
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:316) ~[ProtocolLib.jar:?]
at me.wasn325.coreapi.core.packets.WrapperPlayServerScoreboardDisplayObjective.setPosition(WrapperPlayServerScoreboardDisplayObjective.java:51) ~[coreapi.jar:?]
To Reproduce
Steps to reproduce the behavior:
https://github.com/dmulloy2/PacketWrapper/blob/master/PacketWrapper/src/main/java/com/comphenix/packetwrapper/WrapperPlayServerScoreboardDisplayObjective.java#L55
This wrapper has almost the same structure as mine and should work for demonstrating (the problematic line is already marked)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
I am not sure if this is possible, as the problem occurs before the scoreboard is finish and is visible to the Players
Version Info
ProtocolLib Dump
Timestamp: 11/07/23 18:36:08
ProtocolLib Version: ProtocolLib v5.1.1-SNAPSHOT-669
Bukkit Version: Unknown-Version
Server Version: git-Purpur-"f24e535" (MC: 1.20.2)
Java Version: 17.0.8
ProtocolLib: com.comphenix.protocol.ProtocolLib@3f8ffeec[
statistics=com.comphenix.protocol.metrics.Statistics@5cc602f1
packetTask=com.comphenix.protocol.scheduler.DefaultTask@5463c22c
tickCounter=1409118
configExpectedMod=1
updater=com.comphenix.protocol.updater.SpigotUpdater@2e37f40b
redirectHandler=com.comphenix.protocol.ProtocolLib$2@6e0f07bf
scheduler=com.comphenix.protocol.scheduler.DefaultScheduler@2324105
commandProtocol=com.comphenix.protocol.CommandProtocol@480a91cd
commandPacket=com.comphenix.protocol.CommandPacket@598ca36b
commandFilter=com.comphenix.protocol.CommandFilter@4f28651a
packetLogging=com.comphenix.protocol.PacketLogging@5f822f93
skipDisable=false
isEnabled=true
loader=io.papermc.paper.plugin.manager.DummyBukkitPluginLoader@431a5957
server=CraftServer{serverName=Purpur,serverVersion=git-Purpur-"f24e535",minecraftVersion=1.20.2}
file=plugins/ProtocolLib.jar
description=org.bukkit.plugin.PluginDescriptionFile@7fb13da4
pluginMeta=org.bukkit.plugin.PluginDescriptionFile@7fb13da4
dataFolder=plugins/ProtocolLib
classLoader=PluginClassLoader{plugin=ProtocolLib v5.1.1-SNAPSHOT-669, pluginEnabled=true, url=plugins/ProtocolLib.jar}
naggable=true
newConfig=YamlConfiguration[path='', root='YamlConfiguration']
configFile=plugins/ProtocolLib/config.yml
logger=com.destroystokyo.paper.utils.PaperPluginLogger@3d8dd0be
]
Manager: com.comphenix.protocol.injector.PacketFilterManager@2cccf6b9[
plugin=ProtocolLib v5.1.1-SNAPSHOT-669
server=CraftServer{serverName=Purpur,serverVersion=git-Purpur-"f24e535",minecraftVersion=1.20.2}
reporter=com.comphenix.protocol.ProtocolLib$1@5a66b299
minecraftVersion=(MC: 1.20.2)
asyncFilterManager=com.comphenix.protocol.async.AsyncFilterManager@457bc447
pluginVerifier=com.comphenix.protocol.injector.PluginVerifier@16a0f476
inboundListeners=com.comphenix.protocol.injector.SortedPacketListenerList@5d92b125
outboundListeners=com.comphenix.protocol.injector.SortedPacketListenerList@328f3274
registeredListeners=[PacketAdapter[plugin=CoreAPI, sending=ListeningWhitelist[priority=NORMAL, packets=[PLAYER_INFO[class=ClientboundPlayerInfoUpdatePacket, id=60]], gamephase=PLAYING, options=[]], receiving=EMPTY_WHITELIST], PacketAdapter[plugin=CoreAPI, sending=ListeningWhitelist[priority=NORMAL, packets=[SCOREBOARD_TEAM[class=PacketPlayOutScoreboardTeam, id=92]], gamephase=PLAYING, options=[]], receiving=EMPTY_WHITELIST], PacketAdapter[plugin=CoreAPI, sending=ListeningWhitelist[priority=NORMAL, packets=[NAMED_ENTITY_SPAWN[PLAY, SERVER, 235, classNames: [net.minecraft.network.protocol.game.PacketPlayOutNamedEntitySpawn, net.minecraft.network.protocol.game.ClientboundNamedEntitySpawnPacket, net.minecraft.network.play.server.SPacketSpawnPlayer] (unregistered)]], gamephase=PLAYING, options=[]], receiving=EMPTY_WHITELIST], PacketAdapter[plugin=CoreAPI, sending=EMPTY_WHITELIST, receiving=ListeningWhitelist[priority=NORMAL, packets=[TAB_COMPLETE[class=PacketPlayInTabComplete, id=10]], gamephase=PLAYING, options=[]]]]
packetInjector=com.comphenix.protocol.injector.netty.manager.NetworkManagerPacketInjector@29cd819e
playerInjectionHandler=com.comphenix.protocol.injector.netty.manager.NetworkManagerPlayerInjector@38dfd395
networkManagerInjector=com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector@700c4632
debug=false
closed=false
injected=true
]
The text was updated successfully, but these errors were encountered: