C# Class Sharpcraft.Library.Minecraft.Server

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

Méthodes publiques

Свойство Type Description
Address string
Description string
Name string
Online bool
Ping int

Méthodes publiques

Méthode 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 méthode

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 méthode

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

Property Details

Address public_oe property

Address of the server, usually an IP address.
public string Address
Résultat string

Description public_oe property

Description of the server, usually broadcasted by the server itself.
public string Description
Résultat string

Name public_oe property

Name of the server, or "title".
public string Name
Résultat string

Online public_oe property

Whether or not the server is currently online.
public bool Online
Résultat bool

Ping public_oe property

Ping (latency) of the server.
public int Ping
Résultat int