GodotMattohaLobbySystem 0.2.4
Loading...
Searching...
No Matches
Mattoha.Misc.MattohaServerMiddleware Class Reference

Public Member Functions

virtual Dictionary< string, Variant > BeforeSetPlayerData (Dictionary< string, Variant > payload, long sender)
 Executed before setting player data.
 
virtual void AfterSetPlayerData (Dictionary< string, Variant > payload, long sender)
 Executed after setting player data.
 
virtual Dictionary< string, Variant > BeforeCreateLobby (Dictionary< string, Variant > lobbyData, long sender)
 Executed before creating a lobby.
 
virtual void AfterCreateLobby (Dictionary< string, Variant > lobbyData, long sender)
 Executed after creating a lobby.
 
virtual Dictionary< string, Variant > BeforeSetLobbyData (int lobbyId, Dictionary< string, Variant > payload, long sender)
 Executed before setting lobby data.
 
virtual void AfterSetLobbyData (int lobbyId, Dictionary< string, Variant > payload, long sender)
 Executed after setting lobby data.
 
virtual Dictionary< string, Variant > BeforeSetLobbyOwner (Dictionary< string, Variant > lobby, long sender)
 Executed before setting the lobby owner.
 
virtual void AfterSetLobbyOwner (Dictionary< string, Variant > lobby, long sender)
 Executed after setting the lobby owner.
 
virtual Dictionary< string, Variant > BeforeLoadAvailableLobbies (long sender, Array< Dictionary< string, Variant > > lobbies)
 Executed before loading available lobbies.
 
virtual void AfterLoadAvailableLobbies (long sender, Array< Dictionary< string, Variant > > lobbies)
 Executed after loading available lobbies.
 
virtual Dictionary< string, Variant > BeforeJoinLobby (Dictionary< string, Variant > lobby, long sender)
 Executed before joining a lobby.
 
virtual void AfterJoinLobby (Dictionary< string, Variant > lobby, long sender)
 Executed after joining a lobby.
 
virtual Dictionary< string, Variant > BeforeStartGame (Dictionary< string, Variant > lobby, long sender)
 Executed before starting a game.
 
virtual void AfterStartGame (Dictionary< string, Variant > lobby, long sender)
 Executed after starting a game.
 
virtual Dictionary< string, Variant > BeforeEndGame (Dictionary< string, Variant > lobby, long sender)
 Executed Before ending the game.
 
virtual void AfterEndGame (Dictionary< string, Variant > lobby, long sender)
 Executed after ending a game.
 
virtual Dictionary< string, Variant > BeforeLoadLobbyPlayers (long sender)
 Executed before loading lobby players.
 
virtual void AfterLoadLobbyPlayers (long sender)
 
virtual Dictionary< string, Variant > BeforeSpawnNode (Dictionary< string, Variant > lobby, long sender)
 
virtual void AfterSpawnNode (Dictionary< string, Variant > lobby, long sender)
 Executed after loading lobby players.
 
virtual Dictionary< string, Variant > BeforeSpawnLobbyNodes (Dictionary< string, Variant > lobby, long sender)
 Executed before spawning a node.
 
virtual void AfterSpawnLobbyNodes (Dictionary< string, Variant > lobby, long sender)
 Executed after spawning a node.
 
virtual Dictionary< string, Variant > BeforeDespawnNode (Dictionary< string, Variant > lobby, long sender)
 Executed before spawning lobby nodes.
 
virtual void AfterDespawnNode (Dictionary< string, Variant > lobby, long sender)
 Executed after spawning lobby nodes.
 
virtual Dictionary< string, Variant > BeforeDespawnRemovedSceneNodes (int lobbyId, long sender)
 Executed before despawning removed scene nodes.
 
virtual void AfterDespawnRemovedSceneNodes (int lobbyId, long sender)
 Executed after despawning removed scene nodes.
 
virtual Dictionary< string, Variant > BeforeJoinTeam (long sender, Variant teamId)
 Executed before joining a team.
 
virtual void AfterJoinTeam (long sender, Variant teamId)
 Executed after joining a team.
 
virtual Dictionary< string, Variant > BeforeSendGlobalMessage (long sender, string message)
 Executed before sending a global message.
 
virtual void AfterSendGlobalMessage (long sender, string message)
 Executed after sending a global message.
 
virtual Dictionary< string, Variant > BeforeSendLobbyMessage (Dictionary< string, Variant > lobby, long sender, string message)
 Executed before sending a lobby message.
 
virtual void AfterSendLobbyMessage (Dictionary< string, Variant > lobby, long sender, string message)
 Executed after sending a lobby message.
 
virtual Dictionary< string, Variant > BeforeSendTeamMessage (Dictionary< string, Variant > lobby, int teamId, long sender, string message)
 Executed before sending a team message.
 
virtual void AfterSendTeamMessage (Dictionary< string, Variant > lobby, int teamId, long sender, string message)
 Executed after sending a team message.
 
virtual void BeforeRemovePlayerFromLobby (long playerId)
 Executed before removing a player from a lobby.
 
