public abstract class Server extends RemoteServer implements ml.karmaconfigs.api.common.karma.KarmaSource
| Constructor and Description |
|---|
Server() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
ban(String... macAddresses)
Ban an address from the server
|
abstract void |
broadcast(MessageOutput data)
Send a message to each connected client
|
abstract void |
close()
Completely close the server
|
abstract Server |
debug(boolean status)
Set the server debug status
|
abstract void |
exportBans(Path destination)
Export the list of bans
|
abstract Set<RemoteClient> |
getClients()
Get the connected clients
|
abstract String |
getMAC()
Get the server MAC address
|
abstract WorkLevel |
getWorkLevel()
Get the server work level
|
abstract void |
kick(String... macAddresses)
Kick an address from the server
|
abstract void |
loadBans(Path bans)
Load the list of bans
|
abstract void |
redirect(String name,
MessageOutput data)
Redirect a message to the specified client
|
abstract ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> |
start()
Try to start the server
|
abstract ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> |
start(String accessKey)
Try to start the server
|
abstract void |
unBan(String... macAddresses)
Unban an address from the server
|
getHost, getPort, sendMessage, toStringpublic abstract Server debug(boolean status)
status - the server debug statuspublic abstract ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> start()
public abstract ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> start(String accessKey)
accessKey - the server access keypublic abstract String getMAC()
getMAC in class RemoteServerpublic abstract Set<RemoteClient> getClients()
public abstract WorkLevel getWorkLevel()
public abstract void close()
public abstract void exportBans(Path destination)
destination - the file were to store
the ban listpublic abstract void loadBans(Path bans)
bans - the file were the banned mac
addresses are storedpublic abstract void broadcast(MessageOutput data)
data - the data to sendpublic abstract void redirect(String name, MessageOutput data)
name - the client namedata - the messagepublic abstract void ban(String... macAddresses)
macAddresses - the addresses to banpublic abstract void kick(String... macAddresses)
macAddresses - the addresses to kickpublic abstract void unBan(String... macAddresses)
macAddresses - the addresses to unbanCopyright © 2022. All rights reserved.