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
Fields -
Method Summary
Modifier and TypeMethodDescription@NotNull CommandHandlerGets theCommandHandlerinstance@NotNull MinecraftConfigconfig()Gets the configuration.@NotNull CommandSourceGets the console command source object.@NotNull ContainercreateContainer(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 ScoreboardcreateScoreboard(@NotNull String name, @NotNull Component displayName, @Nullable NumberFormat numberFormat, @NotNull DisplaySlot displaySlot) Creates a new scoreboard/objective with the specified attributes.@NotNull WorldcreateWorld(World.Builder builder) Creates a world with the specified builder.@Nullable Entityentity(int id) Gets an entity by its id.@NotNull EventHandlerGets theEventHandlerinstance@NotNull Collection<? extends Player> Gets all players currently connected.@Nullable PlayerGets a player by its unique idintGets the number of players currently connected.@NotNull PluginHandlerGets thePluginHandlerinstance@NotNull SchedulerGets theSchedulerinstancevoidshutdown()Shutdowns the server.@NotNull TeamHandlerGets theTeamHandlerinstancedefault voidunloadWorld(@NotNull World world) Unloads the specified world.voidunloadWorld(@NotNull World world, @NotNull Consumer<Player> consumer) Unloads the specified world.@Nullable WorldGets 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, stopSoundMethods 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, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
-
Field Details
-
DEFAULT_WORLD_UNLOAD
-
-
Method Details
-
pluginHandler
Gets thePluginHandlerinstance- Returns:
- the plugin handler instance
- Since:
- 1.0.0
-
eventHandler
Gets theEventHandlerinstance- Returns:
- the event handler instance
- Since:
- 1.0.0
-
commandHandler
Gets theCommandHandlerinstance- Returns:
- the command handler instance
- Since:
- 1.0.0
-
teamHandler
Gets theTeamHandlerinstance- Returns:
- the team handler instance
- Since:
- 1.0.0
-
scheduler
Gets theSchedulerinstance- 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
-