virtual void AfterRemovePlayerFromLobby (long playerId)
 Executed after removing a player from a lobby.
 
virtual void BeforeRegisterPlayer (long id)
 Executed before registering a player.
 
virtual void AfterRegisterPlayer (long id)
 Executed after registering a player.
 
virtual void BeforeUnRegisterPlayer (long id)
 Executed before unregistering a player.
 
virtual void AfterUnRegisterPlayer (long id)
 Executed after unregistering a player.
 

Member Function Documentation

◆ AfterCreateLobby()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterCreateLobby ( Dictionary< string, Variant > lobbyData,
long sender )
virtual

Executed after creating a lobby.

Parameters
lobbyDataThe data of the created lobby.
senderThe ID of the sender who created the lobby.

◆ AfterDespawnNode()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterDespawnNode ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after spawning lobby nodes.

Parameters
lobbyThe data of the lobby where nodes were spawned.
senderThe ID of the sender who requested the nodes spawn.

◆ AfterDespawnRemovedSceneNodes()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterDespawnRemovedSceneNodes ( int lobbyId,
long sender )
virtual

Executed after despawning removed scene nodes.

Parameters
lobbyIdThe ID of the lobby where the nodes were despawned.
senderThe ID of the sender who requested the nodes despawn.

◆ AfterEndGame()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterEndGame ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after ending a game.

Parameters
lobbyThe data of the lobby where the game has ended.
senderThe ID of the sender who ended the game.

◆ AfterJoinLobby()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterJoinLobby ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after joining a lobby.

Parameters
lobbyThe data of the joined lobby.
senderThe ID of the sender who joined the lobby.

◆ AfterJoinTeam()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterJoinTeam ( long sender,
Variant teamId )
virtual

Executed after joining a team.

Parameters
senderThe ID of the sender who joined the team.
teamIdThe ID of the team that was joined.

◆ AfterLoadAvailableLobbies()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterLoadAvailableLobbies ( long sender,
Array< Dictionary< string, Variant > > lobbies )
virtual

Executed after loading available lobbies.

Parameters
senderThe ID of the sender who requested available lobbies.
lobbieslobbies array.

◆ AfterRegisterPlayer()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterRegisterPlayer ( long id)
virtual

Executed after registering a player.

Parameters
idThe ID of the player who was registered.

◆ AfterRemovePlayerFromLobby()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterRemovePlayerFromLobby ( long playerId)
virtual

Executed after removing a player from a lobby.

Parameters
playerIdThe ID of the player who was removed.

◆ AfterSendGlobalMessage()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSendGlobalMessage ( long sender,
string message )
virtual

Executed after sending a global message.

Parameters
senderThe ID of the sender who sent the message.
messageThe message that was sent.

◆ AfterSendLobbyMessage()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSendLobbyMessage ( Dictionary< string, Variant > lobby,
long sender,
string message )
virtual

Executed after sending a lobby message.

Parameters
lobbyThe data of the lobby where the message was sent.
senderThe ID of the sender who sent the message.
messageThe message that was sent.

◆ AfterSendTeamMessage()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSendTeamMessage ( Dictionary< string, Variant > lobby,
int teamId,
long sender,
string message )
virtual

Executed after sending a team message.

Parameters
lobbyThe data of the lobby where the message was sent.
teamIdThe ID of the team that received the message.
senderThe ID of the sender who sent the message.
messageThe message that was sent.

◆ AfterSetLobbyData()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSetLobbyData ( int lobbyId,
Dictionary< string, Variant > payload,
long sender )
virtual

Executed after setting lobby data.

Parameters
lobbyIdThe ID of the lobby.
payloadThe payload containing the updated data.
senderThe ID of the sender who set the data.

◆ AfterSetLobbyOwner()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSetLobbyOwner ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after setting the lobby owner.

Parameters
lobbyThe data of the lobby with the new owner set.
senderThe ID of the sender who set the owner.

◆ AfterSetPlayerData()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSetPlayerData ( Dictionary< string, Variant > payload,
long sender )
virtual

Executed after setting player data.

Parameters
payloadthe final payload.
sendersender id

◆ AfterSpawnLobbyNodes()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSpawnLobbyNodes ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after spawning a node.

Parameters
lobbyThe data of the lobby where the node was spawned.
senderThe ID of the sender who requested the node spawn.

◆ AfterSpawnNode()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterSpawnNode ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after loading lobby players.

Parameters
senderThe ID of the sender who requested lobby players.

◆ AfterStartGame()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterStartGame ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed after starting a game.

Parameters
lobbyThe data of the lobby where the game has started.
senderThe ID of the sender who started the game.

◆ AfterUnRegisterPlayer()

virtual void Mattoha.Misc.MattohaServerMiddleware.AfterUnRegisterPlayer ( long id)
virtual

Executed after unregistering a player.

Parameters
idThe ID of the player who was unregistered.

◆ BeforeCreateLobby()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeCreateLobby ( Dictionary< string, Variant > lobbyData,
long sender )
virtual

