Record Class UpdateRequirementsPacket

java.lang.Object
java.lang.Record
dev.jorel.commandapi.network.packets.UpdateRequirementsPacket
All Implemented Interfaces:
CommandAPIPacket

public record UpdateRequirementsPacket() extends Record implements CommandAPIPacket
A packet that signals a client wants to be sent the Commands packet. This packet is only intended to be sent in the Client to Server direction.

This packet does not contain any data. The receiver should simply update the requirements for the client the packet came from.

When the Commands packet is resent, Brigadier reevaluates if that player is able to run each command. If the conditions tested by ArgumentBuilder.requires(Predicate) have changed, the client is informed of those changes, updating what they know about their requirements.