ProtocolLib

3M Downloads

Error sending set_player_team packet - Build 702

Muffin2Go opened this issue ยท 10 comments

commented
  • This issue is not solved in a development build

Describe the bug
Sending the set_player_team packet does not work. it throws an illegal state exception stating that "Parameters not present, but method is0"

To Reproduce
Steps to reproduce the behavior:

  1. try to send set_player_team packet to player
  2. observe logs

Expected behavior
The team of the player should be set without throwing any errors

Error-Log
https://gist.github.com/Muffin2Go/4a51fd6f311a0130358e1cca116d6cb7

Version Info
https://gist.github.com/Muffin2Go/44d724f8581a5854021b1cd72903e5a0

Additional context
None

commented

That error implies that you're not setting all the necessary parameters when sending that packet. Can you provide the code you're using?

commented

Thats what i read myself, but i have no clue what should be wrong now, i haven't changed the working code in any way, i only updated from 1.20.4 to 1.20.5/6

public static PacketContainer createColorTeam(ChatColor color, String teamName) {
        PacketContainer packetContainer = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);
        packetContainer.getStrings().write(0, teamName);
        packetContainer.getIntegers().write(0, 0);
        Optional<InternalStructure> optStruct = packetContainer.getOptionalStructures().read(0);
        if (optStruct.isPresent()) {
            InternalStructure struct = optStruct.get();
            struct.getEnumModifier(ChatColor.class, MinecraftReflection.getMinecraftClass("EnumChatFormat")).write(0, color);
            packetContainer.getOptionalStructures().write(0, Optional.of(struct));
        }

        return  packetContainer;
    }

Thanks for your help!

commented

try making sure all these fields are set (from wiki.vg/protocol):

image

a lot of times when something works on a previous version then breaks on a newer one it's because Mojang broke/changed something internally. here maybe null was okay previously but now you have to specify everything

commented

will try

commented

So i found out, that the OptionalStructure i'm trying to write to, is not present, therefore nothing is written. something must have changed there, but i cant get what it is from the wiki.vg

commented

I updated to the newest Build 709, now with the new WrappedTeamParameters i was hoping the Bug would be fixed, but i now get the error:

java.lang.IllegalStateException: Team parameters class doesn't exist on this server version
	at ProtocolLib.jar/com.comphenix.protocol.wrappers.WrappedTeamParameters.lambda$getNmsClassOrThrow$0(WrappedTeamParameters.java:19) ~[ProtocolLib.jar:?]
	at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
	at ProtocolLib.jar/com.comphenix.protocol.wrappers.WrappedTeamParameters.getNmsClassOrThrow(WrappedTeamParameters.java:19) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.wrappers.WrappedTeamParameters$Builder.build(WrappedTeamParameters.java:158) ~[ProtocolLib.jar:?]
	at jCore-0.2.2-SNAPSHOT.jar/net.minemesh.jCore.graphics.models.packetstands.PacketGenerator.createColorTeam(PacketGenerator.java:122) ~[jCore-0.2.2-SNAPSHOT.jar:?]
	at jCore-0.2.2-SNAPSHOT.jar/net.minemesh.jCore.events.ConnectionHandler.onJoin(ConnectionHandler.java:49) ~[jCore-0.2.2-SNAPSHOT.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor18.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-137-bd5867a]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:627) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:347) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.handleConfigurationFinished(ServerConfigurationPacketListenerImpl.java:153) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.handle(ServerboundFinishConfigurationPacket.java:22) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.handle(ServerboundFinishConfigurationPacket.java:13) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-137-bd5867a]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Pretty annoying cause i traced all the bugs back to their starting point. This bug cant be fixed by me sadly. I'm using the newest PaperMc 1.20.6 build so it really should not be not existing in this version ;)

commented

it's probably not using the mojang mapped class name from paper. will check it out

commented

Give the latest dev build a try. Should hopefully fix this issue

commented

The error isn't solved for me maybe i make something wrong but i mean it is more an onther behaviour.
These is my Debug from the console

