Package be.seeseemelk.mockbukkit
Class ServerMock
java.lang.Object
org.bukkit.Server.Spigot
be.seeseemelk.mockbukkit.ServerMock
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.audience.ForwardingAudience,net.kyori.adventure.pointer.Pointered,PluginMessageRecipient,Server
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.SingleNested classes/interfaces inherited from interface org.bukkit.Server
Server.Spigot -
Field Summary
Fields inherited from interface org.bukkit.Server
BROADCAST_CHANNEL_ADMINISTRATIVE, BROADCAST_CHANNEL_USERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PlayerMockCreates a random player and adds it.voidaddPlayer(@NotNull PlayerMock player) Add a specific player to the set.@NotNull PlayerMockCreates a player with a given name and adds it.boolean@NotNull WorldMockaddSimpleWorld(String name) Adds a very simple super flat world with a given name.voidaddTagRegistry(@NotNull TagRegistry registry) voidAdds the given mocked world to this server.@NotNull Iterator<Advancement>@NotNull Iterable<? extends net.kyori.adventure.audience.Audience>voidintDeprecated.intbroadcast(@NotNull net.kyori.adventure.text.Component message) intvoidbroadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) Deprecated.voidbroadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) Deprecated.intbroadcastMessage(@NotNull String message) Deprecated.void@NotNull ItemStack@NotNull BlockDatacreateBlockData(@NotNull Material material) @NotNull BlockDatacreateBlockData(@NotNull Material material, @Nullable Consumer<BlockData> consumer) @NotNull BlockDatacreateBlockData(String data) @NotNull BlockDatacreateBlockData(Material material, String data) @NotNull BossBarcreateBossBar(@NotNull String title, @NotNull BarColor color, @NotNull BarStyle style, BarFlag... flags) @NotNull KeyedBossBarcreateBossBar(@NotNull NamespacedKey key, @NotNull String title, @NotNull BarColor color, @NotNull BarStyle style, BarFlag... flags) @NotNull ChunkGenerator.ChunkDatacreateChunkData(@NotNull World world) @NotNull CommandSendercreateCommandSender(@NotNull Consumer<? super net.kyori.adventure.text.Component> feedback) @NotNull ItemStackcreateExplorerMap(World world, Location location, StructureType structureType) @NotNull ItemStackcreateExplorerMap(World world, Location location, StructureType structureType, int radius, boolean findUnexplored) @NotNull InventoryMockcreateInventory(@Nullable InventoryHolder owner, int size, @NotNull net.kyori.adventure.text.Component title) @NotNull InventoryMockcreateInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull net.kyori.adventure.text.Component title) @NotNull InventoryMockcreateInventory(InventoryHolder owner, int size) @NotNull InventoryMockcreateInventory(InventoryHolder owner, int size, String title) Deprecated.@NotNull InventoryMockcreateInventory(InventoryHolder owner, @NotNull InventoryType type) @NotNull InventoryMockcreateInventory(InventoryHolder owner, @NotNull InventoryType type, String title) Deprecated.@NotNull InventoryMockcreateInventory(InventoryHolder owner, @NotNull InventoryType type, String title, int size) Deprecated.@NotNull MapViewMockcreateMaterialTag(@NotNull NamespacedKey key, @NotNull String registryKey, @NotNull Material... materials) This creates a new MockTagfor theMaterialclass.
Call this in advance before you are gonna accessgetTag(String, NamespacedKey, Class)or any of the constants defined inTag.@NotNull MerchantcreateMerchant(@Nullable net.kyori.adventure.text.Component title) @NotNull MerchantcreateMerchant(String title) Deprecated.@NotNull PlayerProfileMockcreatePlayerProfile(@NotNull String name) Deprecated.@NotNull PlayerProfileMockcreatePlayerProfile(@NotNull UUID uniqueId) Deprecated.@NotNull PlayerProfileMockcreatePlayerProfile(@Nullable UUID uniqueId, @Nullable String name) Deprecated.@NotNull PlayerProfileMockcreateProfile(@NotNull String name) @NotNull PlayerProfileMockcreateProfile(@NotNull UUID uuid) @NotNull PlayerProfileMockcreateProfile(@Nullable UUID uuid, @Nullable String name) @NotNull PlayerProfileMockcreateProfileExact(@Nullable UUID uuid, @Nullable String name) @NotNull ChunkGenerator.ChunkDatacreateVanillaChunkData(@NotNull World world, int x, int z) Deprecated, for removal: This API element is subject to removal in a future version.createWorld(@NotNull WorldCreator creator) @NotNull WorldBorderbooleandispatchCommand(@NotNull CommandSender sender, @NotNull String commandLine) @NotNull CommandResultexecute(@NotNull String command, CommandSender sender, String... args) Executes a command.@NotNull CommandResultexecute(@NotNull Command command, CommandSender sender, String... args) Executes a command.@NotNull CommandResultexecuteConsole(@NotNull String command, String... args) Executes a command as the console.@NotNull CommandResultexecuteConsole(@NotNull Command command, String... args) Executes a command as the console.@NotNull CommandResultexecutePlayer(@NotNull String command, String... args) Executes a command as a player.@NotNull CommandResultexecutePlayer(@NotNull Command command, String... args) Executes a command as a player.booleanbooleanbooleanintDeprecated.intDeprecated.double@NotNull BanListgetBanList(@NotNull BanList.Type type) @NotNull Set<OfflinePlayer>getBossBar(NamespacedKey key) @NotNull Iterator<KeyedBossBar>@NotNull String@NotNull MockCommandMapgetCommandTabComplete(@NotNull CommandSender sender, @NotNull String commandLine) @NotNull YamlConfigurationlong@NotNull ConsoleCommandSenderMock@Nullable RecipegetCraftingRecipe(@NotNull ItemStack[] craftingMatrix, @NotNull World world) protected longThis returns the current time of theServerin millisecondsint@NotNull DatapackManager@NotNull GameMode@NotNull Set<EntityMock>Returns a set of entities that exist on the server instance.@Nullable Entityboolean@NotNull HelpMapMockbooleanint@NotNull StringgetIp()@NotNull ItemFactoryMock@NotNull LoggergetMap(int id) Deprecated.intintint@NotNull Messenger@NotNull String@NotNull MobGoalsintDeprecated.@NotNull StringgetMotd()Deprecated.@NotNull StringgetName()@NotNull OfflinePlayergetOfflinePlayer(@NotNull String name) Deprecated.@NotNull OfflinePlayergetOfflinePlayer(@NotNull UUID id) @Nullable OfflinePlayergetOfflinePlayerIfCached(@NotNull String name) OfflinePlayer @NotNull []boolean@NotNull Collection<? extends PlayerMock>@NotNull Set<OfflinePlayer>@NotNull String@NotNull PlayerMockgetPlayer(int num) Get a specific mock player.getPlayerExact(@NotNull String name) @NotNull MockPlayerListReturns theMockPlayerListinstance that is used by this server.@Nullable UUIDgetPlayerUniqueId(@NotNull String playerName) getPluginCommand(@NotNull String name) @NotNull PluginManagerMock@NotNull FileintgetPort()@NotNull PotionBrewergetRecipe(NamespacedKey key) getRecipesFor(@NotNull ItemStack item) getRegistry(@NotNull Class<T> tClass) @NotNull String@NotNull String@NotNull String@NotNull BukkitSchedulerMock@NotNull CriteriagetScoreboardCriteria(@NotNull String name) @NotNull ScoreboardManagerMock@NotNull ServicesManagerMockDeprecated.intintgetSpawnLimit(@NotNull SpawnCategory spawnCategory) int@NotNull StructureManagergetTag(String registryKey, NamespacedKey key, Class<T> clazz) intDeprecated.intDeprecated.intDeprecated.intgetTicksPerSpawns(@NotNull SpawnCategory spawnCategory) intintDeprecated.intDeprecated.@org.jetbrains.annotations.NotNull long[]@org.jetbrains.annotations.NotNull double[]getTPS()@NotNull MockUnsafeValuesDeprecated.@NotNull String@NotNull File@NotNull Stringint@NotNull Warning.WarningStateintDeprecated.intDeprecated.intDeprecated.@NotNull Set<OfflinePlayer>@Nullable WorldgetWorld(@NotNull NamespacedKey worldKey) @NotNull File@NotNull StringbooleanbooleanbooleanbooleanChecks if we are on the main thread.booleanbooleanbooleanboolean@NotNull CachedServerIconloadServerIcon(BufferedImage image) @NotNull CachedServerIconloadServerIcon(File file) matchPlayer(@NotNull String name) @NotNull net.kyori.adventure.text.Componentmotd()@NotNull net.kyori.adventure.text.ComponentvoidregisterEntity(@NotNull EntityMock entity) Registers an entity so that the server can track it more easily.static voidRegisters any classes that are serializable with the ConfigurationSerializable system of Bukkit.voidreload()booleanvoidvoidvoidbooleanbooleanvoidvoidrestart()voidselectEntities(CommandSender sender, String selector) voidsendPluginMessage(@NotNull Plugin source, @NotNull String channel, byte[] message) voidsetDefaultGameMode(GameMode mode) voidsetIdleTimeout(int threshold) voidsetMaxPlayers(int maxPlayers) voidsetOfflinePlayers(int num) Set the numbers of mock offline players that are on this server.voidsetPlayers(int num) Set the numbers of mock players that are on this server.voidsetSpawnRadius(int spawnRadius) voidsetWarningState(@NotNull Warning.WarningState warningState) Sets the return value ofgetWarningState().voidsetWhitelist(boolean value) voidsetWhitelistEnforced(boolean value) booleanvoidshutdown()@Nullable net.kyori.adventure.text.Component@NotNull Server.Spigotspigot()booleanvoidbooleanunloadWorld(String name, boolean save) booleanunloadWorld(World world, boolean save) Methods inherited from class org.bukkit.Server.Spigot
getBukkitConfig, getPaperConfig, getSpigotConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
openBook, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, showTitle, stopSoundMethods 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, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
-
Constructor Details
-
ServerMock
public ServerMock()
-
-
Method Details
-
isOnMainThread
public boolean isOnMainThread()Checks if we are on the main thread. The main thread is the thread used to create this instance of the mock server.- Returns:
trueif we are on the main thread,falseif we are running on a different thread.
-
registerEntity
Registers an entity so that the server can track it more easily. Should only be used internally.- Parameters:
entity- The entity to register
-
getEntities
Returns a set of entities that exist on the server instance.- Returns:
- A set of entities that exist on this server instance.
-
addPlayer
Add a specific player to the set.- Parameters:
player- The player to add.
-
addPlayer
Creates a random player and adds it.- Returns:
- The player that was added.
-
addPlayer
Creates a player with a given name and adds it.- Parameters:
name- The name to give to the player.- Returns:
- The added player.
-
setPlayers
public void setPlayers(int num) Set the numbers of mock players that are on this server. Note that it will remove all players that are already on this server.- Parameters:
num- The number of players that are on this server.
-
setOfflinePlayers
public void setOfflinePlayers(int num) Set the numbers of mock offline players that are on this server. Note that even players that are online are also considered offline player because anOfflinePlayerreally just refers to anyone that has at some point in time played on the server.- Parameters:
num- The number of players that are on this server.
-
getPlayer
Get a specific mock player. A player's number will never change between invocations ofsetPlayers(int).- Parameters:
num- The number of the player to retrieve.- Returns:
- The chosen player.
-
getPlayerList
Returns theMockPlayerListinstance that is used by this server.- Returns:
- The
MockPlayerListinstance.
-
getPlayerUniqueId
- Specified by:
getPlayerUniqueIdin interfaceServer
-
addSimpleWorld
Adds a very simple super flat world with a given name.- Parameters:
name- The name to give to the world.- Returns:
- The
WorldMockthat has been created.
-
addWorld
Adds the given mocked world to this server.- Parameters:
world- The world to add.
-
executeConsole
@NotNull public @NotNull CommandResult executeConsole(@NotNull @NotNull Command command, String... args) Executes a command as the console.- Parameters:
command- The command to execute.args- The arguments to pass to the commands.- Returns:
- The value returned by
Command.execute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[]).
-
executeConsole
@NotNull public @NotNull CommandResult executeConsole(@NotNull @NotNull String command, String... args) Executes a command as the console.- Parameters:
command- The command to execute.args- The arguments to pass to the commands.- Returns:
- The value returned by
Command.execute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[]).
-
executePlayer
@NotNull public @NotNull CommandResult executePlayer(@NotNull @NotNull Command command, String... args) Executes a command as a player.- Parameters:
command- The command to execute.args- The arguments to pass to the commands.- Returns:
- The value returned by
Command.execute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[]).
-
executePlayer
@NotNull public @NotNull CommandResult executePlayer(@NotNull @NotNull String command, String... args) Executes a command as a player.- Parameters:
command- The command to execute.args- The arguments to pass to the commands.- Returns:
- The value returned by
Command.execute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[]).
-
execute
@NotNull public @NotNull CommandResult execute(@NotNull @NotNull Command command, CommandSender sender, String... args) Executes a command.- Parameters:
command- The command to execute.sender- The person that executed the command.args- The arguments to pass to the commands.- Returns:
- The value returned by
Command.execute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[]).
-
execute
@NotNull public @NotNull CommandResult execute(@NotNull @NotNull String command, CommandSender sender, String... args) Executes a command.- Parameters:
command- The command to execute.sender- The person that executed the command.args- The arguments to pass to the commands.- Returns:
- The value returned by
Command.execute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[]).
-
getName
-
getVersion
- Specified by:
getVersionin interfaceServer
-
getBukkitVersion
- Specified by:
getBukkitVersionin interfaceServer
-
getMinecraftVersion
- Specified by:
getMinecraftVersionin interfaceServer
-
getOnlinePlayers
- Specified by:
getOnlinePlayersin interfaceServer
-
getOfflinePlayers
- Specified by:
getOfflinePlayersin interfaceServer
-
getOfflinePlayerIfCached
- Specified by:
getOfflinePlayerIfCachedin interfaceServer
-
getPlayer
-
getPlayerExact
- Specified by:
getPlayerExactin interfaceServer
-
matchPlayer
- Specified by:
matchPlayerin interfaceServer
-
getPlayer
-
getPluginManager
- Specified by:
getPluginManagerin interfaceServer
-
getCommandMap
- Specified by:
getCommandMapin interfaceServer
-
getPluginCommand
- Specified by:
getPluginCommandin interfaceServer
-
getLogger
-
getConsoleSender
- Specified by:
getConsoleSenderin interfaceServer
-
createCommandSender
@NotNull public @NotNull CommandSender createCommandSender(@NotNull @NotNull Consumer<? super net.kyori.adventure.text.Component> feedback) - Specified by:
createCommandSenderin interfaceServer
-
createInventory
@NotNull @Deprecated public @NotNull InventoryMock createInventory(InventoryHolder owner, @NotNull @NotNull InventoryType type, String title, int size) Deprecated. -
createInventory
@NotNull public @NotNull InventoryMock createInventory(InventoryHolder owner, @NotNull @NotNull InventoryType type) - Specified by:
createInventoryin interfaceServer
-
createInventory
@NotNull public @NotNull InventoryMock createInventory(@Nullable @Nullable InventoryHolder owner, @NotNull @NotNull InventoryType type, @NotNull @NotNull net.kyori.adventure.text.Component title) - Specified by:
createInventoryin interfaceServer
-
createInventory
@Deprecated @NotNull public @NotNull InventoryMock createInventory(InventoryHolder owner, @NotNull @NotNull InventoryType type, String title) Deprecated.- Specified by:
createInventoryin interfaceServer
-
createInventory
- Specified by:
createInventoryin interfaceServer
-
createInventory
@NotNull public @NotNull InventoryMock createInventory(@Nullable @Nullable InventoryHolder owner, int size, @NotNull @NotNull net.kyori.adventure.text.Component title) throws IllegalArgumentException - Specified by:
createInventoryin interfaceServer- Throws:
IllegalArgumentException
-
createInventory
@Deprecated @NotNull public @NotNull InventoryMock createInventory(InventoryHolder owner, int size, String title) Deprecated.- Specified by:
createInventoryin interfaceServer
-
createMerchant
@NotNull public @NotNull Merchant createMerchant(@Nullable @Nullable net.kyori.adventure.text.Component title) - Specified by:
createMerchantin interfaceServer
-
getItemFactory
- Specified by:
getItemFactoryin interfaceServer
-
getWorlds
-
getWorld
-
getWorld
-
getWorld
-
createWorldBorder
- Specified by:
createWorldBorderin interfaceServer
-
getScheduler
- Specified by:
getSchedulerin interfaceServer
-
getMaxPlayers
public int getMaxPlayers()- Specified by:
getMaxPlayersin interfaceServer
-
setMaxPlayers
public void setMaxPlayers(int maxPlayers) - Specified by:
setMaxPlayersin interfaceServer
-
getIPBans
-
banIP
-
unbanIP
-
getBanList
- Specified by:
getBanListin interfaceServer
-
getOperators
- Specified by:
getOperatorsin interfaceServer
-
getDefaultGameMode
- Specified by:
getDefaultGameModein interfaceServer
-
setDefaultGameMode
- Specified by:
setDefaultGameModein interfaceServer
-
broadcastMessage
Deprecated.- Specified by:
broadcastMessagein interfaceServer
-
broadcast
@Deprecated public int broadcast(@NotNull @NotNull String message, @NotNull @NotNull String permission) Deprecated. -
broadcast
public int broadcast(@NotNull @NotNull net.kyori.adventure.text.Component message) -
broadcast
public int broadcast(@NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull String permission) -
registerSerializables
public static void registerSerializables()Registers any classes that are serializable with the ConfigurationSerializable system of Bukkit. -
addRecipe
-
getRecipesFor
- Specified by:
getRecipesForin interfaceServer
-
getRecipe
-
getCraftingRecipe
@Nullable public @Nullable Recipe getCraftingRecipe(@NotNull @NotNull ItemStack[] craftingMatrix, @NotNull @NotNull World world) - Specified by:
getCraftingRecipein interfaceServer
-
craftItem
-
removeRecipe
- Specified by:
removeRecipein interfaceServer
-
recipeIterator
- Specified by:
recipeIteratorin interfaceServer
-
clearRecipes
public void clearRecipes()- Specified by:
clearRecipesin interfaceServer
-
dispatchCommand
public boolean dispatchCommand(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String commandLine) - Specified by:
dispatchCommandin interfaceServer
-
getCommandTabComplete
@NotNull public @NotNull List<String> getCommandTabComplete(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String commandLine) -
getHelpMap
- Specified by:
getHelpMapin interfaceServer
-
sendPluginMessage
public void sendPluginMessage(@NotNull @NotNull Plugin source, @NotNull @NotNull String channel, byte[] message) - Specified by:
sendPluginMessagein interfacePluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannelsin interfacePluginMessageRecipient
-
getPort
public int getPort() -
getViewDistance
public int getViewDistance()- Specified by:
getViewDistancein interfaceServer
-
getIp
-
getWorldType
- Specified by:
getWorldTypein interfaceServer
-
getGenerateStructures
public boolean getGenerateStructures()- Specified by:
getGenerateStructuresin interfaceServer
-
getAllowEnd
public boolean getAllowEnd()- Specified by:
getAllowEndin interfaceServer
-
getAllowNether
public boolean getAllowNether()- Specified by:
getAllowNetherin interfaceServer
-
getResourcePack
- Specified by:
getResourcePackin interfaceServer
-
getResourcePackHash
- Specified by:
getResourcePackHashin interfaceServer
-
getResourcePackPrompt
- Specified by:
getResourcePackPromptin interfaceServer
-
isResourcePackRequired
public boolean isResourcePackRequired()- Specified by:
isResourcePackRequiredin interfaceServer
-
hasWhitelist
public boolean hasWhitelist()- Specified by:
hasWhitelistin interfaceServer
-
setWhitelist
public void setWhitelist(boolean value) - Specified by:
setWhitelistin interfaceServer
-
isWhitelistEnforced
public boolean isWhitelistEnforced()- Specified by:
isWhitelistEnforcedin interfaceServer
-
setWhitelistEnforced
public void setWhitelistEnforced(boolean value) - Specified by:
setWhitelistEnforcedin interfaceServer
-
getWhitelistedPlayers
- Specified by:
getWhitelistedPlayersin interfaceServer
-
reloadWhitelist
public void reloadWhitelist()- Specified by:
reloadWhitelistin interfaceServer
-
getUpdateFolder
- Specified by:
getUpdateFolderin interfaceServer
-
getUpdateFolderFile
- Specified by:
getUpdateFolderFilein interfaceServer
-
getConnectionThrottle
public long getConnectionThrottle()- Specified by:
getConnectionThrottlein interfaceServer
-
getTicksPerAnimalSpawns
Deprecated.- Specified by:
getTicksPerAnimalSpawnsin interfaceServer
-
getTicksPerMonsterSpawns
Deprecated.- Specified by:
getTicksPerMonsterSpawnsin interfaceServer
-
getServicesManager
- Specified by:
getServicesManagerin interfaceServer
-
createWorld
- Specified by:
createWorldin interfaceServer
-
unloadWorld
- Specified by:
unloadWorldin interfaceServer
-
unloadWorld
- Specified by:
unloadWorldin interfaceServer
-
createMap
-
reload
public void reload() -
reloadData
public void reloadData()- Specified by:
reloadDatain interfaceServer
-
savePlayers
public void savePlayers()- Specified by:
savePlayersin interfaceServer
-
resetRecipes
public void resetRecipes()- Specified by:
resetRecipesin interfaceServer
-
getCommandAliases
- Specified by:
getCommandAliasesin interfaceServer
-
getSpawnRadius
public int getSpawnRadius()- Specified by:
getSpawnRadiusin interfaceServer
-
setSpawnRadius
public void setSpawnRadius(int spawnRadius) - Specified by:
setSpawnRadiusin interfaceServer
-
shouldSendChatPreviews
public boolean shouldSendChatPreviews()- Specified by:
shouldSendChatPreviewsin interfaceServer
-
isEnforcingSecureProfiles
public boolean isEnforcingSecureProfiles()- Specified by:
isEnforcingSecureProfilesin interfaceServer
-
getOnlineMode
public boolean getOnlineMode()- Specified by:
getOnlineModein interfaceServer
-
getAllowFlight
public boolean getAllowFlight()- Specified by:
getAllowFlightin interfaceServer
-
isHardcore
public boolean isHardcore()- Specified by:
isHardcorein interfaceServer
-
shutdown
public void shutdown() -
getOfflinePlayer
Deprecated.- Specified by:
getOfflinePlayerin interfaceServer
-
getOfflinePlayer
- Specified by:
getOfflinePlayerin interfaceServer
-
getBannedPlayers
- Specified by:
getBannedPlayersin interfaceServer
-
getWorldContainer
- Specified by:
getWorldContainerin interfaceServer
-
getMessenger
- Specified by:
getMessengerin interfaceServer
-
createMerchant
Deprecated.- Specified by:
createMerchantin interfaceServer
-
getMaxChainedNeighborUpdates
public int getMaxChainedNeighborUpdates()- Specified by:
getMaxChainedNeighborUpdatesin interfaceServer
-
getMonsterSpawnLimit
Deprecated.- Specified by:
getMonsterSpawnLimitin interfaceServer
-
getAnimalSpawnLimit
Deprecated.- Specified by:
getAnimalSpawnLimitin interfaceServer
-
getWaterAnimalSpawnLimit
Deprecated.- Specified by:
getWaterAnimalSpawnLimitin interfaceServer
-
getAmbientSpawnLimit
Deprecated.- Specified by:
getAmbientSpawnLimitin interfaceServer
-
isPrimaryThread
public boolean isPrimaryThread()- Specified by:
isPrimaryThreadin interfaceServer
-
motd
@NotNull public @NotNull net.kyori.adventure.text.Component motd() -
getMotd
Deprecated. -
shutdownMessage
@Nullable public @Nullable net.kyori.adventure.text.Component shutdownMessage()- Specified by:
shutdownMessagein interfaceServer
-
getShutdownMessage
Deprecated.- Specified by:
getShutdownMessagein interfaceServer
-
setWarningState
Sets the return value ofgetWarningState().- Parameters:
warningState- TheWarning.WarningStateto set.
-
getWarningState
- Specified by:
getWarningStatein interfaceServer
-
getScoreboardManager
- Specified by:
getScoreboardManagerin interfaceServer
-
getScoreboardCriteria
- Specified by:
getScoreboardCriteriain interfaceServer
-
getServerIcon
- Specified by:
getServerIconin interfaceServer
-
loadServerIcon
- Specified by:
loadServerIconin interfaceServer
-
loadServerIcon
- Specified by:
loadServerIconin interfaceServer
-
setIdleTimeout
public void setIdleTimeout(int threshold) - Specified by:
setIdleTimeoutin interfaceServer
-
getIdleTimeout
public int getIdleTimeout()- Specified by:
getIdleTimeoutin interfaceServer
-
createChunkData
- Specified by:
createChunkDatain interfaceServer
-
createVanillaChunkData
@Deprecated(forRemoval=true) @NotNull public @NotNull ChunkGenerator.ChunkData createVanillaChunkData(@NotNull @NotNull World world, int x, int z) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createVanillaChunkDatain interfaceServer
-
createBossBar
@NotNull public @NotNull BossBar createBossBar(@NotNull @NotNull String title, @NotNull @NotNull BarColor color, @NotNull @NotNull BarStyle style, BarFlag... flags) - Specified by:
createBossBarin interfaceServer
-
getEntity
-
getTPS
@NotNull public @org.jetbrains.annotations.NotNull double[] getTPS() -
getTickTimes
@NotNull public @org.jetbrains.annotations.NotNull long[] getTickTimes()- Specified by:
getTickTimesin interfaceServer
-
getAverageTickTime
public double getAverageTickTime()- Specified by:
getAverageTickTimein interfaceServer
-
getAdvancement
- Specified by:
getAdvancementin interfaceServer
-
advancementIterator
- Specified by:
advancementIteratorin interfaceServer
-
getUnsafe
Deprecated. -
createBlockData
- Specified by:
createBlockDatain interfaceServer
-
createBlockData
@NotNull public @NotNull BlockData createBlockData(@NotNull @NotNull Material material, @Nullable @Nullable Consumer<BlockData> consumer) - Specified by:
createBlockDatain interfaceServer
-
createBlockData
- Specified by:
createBlockDatain interfaceServer
-
createBlockData
- Specified by:
createBlockDatain interfaceServer
-
createMaterialTag
@NotNull public @NotNull Tag<Material> createMaterialTag(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull String registryKey, @NotNull @NotNull Material... materials) This creates a new MockTagfor theMaterialclass.
Call this in advance before you are gonna accessgetTag(String, NamespacedKey, Class)or any of the constants defined inTag.- Parameters:
key- TheNamespacedKeyfor thisTagregistryKey- The name of theTagRegistry.materials-Materialswhich should be covered by thisTag- Returns:
- The newly created
Tag
-
addTagRegistry
-
getTag
-
getLootTable
- Specified by:
getLootTablein interfaceServer
-
createExplorerMap
@NotNull public @NotNull ItemStack createExplorerMap(World world, Location location, StructureType structureType) - Specified by:
createExplorerMapin interfaceServer
-
createExplorerMap
@NotNull public @NotNull ItemStack createExplorerMap(World world, Location location, StructureType structureType, int radius, boolean findUnexplored) - Specified by:
createExplorerMapin interfaceServer
-
createBossBar
@NotNull public @NotNull KeyedBossBar createBossBar(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull String title, @NotNull @NotNull BarColor color, @NotNull @NotNull BarStyle style, BarFlag... flags) - Specified by:
createBossBarin interfaceServer
-
getBossBars
- Specified by:
getBossBarsin interfaceServer
-
getBossBar
- Specified by:
getBossBarin interfaceServer
-
removeBossBar
- Specified by:
removeBossBarin interfaceServer
-
selectEntities
- Specified by:
selectEntitiesin interfaceServer
-
getStructureManager
- Specified by:
getStructureManagerin interfaceServer
-
getRegistry
@Nullable public <T extends Keyed> @Nullable Registry<T> getRegistry(@NotNull @NotNull Class<T> tClass) - Specified by:
getRegistryin interfaceServer
-
getMap
Deprecated. -
getTags
-
getTicksPerWaterSpawns
Deprecated.- Specified by:
getTicksPerWaterSpawnsin interfaceServer
-
getTicksPerAmbientSpawns
Deprecated.- Specified by:
getTicksPerAmbientSpawnsin interfaceServer
-
getCurrentServerTime
protected long getCurrentServerTime()This returns the current time of theServerin milliseconds- Returns:
- The current
Servertime
-
getTicksPerWaterAmbientSpawns
public int getTicksPerWaterAmbientSpawns()- Specified by:
getTicksPerWaterAmbientSpawnsin interfaceServer
-
getTicksPerWaterUndergroundCreatureSpawns
Deprecated.- Specified by:
getTicksPerWaterUndergroundCreatureSpawnsin interfaceServer
-
getWaterAmbientSpawnLimit
Deprecated.- Specified by:
getWaterAmbientSpawnLimitin interfaceServer
-
getWaterUndergroundCreatureSpawnLimit
Deprecated.- Specified by:
getWaterUndergroundCreatureSpawnLimitin interfaceServer
-
getMaxWorldSize
public int getMaxWorldSize()- Specified by:
getMaxWorldSizein interfaceServer
-
getSimulationDistance
public int getSimulationDistance()- Specified by:
getSimulationDistancein interfaceServer
-
getHideOnlinePlayers
public boolean getHideOnlinePlayers()- Specified by:
getHideOnlinePlayersin interfaceServer
-
spigot
-
reloadPermissions
public void reloadPermissions()- Specified by:
reloadPermissionsin interfaceServer
-
reloadCommandAliases
public boolean reloadCommandAliases()- Specified by:
reloadCommandAliasesin interfaceServer
-
suggestPlayerNamesWhenNullTabCompletions
public boolean suggestPlayerNamesWhenNullTabCompletions()- Specified by:
suggestPlayerNamesWhenNullTabCompletionsin interfaceServer
-
getPermissionMessage
- Specified by:
getPermissionMessagein interfaceServer
-
permissionMessage
@NotNull public @NotNull net.kyori.adventure.text.Component permissionMessage()- Specified by:
permissionMessagein interfaceServer
-
createProfile
- Specified by:
createProfilein interfaceServer
-
createProfile
- Specified by:
createProfilein interfaceServer
-
createProfile
@NotNull public @NotNull PlayerProfileMock createProfile(@Nullable @Nullable UUID uuid, @Nullable @Nullable String name) - Specified by:
createProfilein interfaceServer
-
createProfileExact
@NotNull public @NotNull PlayerProfileMock createProfileExact(@Nullable @Nullable UUID uuid, @Nullable @Nullable String name) - Specified by:
createProfileExactin interfaceServer
-
getCurrentTick
public int getCurrentTick()- Specified by:
getCurrentTickin interfaceServer
-
isStopping
public boolean isStopping()- Specified by:
isStoppingin interfaceServer
-
getMobGoals
- Specified by:
getMobGoalsin interfaceServer
-
getDatapackManager
- Specified by:
getDatapackManagerin interfaceServer
-
getConfig
- Overrides:
getConfigin classServer.Spigot
-
broadcast
@Deprecated public void broadcast(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent component) Deprecated.- Specified by:
broadcastin interfaceServer- Overrides:
broadcastin classServer.Spigot
-
broadcast
@Deprecated public void broadcast(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent... components) Deprecated.- Specified by:
broadcastin interfaceServer- Overrides:
broadcastin classServer.Spigot
-
restart
public void restart()- Overrides:
restartin classServer.Spigot
-
getTicksPerSpawns
- Specified by:
getTicksPerSpawnsin interfaceServer
-
createPlayerProfile
@Deprecated @NotNull public @NotNull PlayerProfileMock createPlayerProfile(@Nullable @Nullable UUID uniqueId, @Nullable @Nullable String name) Deprecated.- Specified by:
createPlayerProfilein interfaceServer
-
createPlayerProfile
@Deprecated @NotNull public @NotNull PlayerProfileMock createPlayerProfile(@NotNull @NotNull UUID uniqueId) Deprecated.- Specified by:
createPlayerProfilein interfaceServer
-
createPlayerProfile
@Deprecated @NotNull public @NotNull PlayerProfileMock createPlayerProfile(@NotNull @NotNull String name) Deprecated.- Specified by:
createPlayerProfilein interfaceServer
-
getSpawnLimit
- Specified by:
getSpawnLimitin interfaceServer
-
getPotionBrewer
- Specified by:
getPotionBrewerin interfaceServer
-
getPluginsFolder
- Specified by:
getPluginsFolderin interfaceServer
-
audiences
- Specified by:
audiencesin interfacenet.kyori.adventure.audience.ForwardingAudience
-