C# Class Sharpcraft.Library.Minecraft.Server

Server object, used as reference when connecting to a server.
Show file Open project: SijmenSchoon/Sharpcraft Class Usage Examples

Public Properties

Property Type Description
Address string
Description string
Name string
Online bool
Ping int

Public Methods

Method Description
Server ( string name, string address, ushort port = 25565, string description = "", int players, int maxPlayers, int ping, bool online = false, int mode )

Initialize a new Server.

name and address are the only required parameters, rest is optional and will be set to their default if omitted.

SetMode ( int mode ) : void

Set the mode of this server.

Method Details

Server() public method

Initialize a new Server.
name and address are the only required parameters, rest is optional and will be set to their default if omitted.
public Server ( string name, string address, ushort port = 25565, string description = "", int players, int maxPlayers, int ping, bool online = false, int mode )
name string Name of the server.
address string Address of the server.
port ushort Server's port.
description string Server's description.
players int Number of players currently on the server.
maxPlayers int Maximum players allowed on the server.
ping int Server ping.
online bool Is the server online?
mode int The mode of the server (0 = Survival, 1 = Creative).

SetMode() public method

Set the mode of this server.
public SetMode ( int mode ) : void
mode int Mode to set.
return void

Property Details

Address public property

Address of the server, usually an IP address.
public string Address
return string

Description public property

Description of the server, usually broadcasted by the server itself.
public string Description
return string

Name public property

Name of the server, or "title".
public string Name
return string

Online public property

Whether or not the server is currently online.
public bool Online
return bool

Ping public property

Ping (latency) of the server.
public int Ping
return int