Executed before creating a lobby.

Parameters
lobbyDataThe data for the lobby to be created.
senderThe ID of the sender creating the lobby.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeDespawnNode()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeDespawnNode ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed before spawning lobby nodes.

Parameters
lobbyThe data of the lobby where nodes will be spawned.
senderThe ID of the sender requesting the nodes spawn.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeDespawnRemovedSceneNodes()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeDespawnRemovedSceneNodes ( int lobbyId,
long sender )
virtual

Executed before despawning removed scene nodes.

Parameters
lobbyIdThe ID of the lobby where the nodes will be despawned.
senderThe ID of the sender requesting the nodes despawn.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeEndGame()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeEndGame ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed Before ending the game.

Parameters
lobbyThe data of the lobby where the game will be ended.
senderThe ID of the sender ending the game.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeJoinLobby()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeJoinLobby ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed before joining a lobby.

Parameters
lobbyThe data of the lobby to join.
senderThe ID of the sender joining the lobby.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeJoinTeam()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeJoinTeam ( long sender,
Variant teamId )
virtual

Executed before joining a team.

Parameters
senderThe ID of the sender requesting to join a team.
teamIdThe ID of the team to join.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeLoadAvailableLobbies()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeLoadAvailableLobbies ( long sender,
Array< Dictionary< string, Variant > > lobbies )
virtual

Executed before loading available lobbies.

Parameters
senderThe ID of the sender requesting available lobbies.
lobbieslobbies array.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeLoadLobbyPlayers()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeLoadLobbyPlayers ( long sender)
virtual

Executed before loading lobby players.

Parameters
senderThe ID of the sender requesting lobby players.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeRegisterPlayer()

virtual void Mattoha.Misc.MattohaServerMiddleware.BeforeRegisterPlayer ( long id)
virtual

Executed before registering a player.

Parameters
idThe ID of the player being registered.

◆ BeforeRemovePlayerFromLobby()

virtual void Mattoha.Misc.MattohaServerMiddleware.BeforeRemovePlayerFromLobby ( long playerId)
virtual

Executed before removing a player from a lobby.

Parameters
playerIdThe ID of the player being removed.


◆ BeforeSendGlobalMessage()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSendGlobalMessage ( long sender,
string message )
virtual

Executed before sending a global message.

Parameters
senderThe ID of the sender sending the message.
messageThe message to be sent.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeSendLobbyMessage()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSendLobbyMessage ( Dictionary< string, Variant > lobby,
long sender,
string message )
virtual

Executed before sending a lobby message.

Parameters
lobbyThe data of the lobby where the message will be sent.
senderThe ID of the sender sending the message.
messageThe message to be sent.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeSendTeamMessage()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSendTeamMessage ( Dictionary< string, Variant > lobby,
int teamId,
long sender,
string message )
virtual

Executed before sending a team message.

Parameters
lobbyThe data of the lobby where the message will be sent.
teamIdThe ID of the team receiving the message.
senderThe ID of the sender sending the message.
messageThe message to be sent.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeSetLobbyData()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSetLobbyData ( int lobbyId,
Dictionary< string, Variant > payload,
long sender )
virtual

Executed before setting lobby data.

Parameters
lobbyIdThe ID of the lobby.
payloadThe payload containing keys and values to be set.
senderThe ID of the sender setting the data.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeSetLobbyOwner()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSetLobbyOwner ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed before setting the lobby owner.

Parameters
lobbyThe data of the lobby where the owner is being set.
senderThe ID of the sender setting the owner.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeSetPlayerData()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSetPlayerData ( Dictionary< string, Variant > payload,
long sender )
virtual

Executed before setting player data.

Parameters
payloadpayload that contains keys and values
senderthe sender id, who want to change his data.
Returns
dictionary contains "Status" and "Message", when status false, execution will be terminated and error event with "Message" will be emmited to client.

◆ BeforeSpawnLobbyNodes()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSpawnLobbyNodes ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed before spawning a node.

Parameters
lobbyThe data of the lobby where the node will be spawned.
senderThe ID of the sender requesting the node spawn.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeSpawnNode()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeSpawnNode ( Dictionary< string, Variant > lobby,
long sender )
virtual
Returns
dictionary contains "Status" and "Message", when status false, execution will be terminated and error event with "Message" will be emmited to client.

◆ BeforeStartGame()

virtual Dictionary< string, Variant > Mattoha.Misc.MattohaServerMiddleware.BeforeStartGame ( Dictionary< string, Variant > lobby,
long sender )
virtual

Executed before starting a game.

Parameters
lobbyThe data of the lobby where the game will be started.
senderThe ID of the sender starting the game.
Returns
Dictionary containing "Status" and "Message". If "Status" is false, execution will be terminated and an error event with "Message" will be emitted to the client.

◆ BeforeUnRegisterPlayer()

virtual void Mattoha.Misc.MattohaServerMiddleware.BeforeUnRegisterPlayer ( long id)
virtual

Executed before unregistering a player.

Parameters
idThe ID of the player being unregistered.