1
0
mirror of https://github.com/misternebula/quantum-space-buddies.git synced 2025-01-27 03:35:20 +00:00
quantum-space-buddies/QSB/API/Messages/AddonCustomDataSyncMessage.cs
2023-08-02 14:07:44 -07:00

12 lines
441 B
C#

using QSB.Messaging;
using QSB.Player;
using QSB.Utility;
namespace QSB.API.Messages;
public class AddonCustomDataSyncMessage : QSBMessage<(uint playerId, string key, byte[] data)>
{
public AddonCustomDataSyncMessage(uint playerId, string key, object data) : base((playerId, key, data.ToBytes())) { }
public override void OnReceiveRemote() => QSBPlayerManager.GetPlayer(Data.playerId).SetCustomData(Data.key, Data.data.ToObject());
}