Skip to content

[DEPRECATED] Digest the player’s Join Token in your Game Mode

In any AGameMode running on your server, you must digest the player’s Join Token, which will be an option appended to their connection string when they join your server (see below), in order to verify that the player is allowed to join your server.

⚠️ If you do not implement this check, there is no guarantee that players joining your server have been authorized by Nodecraft Studio. Without this check, any player with your server’s IP address, including banned players, will be allowed to join your server.

  1. Override the function virtual APlayerController* Login(UPlayer* NewPlayer, ENetRole InRemoteRole, const FString& Portal, const FString& Options, const FUniqueNetIdRepl& UniqueId, FString& ErrorMessage) in your AGameMode.
  2. Parse the join token from the player’s connection string and call INodecraftPlayer::SetJoinToken on your newly created PlayerController.

An example implementation of parsing the join token from the player.

🛠️ Soon you will have the option of simply inheriting from ANodecraftPlayerController instead of writing the above code yourself.