[17:14:18 INFO]: [DiceSidebar] PacketContainer[type=SCOREBOARD_TEAM[class=ClientboundSetPlayerTeamPacket, id=96], structureModifier=StructureModifier[fieldType=class java.lang.Object, data=[com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@8a50f83, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@158a7e94, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@4f1e4957, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@6bfd9c9f]]]
[17:14:18 INFO]: [DiceSidebar] private final int net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.method:method
[17:14:18 INFO]: [DiceSidebar] private final java.lang.String net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.name:name
[17:14:18 INFO]: [DiceSidebar] private final java.util.Collection net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.players:players
[17:14:18 INFO]: [DiceSidebar] private final java.util.Optional net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.parameters:parameters

These is the stacktrace

[17:14:18 WARN]: [DiceSidebar] Task #6 for DiceSidebar v0.1 generated an exception
java.lang.IllegalArgumentException: handle (java.lang.Object@2935a695) is not a class net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket$Parameters, but class java.lang.Object
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.AbstractWrapper.setHandle(AbstractWrapper.java:31) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.WrappedTeamParameters.<init>(WrappedTeamParameters.java:41) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$3.getSpecific(Converters.java:105) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$1.getSpecific(Converters.java:52) ~[ProtocolLib.jar:?]
        at java.base/java.util.Optional.map(Optional.java:260) ~[?:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$5.getSpecific(Converters.java:175) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$5.getSpecific(Converters.java:165) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.readInternal(StructureModifier.java:303) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.readSafely(StructureModifier.java:277) ~[ProtocolLib.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.Wrapper.WrapperPlayServerScoreboardTeam.<init>(WrapperPlayServerScoreboardTeam.java:44) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.Wrapper.WrapperPlayServerScoreboardTeam.<init>(WrapperPlayServerScoreboardTeam.java:37) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.SidebarLine.<init>(SidebarLine.java:24) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.SidebarLine.<init>(SidebarLine.java:32) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.SidebarPlugin.lambda$onJoin$4(SidebarPlugin.java:47) ~[DiceSidebar-0.0.3.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.21.jar:1.21-2-b4b8208]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1654) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:471) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1538) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.jar:1.21-2-b4b8208]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

These is my code https://gist.github.com/Ste3et/8f1039bd0801622abe0616325fc7b734#file-wrapperplayserverscoreboardteam-java-L44 line 44 is the error occuried, but internal the Packet contains the field Optional for yet i don't found something to fix it.

Here my ProtocolLib dump

ProtocolLib Dump
Timestamp: 06/22/24 17:20:57

ProtocolLib Version: ProtocolLib v5.3.0-SNAPSHOT-721
Bukkit Version: 1.21-R0.1-SNAPSHOT
Server Version: 1.21-2-b4b8208 (MC: 1.21)
Java Version: 21.0.3

