Setting functions

class SettingFunctions

Public Static Functions

void SetDifficulty(unsigned short pid, int difficulty)

Set the difficulty for a player.

This changes the difficulty for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • difficulty: The difficulty.

void SetEnforcedLogLevel(unsigned short pid, int enforcedLogLevel)

Set the client log level enforced for a player.

This changes the enforced log level for that player in the server memory, but does not by itself send a packet.

Enforcing a certain log level is necessary to prevent players from learning information from their console window that they are otherwise unable to obtain, such as the locations of other players.

If you do not wish to enforce a log level, simply set enforcedLogLevel to -1

Return
void
Parameters
  • pid: The player ID.
  • enforcedLogLevel: The enforced log level.

void SetPhysicsFramerate(unsigned short pid, double physicsFramerate)

Set the physics framerate for a player.

This changes the physics framerate for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • physicsFramerate: The physics framerate.

void SetConsoleAllowed(unsigned short pid, bool state)

Set whether the console is allowed for a player.

This changes the console permission for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • state: The console permission state.

void SetBedRestAllowed(unsigned short pid, bool state)

Set whether resting in beds is allowed for a player.

This changes the resting permission for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • state: The resting permission state.

void SetWildernessRestAllowed(unsigned short pid, bool state)

Set whether resting in the wilderness is allowed for a player.

This changes the resting permission for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • state: The resting permission state.

void SetWaitAllowed(unsigned short pid, bool state)

Set whether waiting is allowed for a player.

This changes the waiting permission for that player in the server memory, but does not by itself send a packet.

Return
void
Parameters
  • pid: The player ID.
  • state: The waiting permission state.

void SendSettings(unsigned short pid)

Send a PlayerSettings packet to the player affected by it.

Return
void
Parameters
  • pid: The player ID to send it to.