Table of Contents

Class WakePolicy

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Who may wake a sleeping server by trying to join it.

public static class WakePolicy
Inheritance
WakePolicy
Inherited Members

Remarks

Pressing Join used to be enough for anyone at all. Behind a Playit tunnel that includes every scanner on the internet that looks for Minecraft servers, and they try to log in as routine: each one started the server, with a full backup of the world in front of the start.

The rule follows what the server itself would do. With its whitelist on, somebody not on it is turned away the moment the server is up, so waking it for them buys nothing; operators get in regardless in vanilla, so they count too. With the whitelist off the server is open to anyone, and so is waking it. The owner can switch the filter off.

Pure on purpose: the listener, the files and the config are all supplied, so the decision can be checked without a socket or a server folder.

Methods

Allows(string?, bool, bool, IEnumerable<string>, IEnumerable<string>)

Whether a join attempt by player should start the server.

public static bool Allows(string? player, bool whitelistOn, bool onlyWhitelisted, IEnumerable<string> whitelist, IEnumerable<string> ops)

Parameters

player string

The name the client sent in Login Start, or null when it sent none.

whitelistOn bool

Whether white-list=true in server.properties.

onlyWhitelisted bool

The server's WakeOnlyForWhitelist.

whitelist IEnumerable<string>

Names in whitelist.json.

ops IEnumerable<string>

Names in ops.json.

Returns

bool