ProtocolLib: com.comphenix.protocol.ProtocolLib@4b0704ac[
  statistics=com.comphenix.protocol.metrics.Statistics@404dede6
  packetTask=com.comphenix.protocol.scheduler.DefaultTask@5c965c8a
  tickCounter=8921
  configExpectedMod=1
  updater=com.comphenix.protocol.updater.SpigotUpdater@2d96617e
  redirectHandler=com.comphenix.protocol.ProtocolLib$2@5ec72204
  scheduler=com.comphenix.protocol.scheduler.DefaultScheduler@71cad6e7
  commandProtocol=com.comphenix.protocol.CommandProtocol@1f56a658
  commandPacket=com.comphenix.protocol.CommandPacket@155b95d
  commandFilter=com.comphenix.protocol.CommandFilter@66e56c71
  packetLogging=com.comphenix.protocol.PacketLogging@41bff3a4
  skipDisable=false
  isEnabled=true
  loader=io.papermc.paper.plugin.manager.DummyBukkitPluginLoader@6bf1f9ad
  server=CraftServer{serverName=Paper,serverVersion=1.21-2-b4b8208,minecraftVersion=1.21}
  file=plugins\ProtocolLib.jar
  description=org.bukkit.plugin.PluginDescriptionFile@a0940b2
  pluginMeta=org.bukkit.plugin.PluginDescriptionFile@a0940b2
  dataFolder=plugins\ProtocolLib
  classLoader=PluginClassLoader{plugin=ProtocolLib v5.3.0-SNAPSHOT-721, pluginEnabled=true, url=plugins\ProtocolLib.jar}
  naggable=true
  newConfig=YamlConfiguration[path='', root='YamlConfiguration']
  configFile=plugins\ProtocolLib\config.yml
  logger=com.destroystokyo.paper.utils.PaperPluginLogger@504d0b2a
  lifecycleEventManager=io.papermc.paper.plugin.lifecycle.event.PaperLifecycleEventManager@68fc73e
  allowsLifecycleRegistration=false
]
Manager: com.comphenix.protocol.injector.PacketFilterManager@46431b8d[
  plugin=ProtocolLib v5.3.0-SNAPSHOT-721
  server=CraftServer{serverName=Paper,serverVersion=1.21-2-b4b8208,minecraftVersion=1.21}
  reporter=com.comphenix.protocol.ProtocolLib$1@5f4b1241
  minecraftVersion=(MC: 1.21.0)
  asyncFilterManager=com.comphenix.protocol.async.AsyncFilterManager@67e756d9
  pluginVerifier=com.comphenix.protocol.injector.PluginVerifier@1f29cb2c
  mainThreadPacketTypes=com.comphenix.protocol.concurrent.PacketTypeListenerSet@41683437
  inboundListeners=com.comphenix.protocol.injector.collection.InboundPacketListenerSet@46b6ff41
  outboundListeners=com.comphenix.protocol.injector.collection.OutboundPacketListenerSet@1b3a38d0
  registeredListeners=[]
  networkManagerInjector=com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector@4a9bf030
  debug=false
  closed=false
  injected=true
]

No listeners

https://i.imgur.com/uUTvCtS.png

NVM i figure it out whats wrong with my code sorry my fault

commented

The error isn't solved for me maybe i make something wrong but i mean it is more an onther behaviour. These is my Debug from the console

[17:14:18 INFO]: [DiceSidebar] PacketContainer[type=SCOREBOARD_TEAM[class=ClientboundSetPlayerTeamPacket, id=96], structureModifier=StructureModifier[fieldType=class java.lang.Object, data=[com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@8a50f83, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@158a7e94, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@4f1e4957, com.comphenix.protocol.reflect.accessors.DefaultFieldAccessor@6bfd9c9f]]]
[17:14:18 INFO]: [DiceSidebar] private final int net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.method:method
[17:14:18 INFO]: [DiceSidebar] private final java.lang.String net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.name:name
[17:14:18 INFO]: [DiceSidebar] private final java.util.Collection net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.players:players
[17:14:18 INFO]: [DiceSidebar] private final java.util.Optional net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket.parameters:parameters

These is the stacktrace

[17:14:18 WARN]: [DiceSidebar] Task #6 for DiceSidebar v0.1 generated an exception
java.lang.IllegalArgumentException: handle (java.lang.Object@2935a695) is not a class net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket$Parameters, but class java.lang.Object
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.AbstractWrapper.setHandle(AbstractWrapper.java:31) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.WrappedTeamParameters.<init>(WrappedTeamParameters.java:41) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$3.getSpecific(Converters.java:105) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$1.getSpecific(Converters.java:52) ~[ProtocolLib.jar:?]
        at java.base/java.util.Optional.map(Optional.java:260) ~[?:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$5.getSpecific(Converters.java:175) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.wrappers.Converters$5.getSpecific(Converters.java:165) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.readInternal(StructureModifier.java:303) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.readSafely(StructureModifier.java:277) ~[ProtocolLib.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.Wrapper.WrapperPlayServerScoreboardTeam.<init>(WrapperPlayServerScoreboardTeam.java:44) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.Wrapper.WrapperPlayServerScoreboardTeam.<init>(WrapperPlayServerScoreboardTeam.java:37) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.SidebarLine.<init>(SidebarLine.java:24) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.SidebarLine.<init>(SidebarLine.java:32) ~[DiceSidebar-0.0.3.jar:?]
        at DiceSidebar-0.0.3.jar/de.Ste3et_C0st.DiceSidebar.SidebarPlugin.lambda$onJoin$4(SidebarPlugin.java:47) ~[DiceSidebar-0.0.3.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.21.jar:1.21-2-b4b8208]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1654) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:471) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1538) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[paper-1.21.jar:1.21-2-b4b8208]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.jar:1.21-2-b4b8208]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

