Interface IServerChunkCacheExtension
- All Known Implementing Classes:
ServerChunkCache
public interface IServerChunkCacheExtension
Extension class for
ServerChunkCache
This interface with its default methods allows for easy sending of payloads players watching a specific entity.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
broadcast
(Entity entity, CustomPacketPayload payload) Sends a payload to all players watching the given entity.default void
broadcastAndSend
(Entity entity, CustomPacketPayload payload) Sends a payload to all players watching the given entity.default ServerChunkCache
self()
-
Method Details
-
self
-
broadcastAndSend
Sends a payload to all players watching the given entity.If the entity is a player, the payload will be sent to that player.
- Parameters:
entity
- the entity that needs to be watched to receive the payload, and the player to send the payload to if the entity is a player.payload
- the payload to send
-
broadcast
Sends a payload to all players watching the given entity.If the entity is a player, the payload will
not be sent to that player.- Parameters:
entity
- the entity that needs to be watched to receive the payloadpayload
- the payload to send
-