Contents
Class ServerManager
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.core.io.ServerManager
- All Implemented Interfaces:
CommandOwner
-
Field Summary
FieldsFields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(InetSocketAddress address) Binds a listener, or one per address family when the address names no interface.static ServerManagerget()voidinit()voidpopulateSubPacketHandlers(GamePacketHandler packetHandler) voidbooleanunbind(ServerListener channel) voidCalled when theHytaleServerorUniverseis shutdown.voidMethods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Field Details
-
MANIFEST
-
-
Constructor Details
-
ServerManager
-
-
Method Details
-
get
-
init
public void init() -
unbindAllListeners
public void unbindAllListeners()Called when theHytaleServerorUniverseis shutdown. Unbinds all socket listeners, preventing new players from joining. -
getListeners
-
bind
Binds a listener, or one per address family when the address names no interface.Port 0 asks the operating system to choose one, and it chooses again for every socket. The first socket that binds therefore decides the port and the others follow it. Left to pick their own, the families would listen on different ports, and a host can only advertise one.
- Returns:
- the port the listeners bound to, or 0 when none of them bound
-
unbind
-
getLocalOrPublicAddress
- Throws:
SocketException
-
getNonLoopbackAddress
- Throws:
SocketException
-
getPublicAddress
- Throws:
SocketException
-
waitForBindComplete
public void waitForBindComplete() -
registerSubPacketHandlers
-
populateSubPacketHandlers
-