Package eu.sculkpowered.server
Interface Server
- All Superinterfaces:
Audience
,ForwardingAudience
,Pointered
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull CommandHandler
Gets theCommandHandler
instance@NotNull MinecraftConfig
config()
Gets the configuration.@NotNull CommandSource
Gets the console command source object.@NotNull Container
createContainer
(Container.Type type, @NotNull Component title) Creates a container by its type.<T extends Entity>
TcreateEntity
(@NotNull Class<T> clazz) Creates an entity by its class.@NotNull Scoreboard
createScoreboard
(@NotNull String name, @NotNull Component displayName, @Nullable NumberFormat numberFormat, @NotNull DisplaySlot displaySlot) Creates a new scoreboard/objective with the specified attributes.@NotNull World
createWorld
(World.Builder builder) Creates a world with the specified builder.@Nullable Entity
entity
(int id) Gets an entity by its id.@NotNull EventHandler
Gets theEventHandler
instance@NotNull Collection
<? extends Player> Gets all players currently connected.@Nullable Player
Gets a player by its unique idint
Gets the number of players currently connected.@NotNull PluginHandler
Gets thePluginHandler
instance@NotNull Scheduler
Gets theScheduler
instancevoid
shutdown()
Shutdowns the server.@NotNull TeamHandler
Gets theTeamHandler
instancedefault void
unloadWorld
(@NotNull World world) Unloads the specified world.void
unloadWorld
(@NotNull World world, @NotNull Consumer<Player> consumer) Unloads the specified world.@Nullable World
Gets a world by its name.Methods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSound
Methods inherited from interface net.kyori.adventure.audience.ForwardingAudience
audiences, clearResourcePacks, clearTitle, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, stopSound
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
-
Field Details
-
DEFAULT_WORLD_UNLOAD
-
-
Method Details
-
pluginHandler
Gets thePluginHandler
instance- Returns:
- the plugin handler instance
- Since:
- 1.0.0
-
eventHandler
Gets theEventHandler
instance- Returns:
- the event handler instance
- Since:
- 1.0.0
-
commandHandler
Gets theCommandHandler
instance- Returns:
- the command handler instance
- Since:
- 1.0.0
-
teamHandler
Gets theTeamHandler
instance- Returns:
- the team handler instance
- Since:
- 1.0.0
-
scheduler
Gets theScheduler
instance- Returns:
- the scheduler instance
- Since:
- 1.0.0
-
onlinePlayers
Gets all players currently connected.- Returns:
- the players online
- Since:
- 1.0.0
-
playerCount
int playerCount()Gets the number of players currently connected.- Returns:
- the number of players
- Since:
- 1.0.0
-
player
Gets a player by its unique id- Parameters:
uniqueId
- the unique id of the player- Returns:
- the player or null
- Since:
- 1.0.0
-
createWorld
Creates a world with the specified builder.- Parameters:
builder
- the builder for the world- Returns:
- the world
- Since:
- 1.0.0
-
world
Gets a world by its name.- Parameters:
name
- the name of the world- Returns:
- the world or null
- Since:
- 1.0.0
-
unloadWorld
Unloads the specified world.- Parameters:
world
- the world to unloadconsumer
- the consumer to consume all players in the world- Since:
- 1.0.0
-
unloadWorld
Unloads the specified world.- Parameters:
world
- the world to unload- Since:
- 1.0.0
-
createEntity
Creates an entity by its class.- Type Parameters:
T
- the entity type- Parameters:
clazz
- the class of the entity- Returns:
- a new instance of the specified entity type
- Since:
- 1.0.0
-
entity
Gets an entity by its id.- Parameters:
id
- the id of the entity- Returns:
- the entity or null
- Since:
- 1.0.0
-
createContainer
@NotNull @NotNull Container createContainer(@NotNull Container.Type type, @NotNull @NotNull Component title) Creates a container by its type.- Parameters:
type
- the type of the containertitle
- the title of the container- Returns:
- a new instance of the container
- Since:
- 1.0.0
-
consoleCommandSource
Gets the console command source object.- Returns:
- the console command source object
- Since:
- 1.0.0
-
config
Gets the configuration.- Returns:
- the configuration
- Since:
- 1.0.0
-
createScoreboard
@NotNull @NotNull Scoreboard createScoreboard(@NotNull @NotNull String name, @NotNull @NotNull Component displayName, @Nullable @Nullable NumberFormat numberFormat, @NotNull @NotNull DisplaySlot displaySlot) Creates a new scoreboard/objective with the specified attributes.- Parameters:
name
- the name of the objectivedisplayName
- the display name of the objectivenumberFormat
- the number format or null for the default onedisplaySlot
- the display slot of the objective- Returns:
- the newly created scoreboard
- Since:
- 1.0.0
-
shutdown
void shutdown()Shutdowns the server.- Since:
- 1.0.0
-