C# Класс Sharpcraft.Library.Minecraft.Server

Server object, used as reference when connecting to a server.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Address string
Description string
Name string
Online bool
Ping int

Открытые методы

Метод Описание
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.

Описание методов

Server() публичный Метод

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() публичный Метод

Set the mode of this server.
public SetMode ( int mode ) : void
mode int Mode to set.
Результат void

Описание свойств

Address публичное свойство

Address of the server, usually an IP address.
public string Address
Результат string

Description публичное свойство

Description of the server, usually broadcasted by the server itself.
public string Description
Результат string

Name публичное свойство

Name of the server, or "title".
public string Name
Результат string

Online публичное свойство

Whether or not the server is currently online.
public bool Online
Результат bool

Ping публичное свойство

Ping (latency) of the server.
public int Ping
Результат int