ProtocolLib

3M Downloads

Disabling cords for certain players

xw1w1 opened this issue ยท 1 comments

commented

I'm working on a feature in the plugin that allows you to enable "special mode", i want to prevent the player from seeing his coordinates through the debug menu, or the F3 in it
How can I do this?
Tried to do something with PacketPlayOutEntityMetadata, but it looks like ChatGPT tricked me this time
this mode can be disabled without rejoining the server

commented

I found a solution. Use ClientboundEntityEventPacket with player and EntityEvent.FULL_DEBUG_INFO or EntityEvent.REDUCED_DEBUG_INFO for this. (or 22 and 23 bytes values)
image