Package net.glowstone
Class GlowServer
java.lang.Object
net.glowstone.GlowServer
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience
,net.kyori.adventure.audience.ForwardingAudience
,net.kyori.adventure.pointer.Pointered
,org.bukkit.plugin.messaging.PluginMessageRecipient
,org.bukkit.Server
The core class of the Glowstone server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.Single
Nested classes/interfaces inherited from interface org.bukkit.Server
org.bukkit.Server.Spigot
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The data version supported by the server.static final String
The game version supported by the server.static final Logger
The logger for this class.org.bukkit.permissions.Permission
Default root permissions.org.bukkit.permissions.Permission
Default root command permissions.static final int
The protocol version supported by the server.Fields inherited from interface org.bukkit.Server
BROADCAST_CHANNEL_ADMINISTRATIVE, BROADCAST_CHANNEL_USERS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdvancement
(org.bukkit.advancement.Advancement advancement) Registers an advancement to the advancement registry.boolean
addRecipe
(org.bukkit.inventory.Recipe recipe) Iterator<org.bukkit.advancement.Advancement>
@NonNull Iterable<? extends net.kyori.adventure.audience.Audience>
void
int
broadcast
(@NotNull net.kyori.adventure.text.Component message) int
int
void
broadcast
(net.md_5.bungee.api.chat.BaseComponent component) void
broadcast
(net.md_5.bungee.api.chat.BaseComponent... components) int
broadcastMessage
(String message) void
broadcastPacket
(com.flowpowered.network.Message message) Broadcasts a packet for all online players.void
@NotNull org.bukkit.inventory.ItemStack
craftItem
(@NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull org.bukkit.World world, @NotNull org.bukkit.entity.Player player) createAdvancementsMessage
(boolean clear, List<org.bukkit.NamespacedKey> remove, org.bukkit.entity.Player player) Creates anAdvancementsMessage
containing a list of advancements the server has, along with some extra actions.createAdvancementsMessage
(Map<org.bukkit.NamespacedKey, org.bukkit.advancement.Advancement> advancements, boolean clear, List<org.bukkit.NamespacedKey> remove, org.bukkit.entity.Player player) Creates anAdvancementsMessage
containing a given list of advancements, along with some extra actions.org.bukkit.block.data.BlockData
createBlockData
(String data) org.bukkit.block.data.BlockData
createBlockData
(org.bukkit.Material material) org.bukkit.block.data.BlockData
createBlockData
(org.bukkit.Material material, String data) org.bukkit.block.data.BlockData
createBlockData
(org.bukkit.Material material, Consumer<org.bukkit.block.data.BlockData> consumer) org.bukkit.boss.BossBar
createBossBar
(String title, org.bukkit.boss.BarColor color, org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag... flags) @NotNull org.bukkit.boss.KeyedBossBar
createBossBar
(org.bukkit.NamespacedKey key, String title, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, org.bukkit.boss.BarFlag... barFlags) org.bukkit.generator.ChunkGenerator.ChunkData
createChunkData
(org.bukkit.World world) @NotNull org.bukkit.command.CommandSender
createCommandSender
(@NotNull Consumer<? super net.kyori.adventure.text.Component> feedback) @NotNull org.bukkit.inventory.ItemStack
createExplorerMap
(@NotNull org.bukkit.World world, @NotNull org.bukkit.Location location, @NotNull org.bukkit.StructureType structureType) @NotNull org.bukkit.inventory.ItemStack
createExplorerMap
(@NotNull org.bukkit.World world, @NotNull org.bukkit.Location location, @NotNull org.bukkit.StructureType structureType, int i, boolean b) static GlowServer
createFromArguments
(String... args) Initialize a server using the command-line arguments.@NotNull org.bukkit.inventory.Inventory
createInventory
(@Nullable org.bukkit.inventory.InventoryHolder inventoryHolder, int i, @NotNull net.kyori.adventure.text.Component component) @NotNull org.bukkit.inventory.Inventory
createInventory
(@Nullable org.bukkit.inventory.InventoryHolder inventoryHolder, @NotNull org.bukkit.event.inventory.InventoryType inventoryType, @NotNull net.kyori.adventure.text.Component component) org.bukkit.inventory.Inventory
createInventory
(org.bukkit.inventory.InventoryHolder owner, int size) org.bukkit.inventory.Inventory
createInventory
(org.bukkit.inventory.InventoryHolder owner, int size, String title) org.bukkit.inventory.Inventory
createInventory
(org.bukkit.inventory.InventoryHolder owner, org.bukkit.event.inventory.InventoryType type) org.bukkit.inventory.Inventory
createInventory
(org.bukkit.inventory.InventoryHolder owner, org.bukkit.event.inventory.InventoryType type, String title) createMap
(org.bukkit.World world) @NotNull org.bukkit.inventory.Merchant
createMerchant
(@Nullable net.kyori.adventure.text.Component component) org.bukkit.inventory.Merchant
createMerchant
(String title) @NotNull org.bukkit.profile.PlayerProfile
createPlayerProfile
(@NotNull String name) @NotNull org.bukkit.profile.PlayerProfile
createPlayerProfile
(@NotNull UUID uniqueId) @NotNull org.bukkit.profile.PlayerProfile
createPlayerProfile
(@Nullable UUID uniqueId, @Nullable String name) createProfile
(String name) createProfile
(UUID id) createProfile
(UUID id, String name) createProfile
(UUID uuid, String name, boolean asyncLookup) Creates a player profile.@NotNull com.destroystokyo.paper.profile.PlayerProfile
createProfileExact
(@Nullable UUID uuid, @Nullable String name) org.bukkit.generator.ChunkGenerator.ChunkData
createVanillaChunkData
(org.bukkit.World world, int x, int z) createWorld
(org.bukkit.WorldCreator creator) @NotNull org.bukkit.WorldBorder
boolean
dispatchCommand
(org.bukkit.command.CommandSender sender, String commandLine) boolean
Gets whether the server is OpenCL-capable and allowed to use graphics compute functionality.org.bukkit.advancement.Advancement
getAdvancement
(org.bukkit.NamespacedKey namespacedKey) boolean
Gets whether the server allows client mods.boolean
boolean
boolean
int
int
boolean
Gets whether animal spawning is enabled.double
org.bukkit.BanList
getBanList
(org.bukkit.BanList.Type type) Set<org.bukkit.OfflinePlayer>
net.glowstone.block.data.BlockDataManager
What manages the mapping of Material to BlockData and the mapping between State ID and BlockData.@Nullable org.bukkit.boss.KeyedBossBar
getBossBar
(@NotNull org.bukkit.NamespacedKey namespacedKey) @NotNull Iterator<org.bukkit.boss.KeyedBossBar>
boolean
Whether the server uses the classic water flowing algorithm.org.bukkit.command.SimpleCommandMap
Gets the command map.int
Get the threshold to use for network compression defined in the config.Gets the server configuration.Returns the folder where configuration files are stored.long
Gets the server console's date format.Gets the server's console logs date format.Gets the server's console prompt.org.bukkit.command.ConsoleCommandSender
@Nullable org.bukkit.inventory.Recipe
getCraftingRecipe
(@NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull org.bukkit.World world) int
@NotNull io.papermc.paper.datapack.DatapackManager
org.bukkit.GameMode
org.bukkit.Difficulty
Get the default game difficulty defined in the config.org.bukkit.entity.Entity
Gets the entity id manager.The FishingRewards of this server.net.glowstone.datapack.FuelManager
Return the fuel manager.boolean
org.bukkit.help.HelpMap
boolean
int
getIp()
org.bukkit.inventory.ItemFactory
The key pair generated at server start up.org.bukkit.loot.LootTable
getLootTable
(@NotNull org.bukkit.NamespacedKey tableKey) getMap
(int id) Gets theMaterialValueManager
for this server.int
Gets the max building height of the server.int
int
org.bukkit.plugin.messaging.Messenger
com.destroystokyo.paper.entity.ai.MobGoals
int
boolean
Gets whether monster spawning is enabled.getMotd()
getName()
The network server used for network communication.org.bukkit.OfflinePlayer
getOfflinePlayer
(String name) Deprecated.org.bukkit.OfflinePlayer
getOfflinePlayer
(UUID uuid) org.bukkit.OfflinePlayer
getOfflinePlayer
(GlowPlayerProfile profile) Creates a newGlowOfflinePlayer
instance for the givenGlowPlayerProfile
.CompletableFuture<org.bukkit.OfflinePlayer>
getOfflinePlayerAsync
(String name) Creates a newGlowOfflinePlayer
instance for the given name.CompletableFuture<org.bukkit.OfflinePlayer>
getOfflinePlayerAsync
(UUID uuid) Creates a newGlowOfflinePlayer
instance for the given uuid.org.bukkit.OfflinePlayer
getOfflinePlayerIfCached
(@NotNull String username) org.bukkit.OfflinePlayer[]
CompletableFuture<org.bukkit.OfflinePlayer[]>
Gets every player that has ever played on this server.boolean
Collection<? extends org.bukkit.entity.Player>
Set<org.bukkit.OfflinePlayer>
Returns the list of operators on this server.@NotNull String
org.bukkit.entity.Player
org.bukkit.entity.Player
Returns the player data service attached to the first world.org.bukkit.entity.Player
getPlayerExact
(String name) int
Gets the maximum size of the player sample as shown on the client's server list when pinging the server.Returns the player statistics I/O service attached to the first world.getPlayerUniqueId
(String playerName) org.bukkit.command.PluginCommand
getPluginCommand
(String name) org.bukkit.plugin.PluginManager
@NotNull File
int
getPort()
@NotNull org.bukkit.potion.PotionBrewer
int
Get the time after a profile lookup should be cancelled.boolean
Get whether parsing of data provided by a proxy is enabled.Gets the modifiable set of the server's online players.org.bukkit.inventory.Recipe
getRecipe
(@NotNull org.bukkit.NamespacedKey key) net.glowstone.datapack.RecipeManager
Return the recipe manager.List<org.bukkit.inventory.Recipe>
getRecipesFor
(org.bukkit.inventory.ItemStack result) @NotNull String
Get the resource pack hash for this server, or the empty string if not set.@NotNull String
Get the resource pack url for this server, ornull
if not set.Returns the scoreboard I/O service attached to the first world.Gets the server type (e.g.org.bukkit.plugin.ServicesManager
Gets the session registry.int
int
getSpawnLimit
(@NotNull org.bukkit.entity.SpawnCategory spawnCategory) int
A list of detected files that are Sponge plugins.Gets the current storage provider factory, or null if none has been set by a plugin and the server has not started yet.@NotNull org.bukkit.structure.StructureManager
<T extends org.bukkit.Keyed>
org.bukkit.Tag<T><T extends org.bukkit.Keyed>
@NotNull Iterable<org.bukkit.Tag<T>>int
int
int
int
getTicksPerSpawns
(@NotNull org.bukkit.entity.SpawnCategory spawnCategory) int
int
int
long[]
double[]
getTPS()
org.bukkit.UnsafeValues
Deprecated.int
org.bukkit.Warning.WarningState
int
int
int
Returns the list of whitelisted players on this server.Set<org.bukkit.OfflinePlayer>
org.bukkit.World
getWorld
(@NotNull org.bukkit.NamespacedKey namespacedKey) static WorldConfig
Gets the world configuration for this server.List<org.bukkit.World>
boolean
boolean
Gets whether world generation is disabled on the server.boolean
boolean
boolean
Gets whether PVP is enabled on the server.boolean
boolean
boolean
boolean
Get whether worlds should keep their spawns loaded by default.org.bukkit.util.CachedServerIcon
loadServerIcon
(BufferedImage image) org.bukkit.util.CachedServerIcon
loadServerIcon
(File file) static void
Creates a new server on TCP port 25565 and starts listening for connections.List<org.bukkit.entity.Player>
matchPlayer
(String name) @NotNull net.kyori.adventure.text.Component
motd()
@NotNull net.kyori.adventure.text.Component
boolean
Get whether to populate chunks when they are anchored.Iterator<org.bukkit.inventory.Recipe>
void
reload()
Reloads the server, refreshing settings and plugin information.boolean
void
void
void
boolean
removeBossBar
(@NotNull org.bukkit.NamespacedKey namespacedKey) boolean
removeRecipe
(@NotNull org.bukkit.NamespacedKey key) void
void
run()
Starts the server starting sequence (starting, binding to port, etc.)void
@NotNull List<org.bukkit.entity.Entity>
selectEntities
(@NotNull org.bukkit.command.CommandSender commandSender, @NotNull String s) void
sendPlayerAbilities
(GlowPlayer player) Sends aGlowPlayer
their abilities regarding flying and walking.void
sendPluginMessage
(org.bukkit.plugin.Plugin source, String channel, byte[] message) void
setDefaultGameMode
(org.bukkit.GameMode mode) void
setIdleTimeout
(int timeout) void
Sets the IP address that the Query server will expose.void
setMaxPlayers
(int maxPlayers) void
setPlayerOnline
(GlowPlayer player, boolean online) Sets a player as being online internally.void
setPort
(int port) Sets the port that the Query server will expose.void
setSpawnRadius
(int value) void
setStorageProvider
(WorldStorageProviderFactory storageProviderFactory) If a storage provider factory has not yet been set, and the server has not fully started yet, this allows plugins to set a storage provider factory, which will be used to create a storage provider for each world.void
setWhitelist
(boolean enabled) void
setWhitelistEnforced
(boolean value) boolean
Gets whether the server should prevent player proxy connections.void
shutdown()
Stops this server.void
Stops this server, sending the specified message to all players on their kick screen.net.kyori.adventure.text.Component
org.bukkit.Server.Spigot
spigot()
void
start()
Starts this server.boolean
toString()
void
boolean
unloadWorld
(String name, boolean save) boolean
unloadWorld
(org.bukkit.World world, boolean save) boolean
Get whether to use color codes in Rcon responses.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.kyori.adventure.audience.Audience
openBook, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, showTitle, stopSound
Methods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, playSound, playSound, playSound, pointers, resetTitle, sendActionBar, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, stopSound
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
-
Field Details
-
logger
The logger for this class. -
GAME_VERSION
The game version supported by the server. -
PROTOCOL_VERSION
public static final int PROTOCOL_VERSIONThe protocol version supported by the server. -
DATA_VERSION
public static final int DATA_VERSIONThe data version supported by the server. -
permissionRoot
public org.bukkit.permissions.Permission permissionRootDefault root permissions. -
permissionRootCommand
public org.bukkit.permissions.Permission permissionRootCommandDefault root command permissions.
-
-
Constructor Details
-
GlowServer
Creates a new server.- Parameters:
config
- This server's config.
-
-
Method Details
-
main
Creates a new server on TCP port 25565 and starts listening for connections.- Parameters:
args
- The command-line arguments.
-
createFromArguments
Initialize a server using the command-line arguments.- Parameters:
args
- the command-line arguments- Returns:
- the new server, or null if the command-line arguments include e.g.
--version
-
run
public void run()Starts the server starting sequence (starting, binding to port, etc.) -
start
public void start()Starts this server. -
shutdown
public void shutdown()Stops this server.- Specified by:
shutdown
in interfaceorg.bukkit.Server
-
shutdown
Stops this server, sending the specified message to all players on their kick screen.- Parameters:
message
- Message to send to all players as they are kicked
-
getSpongePlugins
A list of detected files that are Sponge plugins.- Returns:
- a list of
Files
that are Sponge plugins.
-
reload
public void reload()Reloads the server, refreshing settings and plugin information.- Specified by:
reload
in interfaceorg.bukkit.Server
-
reloadData
public void reloadData()- Specified by:
reloadData
in interfaceorg.bukkit.Server
-
toString
-
getCommandMap
public org.bukkit.command.SimpleCommandMap getCommandMap()Gets the command map.- Specified by:
getCommandMap
in interfaceorg.bukkit.Server
- Returns:
- The
SimpleCommandMap
.
-
getAdvancement
public org.bukkit.advancement.Advancement getAdvancement(org.bukkit.NamespacedKey namespacedKey) - Specified by:
getAdvancement
in interfaceorg.bukkit.Server
-
advancementIterator
- Specified by:
advancementIterator
in interfaceorg.bukkit.Server
-
createBlockData
public org.bukkit.block.data.BlockData createBlockData(org.bukkit.Material material) - Specified by:
createBlockData
in interfaceorg.bukkit.Server
-
createBlockData
public org.bukkit.block.data.BlockData createBlockData(org.bukkit.Material material, Consumer<org.bukkit.block.data.BlockData> consumer) - Specified by:
createBlockData
in interfaceorg.bukkit.Server
-
createBlockData
- Specified by:
createBlockData
in interfaceorg.bukkit.Server
- Throws:
IllegalArgumentException
-
createBlockData
public org.bukkit.block.data.BlockData createBlockData(org.bukkit.Material material, String data) throws IllegalArgumentException - Specified by:
createBlockData
in interfaceorg.bukkit.Server
- Throws:
IllegalArgumentException
-
getTag
public <T extends org.bukkit.Keyed> org.bukkit.Tag<T> getTag(@NotNull @NotNull String registry, @NotNull @NotNull org.bukkit.NamespacedKey tagKey, @NotNull @NotNull Class<T> clazz) - Specified by:
getTag
in interfaceorg.bukkit.Server
-
getTags
@NotNull public <T extends org.bukkit.Keyed> @NotNull Iterable<org.bukkit.Tag<T>> getTags(@NotNull @NotNull String registry, @NotNull @NotNull Class<T> clazz) - Specified by:
getTags
in interfaceorg.bukkit.Server
-
getLootTable
public org.bukkit.loot.LootTable getLootTable(@NotNull @NotNull org.bukkit.NamespacedKey tableKey) - Specified by:
getLootTable
in interfaceorg.bukkit.Server
-
selectEntities
@NotNull public @NotNull List<org.bukkit.entity.Entity> selectEntities(@NotNull @NotNull org.bukkit.command.CommandSender commandSender, @NotNull @NotNull String s) throws IllegalArgumentException - Specified by:
selectEntities
in interfaceorg.bukkit.Server
- Throws:
IllegalArgumentException
-
getStructureManager
@NotNull public @NotNull org.bukkit.structure.StructureManager getStructureManager()- Specified by:
getStructureManager
in interfaceorg.bukkit.Server
-
addAdvancement
public void addAdvancement(org.bukkit.advancement.Advancement advancement) Registers an advancement to the advancement registry.- Parameters:
advancement
- the advancement to add.
-
createAdvancementsMessage
public AdvancementsMessage createAdvancementsMessage(boolean clear, List<org.bukkit.NamespacedKey> remove, org.bukkit.entity.Player player) Creates anAdvancementsMessage
containing a list of advancements the server has, along with some extra actions.This does not affect the server's advancement registry.
- Parameters:
clear
- whether to clear the advancements on the player's perspective.remove
- a list of advancementNamespacedKeys
to remove from the player's perspective.player
- the player this advancement message is for- Returns:
- a resulting
AdvancementsMessage
packet
-
createAdvancementsMessage
public AdvancementsMessage createAdvancementsMessage(Map<org.bukkit.NamespacedKey, org.bukkit.advancement.Advancement> advancements, boolean clear, List<org.bukkit.NamespacedKey> remove, org.bukkit.entity.Player player) Creates anAdvancementsMessage
containing a given list of advancements, along with some extra actions.This does not affect the server's advancement registry.
- Parameters:
advancements
- the advancements to add to the player's perspective.clear
- whether to clear the advancements on the player's perspective.remove
- a list of advancementNamespacedKeys
to remove from the player's perspective.player
- the player this advancement message is for- Returns:
- a resulting
AdvancementsMessage
packet
-
getSessionRegistry
Gets the session registry.- Returns:
- The
SessionRegistry
.
-
getEntityIdManager
Gets the entity id manager.- Returns:
- The
EntityIdManager
.
-
getOpsList
Returns the list of operators on this server.- Returns:
- A file containing a list of UUIDs for this server's operators.
-
getWhitelist
Returns the list of whitelisted players on this server.- Returns:
- A file containing a list of UUIDs for this server's whitelisted players.
-
setWhitelist
public void setWhitelist(boolean enabled) - Specified by:
setWhitelist
in interfaceorg.bukkit.Server
-
isWhitelistEnforced
public boolean isWhitelistEnforced()- Specified by:
isWhitelistEnforced
in interfaceorg.bukkit.Server
-
setWhitelistEnforced
public void setWhitelistEnforced(boolean value) - Specified by:
setWhitelistEnforced
in interfaceorg.bukkit.Server
-
getConfigDir
Returns the folder where configuration files are stored.- Returns:
- The server's configuration folder.
-
getRecipeManager
public net.glowstone.datapack.RecipeManager getRecipeManager()Return the recipe manager.- Returns:
- The server's recipe manager.
-
getFuelManager
public net.glowstone.datapack.FuelManager getFuelManager()Return the fuel manager.- Returns:
- The server's fuel manager.
-
getKeyPair
The key pair generated at server start up.- Returns:
- The key pair generated at server start up
-
getPlayerDataService
Returns the player data service attached to the first world.- Returns:
- The server's player data service.
-
getScoreboardIoService
Returns the scoreboard I/O service attached to the first world.- Returns:
- The server's scoreboard I/O service
-
getPlayerStatisticIoService
Returns the player statistics I/O service attached to the first world.- Returns:
- the server's statistics I/O service
-
getCompressionThreshold
public int getCompressionThreshold()Get the threshold to use for network compression defined in the config.- Returns:
- The compression threshold, or -1 for no compression.
-
getDifficulty
public org.bukkit.Difficulty getDifficulty()Get the default game difficulty defined in the config.- Returns:
- The default difficulty.
-
keepSpawnLoaded
public boolean keepSpawnLoaded()Get whether worlds should keep their spawns loaded by default.- Returns:
- Whether to keep spawns loaded by default.
-
populateAnchoredChunks
public boolean populateAnchoredChunks()Get whether to populate chunks when they are anchored.- Returns:
- Whether to populate chunks when they are anchored.
-
getProxySupport
public boolean getProxySupport()Get whether parsing of data provided by a proxy is enabled.- Returns:
- True if a proxy is providing data to use.
-
useRconColors
public boolean useRconColors()Get whether to use color codes in Rcon responses.- Returns:
- True if color codes will be present in Rcon responses
-
getMaterialValueManager
Gets theMaterialValueManager
for this server.- Returns:
- the
MaterialValueManager
for this server.
-
getResourcePackUrl
Get the resource pack url for this server, ornull
if not set.- Returns:
- The url of the resource pack to use, or
null
-
getResourcePackHash
Get the resource pack hash for this server, or the empty string if not set.- Specified by:
getResourcePackHash
in interfaceorg.bukkit.Server
- Returns:
- The hash of the resource pack, or the empty string
-
getResourcePackPrompt
- Specified by:
getResourcePackPrompt
in interfaceorg.bukkit.Server
-
isResourcePackRequired
public boolean isResourcePackRequired()- Specified by:
isResourcePackRequired
in interfaceorg.bukkit.Server
-
getProfileLookupTimeout
public int getProfileLookupTimeout()Get the time after a profile lookup should be cancelled.- Returns:
- The maximum lookup time in seconds or zero to never cancel the lookup.
-
setPlayerOnline
Sets a player as being online internally.- Parameters:
player
- player to set online/offlineonline
- whether the player is online or offline
-
getPluginsFolder
- Specified by:
getPluginsFolder
in interfaceorg.bukkit.Server
-
getName
- Specified by:
getName
in interfaceorg.bukkit.Server
-
getVersion
- Specified by:
getVersion
in interfaceorg.bukkit.Server
-
getBukkitVersion
- Specified by:
getBukkitVersion
in interfaceorg.bukkit.Server
-
getMinecraftVersion
- Specified by:
getMinecraftVersion
in interfaceorg.bukkit.Server
-
getLogger
- Specified by:
getLogger
in interfaceorg.bukkit.Server
-
isPrimaryThread
public boolean isPrimaryThread()- Specified by:
isPrimaryThread
in interfaceorg.bukkit.Server
-
getPluginManager
public org.bukkit.plugin.PluginManager getPluginManager()- Specified by:
getPluginManager
in interfaceorg.bukkit.Server
-
getScheduler
- Specified by:
getScheduler
in interfaceorg.bukkit.Server
-
getServicesManager
public org.bukkit.plugin.ServicesManager getServicesManager()- Specified by:
getServicesManager
in interfaceorg.bukkit.Server
-
getMessenger
public org.bukkit.plugin.messaging.Messenger getMessenger()- Specified by:
getMessenger
in interfaceorg.bukkit.Server
-
getHelpMap
public org.bukkit.help.HelpMap getHelpMap()- Specified by:
getHelpMap
in interfaceorg.bukkit.Server
-
getItemFactory
public org.bukkit.inventory.ItemFactory getItemFactory()- Specified by:
getItemFactory
in interfaceorg.bukkit.Server
-
getScoreboardManager
- Specified by:
getScoreboardManager
in interfaceorg.bukkit.Server
-
getUnsafe
Deprecated.- Specified by:
getUnsafe
in interfaceorg.bukkit.Server
-
spigot
public org.bukkit.Server.Spigot spigot()- Specified by:
spigot
in interfaceorg.bukkit.Server
-
reloadPermissions
public void reloadPermissions()- Specified by:
reloadPermissions
in interfaceorg.bukkit.Server
-
getEntity
- Specified by:
getEntity
in interfaceorg.bukkit.Server
-
reloadCommandAliases
public boolean reloadCommandAliases()- Specified by:
reloadCommandAliases
in interfaceorg.bukkit.Server
-
suggestPlayerNamesWhenNullTabCompletions
public boolean suggestPlayerNamesWhenNullTabCompletions()- Specified by:
suggestPlayerNamesWhenNullTabCompletions
in interfaceorg.bukkit.Server
-
getPermissionMessage
- Specified by:
getPermissionMessage
in interfaceorg.bukkit.Server
-
permissionMessage
@NotNull public @NotNull net.kyori.adventure.text.Component permissionMessage()- Specified by:
permissionMessage
in interfaceorg.bukkit.Server
-
createProfile
- Specified by:
createProfile
in interfaceorg.bukkit.Server
-
createProfile
- Specified by:
createProfile
in interfaceorg.bukkit.Server
-
createProfile
- Specified by:
createProfile
in interfaceorg.bukkit.Server
-
createProfileExact
public @NotNull com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable @Nullable UUID uuid, @Nullable @Nullable String name) - Specified by:
createProfileExact
in interfaceorg.bukkit.Server
-
createProfile
Creates a player profile.- Parameters:
name
- The player's name.uuid
- The player's UUID; may be null.asyncLookup
- If true anduuid
is null, the UUID is looked up asynchronously.- Returns:
- The player's profile.
-
getBanList
public org.bukkit.BanList getBanList(org.bukkit.BanList.Type type) - Specified by:
getBanList
in interfaceorg.bukkit.Server
-
getConsoleSender
public org.bukkit.command.ConsoleCommandSender getConsoleSender()- Specified by:
getConsoleSender
in interfaceorg.bukkit.Server
-
createCommandSender
@NotNull public @NotNull org.bukkit.command.CommandSender createCommandSender(@NotNull @NotNull Consumer<? super net.kyori.adventure.text.Component> feedback) - Specified by:
createCommandSender
in interfaceorg.bukkit.Server
-
getPluginCommand
- Specified by:
getPluginCommand
in interfaceorg.bukkit.Server
-
getCommandAliases
- Specified by:
getCommandAliases
in interfaceorg.bukkit.Server
-
dispatchCommand
public boolean dispatchCommand(org.bukkit.command.CommandSender sender, String commandLine) throws org.bukkit.command.CommandException - Specified by:
dispatchCommand
in interfaceorg.bukkit.Server
- Throws:
org.bukkit.command.CommandException
-
getOperators
- Specified by:
getOperators
in interfaceorg.bukkit.Server
-
getOnlinePlayers
- Specified by:
getOnlinePlayers
in interfaceorg.bukkit.Server
-
getRawOnlinePlayers
Gets the modifiable set of the server's online players.- Returns:
- the server's modifiable set of players.
-
getOfflinePlayers
public org.bukkit.OfflinePlayer[] getOfflinePlayers()- Specified by:
getOfflinePlayers
in interfaceorg.bukkit.Server
-
getOfflinePlayersAsync
Gets every player that has ever played on this server.- Returns:
- An OfflinePlayer[] future.
-
getPlayer
- Specified by:
getPlayer
in interfaceorg.bukkit.Server
-
getPlayer
- Specified by:
getPlayer
in interfaceorg.bukkit.Server
-
getPlayerUniqueId
- Specified by:
getPlayerUniqueId
in interfaceorg.bukkit.Server
-
getPlayerExact
- Specified by:
getPlayerExact
in interfaceorg.bukkit.Server
-
matchPlayer
- Specified by:
matchPlayer
in interfaceorg.bukkit.Server
-
getOfflinePlayer
Creates a newGlowOfflinePlayer
instance for the givenGlowPlayerProfile
.- Parameters:
profile
- the player's profile.- Returns:
- a new
GlowOfflinePlayer
instance for the given profile.
-
getOfflinePlayer
Deprecated.- Specified by:
getOfflinePlayer
in interfaceorg.bukkit.Server
-
getOfflinePlayer
- Specified by:
getOfflinePlayer
in interfaceorg.bukkit.Server
-
createPlayerProfile
@NotNull public @NotNull org.bukkit.profile.PlayerProfile createPlayerProfile(@Nullable @Nullable UUID uniqueId, @Nullable @Nullable String name) - Specified by:
createPlayerProfile
in interfaceorg.bukkit.Server
-
createPlayerProfile
@NotNull public @NotNull org.bukkit.profile.PlayerProfile createPlayerProfile(@NotNull @NotNull UUID uniqueId) - Specified by:
createPlayerProfile
in interfaceorg.bukkit.Server
-
createPlayerProfile
@NotNull public @NotNull org.bukkit.profile.PlayerProfile createPlayerProfile(@NotNull @NotNull String name) - Specified by:
createPlayerProfile
in interfaceorg.bukkit.Server
-
getOfflinePlayerIfCached
- Specified by:
getOfflinePlayerIfCached
in interfaceorg.bukkit.Server
-
getOfflinePlayerAsync
Creates a newGlowOfflinePlayer
instance for the given name.- Parameters:
name
- the player's name to look up.- Returns:
- a
GlowOfflinePlayer
future for the given name.
-
getOfflinePlayerAsync
Creates a newGlowOfflinePlayer
instance for the given uuid.- Parameters:
uuid
- the player's uuid.- Returns:
- a
GlowOfflinePlayer
future for the given name.
-
savePlayers
public void savePlayers()- Specified by:
savePlayers
in interfaceorg.bukkit.Server
-
broadcast
- Specified by:
broadcast
in interfaceorg.bukkit.Server
-
broadcast
public int broadcast(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
broadcast
in interfaceorg.bukkit.Server
-
broadcast
public int broadcast(@NotNull @NotNull net.kyori.adventure.text.Component component, @NotNull @NotNull String s) - Specified by:
broadcast
in interfaceorg.bukkit.Server
-
broadcast
public void broadcast(net.md_5.bungee.api.chat.BaseComponent component) - Specified by:
broadcast
in interfaceorg.bukkit.Server
-
broadcast
public void broadcast(net.md_5.bungee.api.chat.BaseComponent... components) - Specified by:
broadcast
in interfaceorg.bukkit.Server
-
broadcastMessage
- Specified by:
broadcastMessage
in interfaceorg.bukkit.Server
-
broadcastPacket
public void broadcastPacket(com.flowpowered.network.Message message) Broadcasts a packet for all online players.- Parameters:
message
- the packet to broadcast.
-
getWhitelistedPlayers
- Specified by:
getWhitelistedPlayers
in interfaceorg.bukkit.Server
-
reloadWhitelist
public void reloadWhitelist()- Specified by:
reloadWhitelist
in interfaceorg.bukkit.Server
-
getIPBans
- Specified by:
getIPBans
in interfaceorg.bukkit.Server
-
banIP
- Specified by:
banIP
in interfaceorg.bukkit.Server
-
unbanIP
- Specified by:
unbanIP
in interfaceorg.bukkit.Server
-
getBannedPlayers
- Specified by:
getBannedPlayers
in interfaceorg.bukkit.Server
-
sendPlayerAbilities
Sends aGlowPlayer
their abilities regarding flying and walking.- Parameters:
player
- The player who is being sent their abilities.
-
getWorld
- Specified by:
getWorld
in interfaceorg.bukkit.Server
-
getWorld
- Specified by:
getWorld
in interfaceorg.bukkit.Server
-
getWorld
public org.bukkit.World getWorld(@NotNull @NotNull org.bukkit.NamespacedKey namespacedKey) - Specified by:
getWorld
in interfaceorg.bukkit.Server
-
createWorldBorder
@NotNull public @NotNull org.bukkit.WorldBorder createWorldBorder()- Specified by:
createWorldBorder
in interfaceorg.bukkit.Server
-
getMap
- Specified by:
getMap
in interfaceorg.bukkit.Server
-
createMap
- Specified by:
createMap
in interfaceorg.bukkit.Server
-
createExplorerMap
@NotNull public @NotNull org.bukkit.inventory.ItemStack createExplorerMap(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.StructureType structureType) - Specified by:
createExplorerMap
in interfaceorg.bukkit.Server
-
createExplorerMap
@NotNull public @NotNull org.bukkit.inventory.ItemStack createExplorerMap(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.StructureType structureType, int i, boolean b) - Specified by:
createExplorerMap
in interfaceorg.bukkit.Server
-
getWorlds
- Specified by:
getWorlds
in interfaceorg.bukkit.Server
-
createWorld
- Specified by:
createWorld
in interfaceorg.bukkit.Server
-
unloadWorld
- Specified by:
unloadWorld
in interfaceorg.bukkit.Server
-
unloadWorld
public boolean unloadWorld(org.bukkit.World world, boolean save) - Specified by:
unloadWorld
in interfaceorg.bukkit.Server
-
getRecipesFor
- Specified by:
getRecipesFor
in interfaceorg.bukkit.Server
-
getRecipe
public org.bukkit.inventory.Recipe getRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key) - Specified by:
getRecipe
in interfaceorg.bukkit.Server
-
getCraftingRecipe
@Nullable public @Nullable org.bukkit.inventory.Recipe getCraftingRecipe(@NotNull @NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull @NotNull org.bukkit.World world) - Specified by:
getCraftingRecipe
in interfaceorg.bukkit.Server
-
craftItem
@NotNull public @NotNull org.bukkit.inventory.ItemStack craftItem(@NotNull @NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull @NotNull org.bukkit.World world, @NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
craftItem
in interfaceorg.bukkit.Server
-
recipeIterator
- Specified by:
recipeIterator
in interfaceorg.bukkit.Server
-
addRecipe
public boolean addRecipe(org.bukkit.inventory.Recipe recipe) - Specified by:
addRecipe
in interfaceorg.bukkit.Server
-
clearRecipes
public void clearRecipes()- Specified by:
clearRecipes
in interfaceorg.bukkit.Server
-
resetRecipes
public void resetRecipes()- Specified by:
resetRecipes
in interfaceorg.bukkit.Server
-
removeRecipe
public boolean removeRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key) - Specified by:
removeRecipe
in interfaceorg.bukkit.Server
-
createInventory
public org.bukkit.inventory.Inventory createInventory(org.bukkit.inventory.InventoryHolder owner, org.bukkit.event.inventory.InventoryType type) - Specified by:
createInventory
in interfaceorg.bukkit.Server
-
createInventory
@NotNull public @NotNull org.bukkit.inventory.Inventory createInventory(@Nullable @Nullable org.bukkit.inventory.InventoryHolder inventoryHolder, @NotNull @NotNull org.bukkit.event.inventory.InventoryType inventoryType, @NotNull @NotNull net.kyori.adventure.text.Component component) - Specified by:
createInventory
in interfaceorg.bukkit.Server
-
createInventory
public org.bukkit.inventory.Inventory createInventory(org.bukkit.inventory.InventoryHolder owner, org.bukkit.event.inventory.InventoryType type, String title) - Specified by:
createInventory
in interfaceorg.bukkit.Server
-
createInventory
public org.bukkit.inventory.Inventory createInventory(org.bukkit.inventory.InventoryHolder owner, int size) - Specified by:
createInventory
in interfaceorg.bukkit.Server
-
createInventory
@NotNull public @NotNull org.bukkit.inventory.Inventory createInventory(@Nullable @Nullable org.bukkit.inventory.InventoryHolder inventoryHolder, int i, @NotNull @NotNull net.kyori.adventure.text.Component component) throws IllegalArgumentException - Specified by:
createInventory
in interfaceorg.bukkit.Server
- Throws:
IllegalArgumentException
-
createInventory
public org.bukkit.inventory.Inventory createInventory(org.bukkit.inventory.InventoryHolder owner, int size, String title) - Specified by:
createInventory
in interfaceorg.bukkit.Server
-
createMerchant
@NotNull public @NotNull org.bukkit.inventory.Merchant createMerchant(@Nullable @Nullable net.kyori.adventure.text.Component component) - Specified by:
createMerchant
in interfaceorg.bukkit.Server
-
createMerchant
- Specified by:
createMerchant
in interfaceorg.bukkit.Server
-
getServerIcon
- Specified by:
getServerIcon
in interfaceorg.bukkit.Server
-
loadServerIcon
- Specified by:
loadServerIcon
in interfaceorg.bukkit.Server
- Throws:
Exception
-
loadServerIcon
- Specified by:
loadServerIcon
in interfaceorg.bukkit.Server
- Throws:
Exception
-
sendPluginMessage
- Specified by:
sendPluginMessage
in interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannels
in interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
getDefaultGameMode
public org.bukkit.GameMode getDefaultGameMode()- Specified by:
getDefaultGameMode
in interfaceorg.bukkit.Server
-
setDefaultGameMode
public void setDefaultGameMode(org.bukkit.GameMode mode) - Specified by:
setDefaultGameMode
in interfaceorg.bukkit.Server
-
getSpawnRadius
public int getSpawnRadius()- Specified by:
getSpawnRadius
in interfaceorg.bukkit.Server
-
setSpawnRadius
public void setSpawnRadius(int value) - Specified by:
setSpawnRadius
in interfaceorg.bukkit.Server
-
getHideOnlinePlayers
public boolean getHideOnlinePlayers()- Specified by:
getHideOnlinePlayers
in interfaceorg.bukkit.Server
-
hasWhitelist
public boolean hasWhitelist()- Specified by:
hasWhitelist
in interfaceorg.bukkit.Server
-
getWarningState
public org.bukkit.Warning.WarningState getWarningState()- Specified by:
getWarningState
in interfaceorg.bukkit.Server
-
getIdleTimeout
public int getIdleTimeout()- Specified by:
getIdleTimeout
in interfaceorg.bukkit.Server
-
setIdleTimeout
public void setIdleTimeout(int timeout) - Specified by:
setIdleTimeout
in interfaceorg.bukkit.Server
-
createChunkData
public org.bukkit.generator.ChunkGenerator.ChunkData createChunkData(org.bukkit.World world) - Specified by:
createChunkData
in interfaceorg.bukkit.Server
-
createVanillaChunkData
public org.bukkit.generator.ChunkGenerator.ChunkData createVanillaChunkData(org.bukkit.World world, int x, int z) - Specified by:
createVanillaChunkData
in interfaceorg.bukkit.Server
-
createBossBar
public org.bukkit.boss.BossBar createBossBar(String title, org.bukkit.boss.BarColor color, org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag... flags) - Specified by:
createBossBar
in interfaceorg.bukkit.Server
-
createBossBar
@NotNull public @NotNull org.bukkit.boss.KeyedBossBar createBossBar(org.bukkit.NamespacedKey key, @Nullable String title, org.bukkit.boss.BarColor barColor, org.bukkit.boss.BarStyle barStyle, org.bukkit.boss.BarFlag... barFlags) - Specified by:
createBossBar
in interfaceorg.bukkit.Server
-
getBossBars
- Specified by:
getBossBars
in interfaceorg.bukkit.Server
-
getBossBar
@Nullable public @Nullable org.bukkit.boss.KeyedBossBar getBossBar(@NotNull @NotNull org.bukkit.NamespacedKey namespacedKey) - Specified by:
getBossBar
in interfaceorg.bukkit.Server
-
removeBossBar
public boolean removeBossBar(@NotNull @NotNull org.bukkit.NamespacedKey namespacedKey) - Specified by:
removeBossBar
in interfaceorg.bukkit.Server
-
getTPS
public double[] getTPS()- Specified by:
getTPS
in interfaceorg.bukkit.Server
-
getPort
public int getPort()- Specified by:
getPort
in interfaceorg.bukkit.Server
-
setPort
public void setPort(int port) Sets the port that the Query server will expose.This does not change the port the server will run on.
- Parameters:
port
- the port number
-
getIp
- Specified by:
getIp
in interfaceorg.bukkit.Server
-
setIp
Sets the IP address that the Query server will expose.This does not change the IP address the server will run on.
- Parameters:
ip
- the IP address
-
getConfig
Gets the server configuration.- Returns:
- the server configuration.
-
getWorldConfig
Gets the world configuration for this server.- Returns:
- the world configuration for this server.
-
getServerName
-
getServerId
-
getUpdateFolder
- Specified by:
getUpdateFolder
in interfaceorg.bukkit.Server
-
getUpdateFolderFile
- Specified by:
getUpdateFolderFile
in interfaceorg.bukkit.Server
-
getOnlineMode
public boolean getOnlineMode()- Specified by:
getOnlineMode
in interfaceorg.bukkit.Server
-
getAllowNether
public boolean getAllowNether()- Specified by:
getAllowNether
in interfaceorg.bukkit.Server
-
getResourcePack
- Specified by:
getResourcePack
in interfaceorg.bukkit.Server
-
getAllowEnd
public boolean getAllowEnd()- Specified by:
getAllowEnd
in interfaceorg.bukkit.Server
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistance
in interfaceorg.bukkit.Server
-
getSimulationDistance
public int getSimulationDistance()- Specified by:
getSimulationDistance
in interfaceorg.bukkit.Server
-
getMotd
- Specified by:
getMotd
in interfaceorg.bukkit.Server
-
motd
@NotNull public @NotNull net.kyori.adventure.text.Component motd()- Specified by:
motd
in interfaceorg.bukkit.Server
-
getWorldContainer
- Specified by:
getWorldContainer
in interfaceorg.bukkit.Server
-
getWorldType
- Specified by:
getWorldType
in interfaceorg.bukkit.Server
-
getGenerateStructures
public boolean getGenerateStructures()- Specified by:
getGenerateStructures
in interfaceorg.bukkit.Server
-
getConnectionThrottle
public long getConnectionThrottle()- Specified by:
getConnectionThrottle
in interfaceorg.bukkit.Server
-
getMonstersSpawnEnabled
public boolean getMonstersSpawnEnabled()Gets whether monster spawning is enabled.- Returns:
- true if monster spawning is enabled, false otherwise.
-
getAnimalsSpawnEnabled
public boolean getAnimalsSpawnEnabled()Gets whether animal spawning is enabled.- Returns:
- true if animal spawning is enabled, false otherwise.
-
getTicksPerAnimalSpawns
public int getTicksPerAnimalSpawns()- Specified by:
getTicksPerAnimalSpawns
in interfaceorg.bukkit.Server
-
getTicksPerMonsterSpawns
public int getTicksPerMonsterSpawns()- Specified by:
getTicksPerMonsterSpawns
in interfaceorg.bukkit.Server
-
getTicksPerWaterSpawns
public int getTicksPerWaterSpawns()- Specified by:
getTicksPerWaterSpawns
in interfaceorg.bukkit.Server
-
getTicksPerWaterAmbientSpawns
public int getTicksPerWaterAmbientSpawns()- Specified by:
getTicksPerWaterAmbientSpawns
in interfaceorg.bukkit.Server
-
getTicksPerWaterUndergroundCreatureSpawns
public int getTicksPerWaterUndergroundCreatureSpawns()- Specified by:
getTicksPerWaterUndergroundCreatureSpawns
in interfaceorg.bukkit.Server
-
getTicksPerAmbientSpawns
public int getTicksPerAmbientSpawns()- Specified by:
getTicksPerAmbientSpawns
in interfaceorg.bukkit.Server
-
getTicksPerSpawns
public int getTicksPerSpawns(@NotNull @NotNull org.bukkit.entity.SpawnCategory spawnCategory) - Specified by:
getTicksPerSpawns
in interfaceorg.bukkit.Server
-
getTickTimes
public long[] getTickTimes()- Specified by:
getTickTimes
in interfaceorg.bukkit.Server
-
getAverageTickTime
public double getAverageTickTime()- Specified by:
getAverageTickTime
in interfaceorg.bukkit.Server
-
getCurrentTick
public int getCurrentTick()- Specified by:
getCurrentTick
in interfaceorg.bukkit.Server
-
isStopping
public boolean isStopping()- Specified by:
isStopping
in interfaceorg.bukkit.Server
-
getMobGoals
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals()- Specified by:
getMobGoals
in interfaceorg.bukkit.Server
-
getDatapackManager
@NotNull public @NotNull io.papermc.paper.datapack.DatapackManager getDatapackManager()- Specified by:
getDatapackManager
in interfaceorg.bukkit.Server
-
getPotionBrewer
@NotNull public @NotNull org.bukkit.potion.PotionBrewer getPotionBrewer()- Specified by:
getPotionBrewer
in interfaceorg.bukkit.Server
-
isHardcore
public boolean isHardcore()- Specified by:
isHardcore
in interfaceorg.bukkit.Server
-
isPvpEnabled
public boolean isPvpEnabled()Gets whether PVP is enabled on the server.- Returns:
- true if PVP is enabled on the server, false otherwise.
-
getMonsterSpawnLimit
public int getMonsterSpawnLimit()- Specified by:
getMonsterSpawnLimit
in interfaceorg.bukkit.Server
-
getAnimalSpawnLimit
public int getAnimalSpawnLimit()- Specified by:
getAnimalSpawnLimit
in interfaceorg.bukkit.Server
-
getWaterAnimalSpawnLimit
public int getWaterAnimalSpawnLimit()- Specified by:
getWaterAnimalSpawnLimit
in interfaceorg.bukkit.Server
-
getAmbientSpawnLimit
public int getAmbientSpawnLimit()- Specified by:
getAmbientSpawnLimit
in interfaceorg.bukkit.Server
-
getSpawnLimit
public int getSpawnLimit(@NotNull @NotNull org.bukkit.entity.SpawnCategory spawnCategory) - Specified by:
getSpawnLimit
in interfaceorg.bukkit.Server
-
getWaterAmbientSpawnLimit
public int getWaterAmbientSpawnLimit()- Specified by:
getWaterAmbientSpawnLimit
in interfaceorg.bukkit.Server
-
getWaterUndergroundCreatureSpawnLimit
public int getWaterUndergroundCreatureSpawnLimit()- Specified by:
getWaterUndergroundCreatureSpawnLimit
in interfaceorg.bukkit.Server
-
getShutdownMessage
- Specified by:
getShutdownMessage
in interfaceorg.bukkit.Server
-
shutdownMessage
@Nullable public net.kyori.adventure.text.Component shutdownMessage()- Specified by:
shutdownMessage
in interfaceorg.bukkit.Server
-
getAllowFlight
public boolean getAllowFlight()- Specified by:
getAllowFlight
in interfaceorg.bukkit.Server
-
getMaxBuildHeight
public int getMaxBuildHeight()Gets the max building height of the server.- Returns:
- the max building height of the server, in blocks.
-
getMaxWorldSize
public int getMaxWorldSize()- Specified by:
getMaxWorldSize
in interfaceorg.bukkit.Server
-
getClassicWater
public boolean getClassicWater()Whether the server uses the classic water flowing algorithm.- Returns:
- true if the server uses the classic water flowing algorithm, false otherwise.
-
getConsolePrompt
Gets the server's console prompt.- Returns:
- the server's console prompt.
-
getConsoleDateFormat
Gets the server console's date format.- Returns:
- the server console's date format.
-
getConsoleLogDateFormat
Gets the server's console logs date format.- Returns:
- the server's console logs date format.
-
getServerType
Gets the server type (e.g. VANILLA, BUKKIT, FML). The server type is meant to be read by mods and thus is not localized server-side. It is output to clients byStatusRequestHandler.handle(GlowSession, StatusRequestMessage)
, but should be ignored by vanilla clients and localized client-side by modded clients aware of it.Currently, this value is set to
VANILLA
.- Returns:
- the server type.
-
getAllowClientMods
public boolean getAllowClientMods()Gets whether the server allows client mods.This rule is not actually enforced, and is simply exposed to clients as a warning.
- Returns:
- true if client mods are allowed, false otherwise.
-
getPlayerSampleCount
public int getPlayerSampleCount()Gets the maximum size of the player sample as shown on the client's server list when pinging the server.- Returns:
- the maximum size of the player sample as shown on the client's server list.
-
isGenerationDisabled
public boolean isGenerationDisabled()Gets whether world generation is disabled on the server.- Returns:
- true if world generation is disabled on the server, false otherwise.
-
doesUseGraphicsCompute
public boolean doesUseGraphicsCompute()Gets whether the server is OpenCL-capable and allowed to use graphics compute functionality.- Returns:
- true if the server is capable and allowed to use graphics compute functionality, false otherwise.
-
shouldPreventProxy
public boolean shouldPreventProxy()Gets whether the server should prevent player proxy connections.- Returns:
- true if the server should prevent player proxy connections, false otherwise.
-
getStorageProviderFactory
Gets the current storage provider factory, or null if none has been set by a plugin and the server has not started yet. The storage provider factory will be used to initialize storage for each world.- Returns:
- The current storage provider, or null.
-
setStorageProvider
If a storage provider factory has not yet been set, and the server has not fully started yet, this allows plugins to set a storage provider factory, which will be used to create a storage provider for each world. Otherwise, this will throw anIllegalStateException
.- Parameters:
storageProviderFactory
- The world storage provider that is attempting to be set.
-
audiences
- Specified by:
audiences
in interfacenet.kyori.adventure.audience.ForwardingAudience
-
getBlockDataManager
public net.glowstone.block.data.BlockDataManager getBlockDataManager()What manages the mapping of Material to BlockData and the mapping between State ID and BlockData. -
getNetworkServer
The network server used for network communication. -
getFishingRewardManager
The FishingRewards of this server. -
getMaxPlayers
public int getMaxPlayers()- Specified by:
getMaxPlayers
in interfaceorg.bukkit.Server
-
setMaxPlayers
public void setMaxPlayers(int maxPlayers) - Specified by:
setMaxPlayers
in interfaceorg.bukkit.Server
-
getRegistry
-