When a player selects a slot when using the HotbarGui the HotbarGui would send the client back a packet, when scrolling this would cause the client and server to be stuck in an endless loop of trying to sync each other up.
This fixes the issue by not sending the client the packet when they update the slot on the server.
Unsure about the api implementation, the method should probably be marked with @OverrideOnly or @Internal with a separate protected method provided, to avoid people accidentally calling onSelectedSlotChange instead of setSelectedSlot
When a player selects a slot when using the HotbarGui the HotbarGui would send the client back a packet, when scrolling this would cause the client and server to be stuck in an endless loop of trying to sync each other up.
This fixes the issue by not sending the client the packet when they update the slot on the server.
Unsure about the api implementation, the method should probably be marked with
@OverrideOnly
or@Internal
with a separate protected method provided, to avoid people accidentally callingonSelectedSlotChange
instead ofsetSelectedSlot