cServer


Index:
Articles
Classes
Hooks

Quick navigation:
BannerPattern
BossBarColor
BossBarDivisionType
cArrowEntity
cBeaconEntity
cBedEntity
cBlockArea
cBlockEntity
cBlockEntityWithItems
cBlockInfo
cBoat
cBoundingBox
cBrewingstandEntity
cChatColor
cChestEntity
cChunkDesc
cClientHandle
cColor
cCommandBlockEntity
cCompositeChat
cCraftingGrid
cCraftingRecipe
cCryptoHash
cCuboid
cDispenserEntity
cDropperEntity
cDropSpenserEntity
cEnchantments
cEnderCrystal
cEntity
cEntityEffect
cExpBottleEntity
cExpOrb
cFallingBlock
cFile
cFireChargeEntity
cFireworkEntity
cFloater
cFlowerPotEntity
cFurnaceEntity
cGhastFireballEntity
cHangingEntity
cHopperEntity
cIniFile
cInventory
cItem
cItemFrame
cItemGrid
cItems
cJson
cJukeboxEntity
cLeashKnot
cLineBlockTracer
cLuaWindow
cMap
cMapManager
cMobHeadEntity
cMobSpawnerEntity
cMojangAPI
cMonster
cNetwork
cNoteEntity
cObjective
cPainting
cPawn
cPickup
cPlayer
cPlugin
cPluginLua
cPluginManager
cProjectileEntity
cRankManager
cRoot
cScoreboard
cServer
cServerHandle
cSignEntity
cSplashPotionEntity
cStringCompression
cTCPLink
cTeam
cThrownEggEntity
cThrownEnderPearlEntity
cThrownSnowballEntity
cTNTEntity
cUDPEndpoint
cUrlClient
cUrlParser
CustomStatistic
cUUID
cWebAdmin
cWindow
cWitherSkullEntity
cWorld
EffectID
HTTPFormData
HTTPRequest
HTTPTemplateRequest
ItemCategory
lxp
SmokeDirection
sqlite3
StatisticsManager
TakeDamageInfo
tolua
Vector3d
Vector3f
Vector3i
Globals

Contents


cServer class

This class manages all the client connections internally. In the API layer, it allows to get and set the general properties of the server, such as the description and max players.

It used to support broadcasting chat messages to all players, this functionality has been moved to cRoot:BroadcastChat().


Functions

NameParametersReturn valueNotes
DoesAllowMultiLogin
boolean
Returns true if players can log in multiple times from the same account (normally used for debugging), false if only one player per name is allowed.
GetDescription
string
Returns the server description set in the settings.ini.
GetMaxPlayers
number
Returns the max amount of players who can join the server.
GetNumPlayers
number
Returns the amount of players online.
GetServerID
string
Returns the ID of the server?
GetShutdownMessage
string
Returns the shutdown message set in the settings.ini.
IsHardcore
boolean
Returns true if the server is hardcore (players get banned on death).
IsPlayerInQueue
Usernamestring
boolean
Returns true if the specified player is queued to be transferred to a World.
RegisterForgeMod
ModNamestring
ModVersionstring
ProtocolVersionNumbernumber
Add a Forge mod name/version to the server ping list.
ScheduleTask
DelayTicksnumber
TaskFunctionfunction
Queues the specified function to be executed in the server's tick thread after a the specified number of ticks. This enables operations to be queued for execution in the future. The function signature is
function(Server)
All return values from the function are ignored. Note that it is unsafe to store references to Cuberite objects, such as entities, across from the caller to the task handler function; store the EntityID instead.
SetMaxPlayers
MaxPlayersnumber
Sets the max amount of players who can join.
ShouldAuthenticate
boolean
Returns true iff the server is set to authenticate players ("online mode").
UnregisterForgeMod
ModNamestring
ProtocolVersionNumbernumber
Remove a Forge mod name/version from the server ping list.
Generated by APIDump on 2022-10-28 17:00:47, Build ID Unknown, Commit approx: 21ec3ebe26bff24b5fc6d96f86a441c9c9628247