Package api.world.data
Class DataSyncManager
java.lang.Object
api.world.data.DataSyncManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcatchUpPlayer(EntityPlayerMP player) Syncs all data at once to a specific playervoidsyncOverTime(WorldServer world) Sync data to all players in the world.static voidsyncPlayerDataToAllPlayers(WorldServer world, DataEntry.PlayerDataEntry<?> entry) Syncs a specific data entry to all playersstatic voidsyncWorldDataToAllPlayers(WorldServer world, DataEntry.WorldDataEntry<?> entry) Syncs a specific data entry to all players
-
Field Details
-
GLOBAL_WORLD_DATA_SYNC_CHANNEL
- See Also:
-
WORLD_DATA_SYNC_CHANNEL
- See Also:
-
PLAYER_DATA_SYNC_CHANNEL
- See Also:
-
-
Constructor Details
-
DataSyncManager
public DataSyncManager()
-
-
Method Details
-
syncOverTime
Sync data to all players in the world. Spreads sync out over an interval to reduce server and network load. Should be called every tick (and may miss some data if calls are skipped).- Parameters:
world-
-
catchUpPlayer
Syncs all data at once to a specific player -
syncWorldDataToAllPlayers
Syncs a specific data entry to all players- Parameters:
world-entry-
-
syncPlayerDataToAllPlayers
public static void syncPlayerDataToAllPlayers(WorldServer world, DataEntry.PlayerDataEntry<?> entry) Syncs a specific data entry to all players- Parameters:
world-entry-
-