Broke Protocol Game API Reference  1.39
Code reference for server and client scripting
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | Events | List of all members
BrokeProtocol.API.CustomData Class Reference

Public Member Functions

delegate void OnDataUpdateEvent (string key, object newData, object oldData)
 
FetchCustomData< T > (string key, Func< object, T > converter=null)
 
bool TryFetchCustomData< T > (string key, out T data, Func< object, T > converter=null)
 
void AddOrUpdate< T > (string key, T data)
 
void OnUpdate< T > (string key, Action< T, T > onEvent)
 
bool TryRemoveCustomData (string key)
 

Static Public Member Functions

static T ConvertData< T > (object value)
 

Properties

Dictionary< string, object > Data = new () [get, set]
 
object this[string key] [get, set]
 

Events

OnDataUpdateEvent OnDataUpdate
 

Member Function Documentation

◆ AddOrUpdate< T >()

void BrokeProtocol.API.CustomData.AddOrUpdate< T > ( string key,
T data )
inline

◆ ConvertData< T >()

static T BrokeProtocol.API.CustomData.ConvertData< T > ( object value)
static

◆ FetchCustomData< T >()

T BrokeProtocol.API.CustomData.FetchCustomData< T > ( string key,
Func< object, T > converter = null )
inline

◆ OnDataUpdateEvent()

delegate void BrokeProtocol.API.CustomData.OnDataUpdateEvent ( string key,
object newData,
object oldData )

◆ OnUpdate< T >()

void BrokeProtocol.API.CustomData.OnUpdate< T > ( string key,
Action< T, T > onEvent )
inline

◆ TryFetchCustomData< T >()

bool BrokeProtocol.API.CustomData.TryFetchCustomData< T > ( string key,
out T data,
Func< object, T > converter = null )
inline

◆ TryRemoveCustomData()

bool BrokeProtocol.API.CustomData.TryRemoveCustomData ( string key)

Property Documentation

◆ Data

Dictionary<string, object> BrokeProtocol.API.CustomData.Data = new ()
getset

◆ this[string key]

object BrokeProtocol.API.CustomData.this[string key]
getset

Event Documentation

◆ OnDataUpdate

OnDataUpdateEvent BrokeProtocol.API.CustomData.OnDataUpdate

The documentation for this class was generated from the following file: