Interface Server
- All Superinterfaces:
Audience, ForwardingAudience, Pointered
The running Fidorial server, entry point to every subsystem a plugin can reach.
A plugin obtains it through PluginContext.server(). Subsystems are grouped by domain:
players(), worlds(), registries(), listing()... As a
ForwardingAudience, the server forwards anything sent to it to every
online player.
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface ForwardingAudience
ForwardingAudience.Single -
Method Summary
Modifier and TypeMethodDescriptionGets the server brand name.Gets the build of this server: Minecraft and protocol versions, API version and build number.commands()Gets the registry of Brigadier commands.events()Gets the server-wide event bus.booleanChecks whether the server is running.listing()Gets how the server shows up in the multiplayer server list (description, favicon, maximum player count).maps()Gets the maps: the pictures behindfilled_mapitems, terrain maps and canvases for plugins to draw on.players()Gets the players: who is online, every known identity, bans and whitelist.plugins()Gets the plugin loader.Gets the registries plugins can extend: biomes, dimension types, chat types, dialogs, mobs, effects, items and permissions.Gets the scheduler running tasks on the region threads.services()Gets the registry of services, through which plugins replace the default server behaviour.voidshutdown()Stops the server: firesServerStoppingEvent, kicks every player, disables the plugins and saves the worlds.Gets the source of the server's own translations, registered to theGlobalTranslator.worlds()Gets the worlds: loading, creating and unloading them, base game rules and structures.Methods inherited from interface Audience
deleteMessage, openBook, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface ForwardingAudience
audiences, clearResourcePacks, clearTitle, closeDialog, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, showDialog, stopSoundMethods inherited from interface Pointered
get, getOrDefault, getOrDefaultFrom
-
Method Details
-
brandName
-
buildSpecification
Gets the build of this server: Minecraft and protocol versions, API version and build number.- Returns:
- the build specification
- Since:
- 0.1.0
-
isRunning
boolean isRunning()Checks whether the server is running.- Returns:
trueuntilshutdown()has been requested- Since:
- 0.1.0
-
shutdown
void shutdown()Stops the server: firesServerStoppingEvent, kicks every player, disables the plugins and saves the worlds.Calling it again once the shutdown has started does nothing.
- Since:
- 0.1.0
-
listing
Gets how the server shows up in the multiplayer server list (description, favicon, maximum player count).- Returns:
- the server listing
- Since:
- 0.1.0
-
players
Gets the players: who is online, every known identity, bans and whitelist.- Returns:
- the players of the server
- Since:
- 0.1.0
-
worlds
Gets the worlds: loading, creating and unloading them, base game rules and structures.- Returns:
- the worlds of the server
- Since:
- 0.1.0
-
maps
Gets the maps: the pictures behindfilled_mapitems, terrain maps and canvases for plugins to draw on.- Returns:
- the maps of the server
- Since:
- 0.1.0
-
registries
Gets the registries plugins can extend: biomes, dimension types, chat types, dialogs, mobs, effects, items and permissions.- Returns:
- the registries of the server
- Since:
- 0.1.0
-
scheduler
Gets the scheduler running tasks on the region threads.- Returns:
- the regionized scheduler
- Since:
- 0.1.0
-
events
Gets the server-wide event bus.Plugins should prefer
PluginContext.events(), whose subscriptions are released automatically when the plugin is disabled.- Returns:
- the event bus
- Since:
- 0.1.0
-
services
Gets the registry of services, through which plugins replace the default server behaviour.- Returns:
- the service registry
- Since:
- 0.1.0
-
plugins
Gets the plugin loader.- Returns:
- the plugin manager
- Since:
- 0.1.0
-
commands
Gets the registry of Brigadier commands.- Returns:
- the command registry
- Since:
- 0.1.0
-
translationSource
Gets the source of the server's own translations, registered to theGlobalTranslator.In order to remove the server's translations, remove this source from the aforementioned global translator.
- Returns:
- the server's translation source
- Since:
- 0.1.0
-