These is my code https://gist.github.com/Ste3et/8f1039bd0801622abe0616325fc7b734#file-wrapperplayserverscoreboardteam-java-L44 line 44 is the error occuried, but internal the Packet contains the field Optional for yet i don't found something to fix it.

Here my ProtocolLib dump

ProtocolLib Dump
Timestamp: 06/22/24 17:20:57

ProtocolLib Version: ProtocolLib v5.3.0-SNAPSHOT-721
Bukkit Version: 1.21-R0.1-SNAPSHOT
Server Version: 1.21-2-b4b8208 (MC: 1.21)
Java Version: 21.0.3

ProtocolLib: com.comphenix.protocol.ProtocolLib@4b0704ac[
  statistics=com.comphenix.protocol.metrics.Statistics@404dede6
  packetTask=com.comphenix.protocol.scheduler.DefaultTask@5c965c8a
  tickCounter=8921
  configExpectedMod=1
  updater=com.comphenix.protocol.updater.SpigotUpdater@2d96617e
  redirectHandler=com.comphenix.protocol.ProtocolLib$2@5ec72204
  scheduler=com.comphenix.protocol.scheduler.DefaultScheduler@71cad6e7
  commandProtocol=com.comphenix.protocol.CommandProtocol@1f56a658
  commandPacket=com.comphenix.protocol.CommandPacket@155b95d
  commandFilter=com.comphenix.protocol.CommandFilter@66e56c71
  packetLogging=com.comphenix.protocol.PacketLogging@41bff3a4
  skipDisable=false
  isEnabled=true
  loader=io.papermc.paper.plugin.manager.DummyBukkitPluginLoader@6bf1f9ad
  server=CraftServer{serverName=Paper,serverVersion=1.21-2-b4b8208,minecraftVersion=1.21}
  file=plugins\ProtocolLib.jar
  description=org.bukkit.plugin.PluginDescriptionFile@a0940b2
  pluginMeta=org.bukkit.plugin.PluginDescriptionFile@a0940b2
  dataFolder=plugins\ProtocolLib
  classLoader=PluginClassLoader{plugin=ProtocolLib v5.3.0-SNAPSHOT-721, pluginEnabled=true, url=plugins\ProtocolLib.jar}
  naggable=true
  newConfig=YamlConfiguration[path='', root='YamlConfiguration']
  configFile=plugins\ProtocolLib\config.yml
  logger=com.destroystokyo.paper.utils.PaperPluginLogger@504d0b2a
  lifecycleEventManager=io.papermc.paper.plugin.lifecycle.event.PaperLifecycleEventManager@68fc73e
  allowsLifecycleRegistration=false
]
Manager: com.comphenix.protocol.injector.PacketFilterManager@46431b8d[
  plugin=ProtocolLib v5.3.0-SNAPSHOT-721
  server=CraftServer{serverName=Paper,serverVersion=1.21-2-b4b8208,minecraftVersion=1.21}
  reporter=com.comphenix.protocol.ProtocolLib$1@5f4b1241
  minecraftVersion=(MC: 1.21.0)
  asyncFilterManager=com.comphenix.protocol.async.AsyncFilterManager@67e756d9
  pluginVerifier=com.comphenix.protocol.injector.PluginVerifier@1f29cb2c
  mainThreadPacketTypes=com.comphenix.protocol.concurrent.PacketTypeListenerSet@41683437
  inboundListeners=com.comphenix.protocol.injector.collection.InboundPacketListenerSet@46b6ff41
  outboundListeners=com.comphenix.protocol.injector.collection.OutboundPacketListenerSet@1b3a38d0
  registeredListeners=[]
  networkManagerInjector=com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector@4a9bf030
  debug=false
  closed=false
  injected=true
]

No listeners

https://i.imgur.com/uUTvCtS.png

NVM i figure it out whats wrong with my code sorry my fault

How did you fix?

Edit: I figured it out. You need to set the data now instead of reading and modifying it. It also seems that you need to set every value inside of WrappedTeamParameters.