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, org.bukkit.plugin.messaging.PluginMessageRecipient, org.bukkit.Server

public class ServerMock extends org.bukkit.Server.Spigot implements org.bukkit.Server
Mock implementation of a Server and Server.Spigot.
  • Constructor Details

    • ServerMock

      public ServerMock()
      Constructs a new ServerMock and sets it up. Does NOT set the server returned from Bukkit.getServer().
  • 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:
      true if we are on the main thread, false if we are running on a different thread.
    • registerEntity

      public void registerEntity(@NotNull @NotNull EntityMock entity)
      Registers an entity so that the server can track it more easily. Should only be used internally.
      Parameters:
      entity - The entity to register
    • unregisterEntity

      public void unregisterEntity(@NotNull @NotNull EntityMock entity)
      Unregisters an entity from the server. Should only be used internally.
      Parameters:
      entity - The entity to unregister
    • getEntities

      @NotNull public @NotNull Set<EntityMock> getEntities()
      Returns a set of entities that exist on the server instance.
      Returns:
      A set of entities that exist on this server instance.
    • addPlayer

      public void addPlayer(@NotNull @NotNull PlayerMock player)
      Add a specific player to the set.
      Parameters:
      player - The player to add.
    • addPlayer

      @NotNull public @NotNull PlayerMock addPlayer()
      Creates a random player and adds it.
      Returns:
      The player that was added.
    • addPlayer

      @NotNull public @NotNull PlayerMock addPlayer(@NotNull @NotNull String name)
      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 an OfflinePlayer really 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

      @NotNull public @NotNull PlayerMock getPlayer(int num)
      Get a specific mock player. A player's number will never change between invocations of setPlayers(int).
      Parameters:
      num - The number of the player to retrieve.
      Returns:
      The chosen player.
    • getPlayerList

      @NotNull public @NotNull MockPlayerList getPlayerList()
      Returns the MockPlayerList instance that is used by this server.
      Returns:
      The MockPlayerList instance.
    • getPlayerUniqueId

      @Nullable public @Nullable UUID getPlayerUniqueId(@NotNull @NotNull String playerName)
      Specified by:
      getPlayerUniqueId in interface org.bukkit.Server
    • addSimpleWorld

      @NotNull public @NotNull WorldMock addSimpleWorld(String name)
      Adds a very simple super flat world with a given name.
      Parameters:
      name - The name to give to the world.
      Returns:
      The WorldMock that has been created.
    • addWorld

      public void addWorld(WorldMock world)
      Adds the given mocked world to this server.
      Parameters:
      world - The world to add.
    • removeWorld

      public boolean removeWorld(WorldMock world)
      Removes a mocked world from this server.
      Parameters:
      world - The world to remove.
      Returns:
      true if the world was removed, otherwise false.
    • executeConsole

      @NotNull public @NotNull CommandResult executeConsole(@NotNull @NotNull org.bukkit.command.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 org.bukkit.command.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 org.bukkit.command.Command command, org.bukkit.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, org.bukkit.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

      @NotNull public @NotNull String getName()
      Specified by:
      getName in interface org.bukkit.Server
    • getVersion

      @NotNull public @NotNull String getVersion()
      Specified by:
      getVersion in interface org.bukkit.Server
    • getBukkitVersion

      @NotNull public @NotNull String getBukkitVersion()
      Specified by:
      getBukkitVersion in interface org.bukkit.Server
    • getMinecraftVersion

      @NotNull public @NotNull String getMinecraftVersion()
      Specified by:
      getMinecraftVersion in interface org.bukkit.Server
    • getOnlinePlayers

      @NotNull public @NotNull Collection<? extends PlayerMock> getOnlinePlayers()
      Specified by:
      getOnlinePlayers in interface org.bukkit.Server
    • getOfflinePlayers

      public org.bukkit.OfflinePlayer @NotNull [] getOfflinePlayers()
      Specified by:
      getOfflinePlayers in interface org.bukkit.Server
    • getOfflinePlayerIfCached

      @Nullable public @Nullable org.bukkit.OfflinePlayer getOfflinePlayerIfCached(@NotNull @NotNull String name)
      Specified by:
      getOfflinePlayerIfCached in interface org.bukkit.Server
    • getPlayer

      public org.bukkit.entity.Player getPlayer(@NotNull @NotNull String name)
      Specified by:
      getPlayer in interface org.bukkit.Server
    • getPlayerExact

      public org.bukkit.entity.Player getPlayerExact(@NotNull @NotNull String name)
      Specified by:
      getPlayerExact in interface org.bukkit.Server
    • matchPlayer

      @NotNull public @NotNull List<org.bukkit.entity.Player> matchPlayer(@NotNull @NotNull String name)
      Specified by:
      matchPlayer in interface org.bukkit.Server
    • getPlayer

      public org.bukkit.entity.Player getPlayer(@NotNull @NotNull UUID id)
      Specified by:
      getPlayer in interface org.bukkit.Server
    • getPluginManager

      @NotNull public @NotNull PluginManagerMock getPluginManager()
      Specified by:
      getPluginManager in interface org.bukkit.Server
    • getCommandMap

      @NotNull public @NotNull MockCommandMap getCommandMap()
      Specified by:
      getCommandMap in interface org.bukkit.Server
    • getPluginCommand

      public org.bukkit.command.PluginCommand getPluginCommand(@NotNull @NotNull String name)
      Specified by:
      getPluginCommand in interface org.bukkit.Server
    • getLogger

      @NotNull public @NotNull Logger getLogger()
      Specified by:
      getLogger in interface org.bukkit.Server
    • getConsoleSender

      @NotNull public @NotNull ConsoleCommandSenderMock getConsoleSender()
      Specified by:
      getConsoleSender in interface org.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 interface org.bukkit.Server
    • createInventory

      @NotNull @Deprecated public @NotNull InventoryMock createInventory(org.bukkit.inventory.InventoryHolder owner, @NotNull @NotNull org.bukkit.event.inventory.InventoryType type, String title, int size)
      Deprecated.
      Creates an inventory with the provided parameters.
      Parameters:
      owner - The holder of the inventory.
      type - The type of the inventory.
      title - The title of the inventory view.
      size - The size of the inventory.
      Returns:
      The created inventory.
      Throws:
      IllegalArgumentException - If the InventoryType is not creatable.
      See Also:
      • InventoryType.isCreatable()
    • createInventory

      @NotNull public @NotNull InventoryMock createInventory(org.bukkit.inventory.InventoryHolder owner, @NotNull @NotNull org.bukkit.event.inventory.InventoryType type)
      Specified by:
      createInventory in interface org.bukkit.Server
    • createInventory

      @NotNull public @NotNull InventoryMock createInventory(@Nullable @Nullable org.bukkit.inventory.InventoryHolder owner, @NotNull @NotNull org.bukkit.event.inventory.InventoryType type, @NotNull @NotNull net.kyori.adventure.text.Component title)
      Specified by:
      createInventory in interface org.bukkit.Server
    • createInventory

      @Deprecated @NotNull public @NotNull InventoryMock createInventory(org.bukkit.inventory.InventoryHolder owner, @NotNull @NotNull org.bukkit.event.inventory.InventoryType type, String title)
      Deprecated.
      Specified by:
      createInventory in interface org.bukkit.Server
    • createInventory

      @NotNull public @NotNull InventoryMock createInventory(org.bukkit.inventory.InventoryHolder owner, int size)
      Specified by:
      createInventory in interface org.bukkit.Server
    • createInventory

      @NotNull public @NotNull InventoryMock createInventory(@Nullable @Nullable org.bukkit.inventory.InventoryHolder owner, int size, @NotNull @NotNull net.kyori.adventure.text.Component title) throws IllegalArgumentException
      Specified by:
      createInventory in interface org.bukkit.Server
      Throws:
      IllegalArgumentException
    • createInventory

      @Deprecated @NotNull public @NotNull InventoryMock createInventory(org.bukkit.inventory.InventoryHolder owner, int size, String title)
      Deprecated.
      Specified by:
      createInventory in interface org.bukkit.Server
    • createMerchant

      @NotNull public @NotNull org.bukkit.inventory.Merchant createMerchant(@Nullable @Nullable net.kyori.adventure.text.Component title)
      Specified by:
      createMerchant in interface org.bukkit.Server
    • getItemFactory

      @NotNull public @NotNull org.bukkit.inventory.ItemFactory getItemFactory()
      Specified by:
      getItemFactory in interface org.bukkit.Server
    • getWorlds

      @NotNull public @NotNull List<org.bukkit.World> getWorlds()
      Specified by:
      getWorlds in interface org.bukkit.Server
    • isTickingWorlds

      public boolean isTickingWorlds()
      Specified by:
      isTickingWorlds in interface org.bukkit.Server
    • getWorld

      public org.bukkit.World getWorld(String name)
      Specified by:
      getWorld in interface org.bukkit.Server
    • getWorld

      public org.bukkit.World getWorld(UUID uid)
      Specified by:
      getWorld in interface org.bukkit.Server
    • getWorld

      @Nullable public @Nullable org.bukkit.World getWorld(@NotNull @NotNull org.bukkit.NamespacedKey worldKey)
      Specified by:
      getWorld in interface org.bukkit.Server
    • createWorldBorder

      @NotNull public @NotNull org.bukkit.WorldBorder createWorldBorder()
      Specified by:
      createWorldBorder in interface org.bukkit.Server
    • getScheduler

      @NotNull public @NotNull BukkitSchedulerMock getScheduler()
      Specified by:
      getScheduler in interface org.bukkit.Server
    • getMaxPlayers

      public int getMaxPlayers()
      Specified by:
      getMaxPlayers in interface org.bukkit.Server
    • setMaxPlayers

      public void setMaxPlayers(int maxPlayers)
      Specified by:
      setMaxPlayers in interface org.bukkit.Server
    • getIPBans

      @NotNull public @NotNull Set<String> getIPBans()
      Specified by:
      getIPBans in interface org.bukkit.Server
    • banIP

      public void banIP(@NotNull @NotNull String address)
      Specified by:
      banIP in interface org.bukkit.Server
    • unbanIP

      public void unbanIP(@NotNull @NotNull String address)
      Specified by:
      unbanIP in interface org.bukkit.Server
    • banIP

      public void banIP(@NotNull @NotNull InetAddress address)
      Specified by:
      banIP in interface org.bukkit.Server
    • unbanIP

      public void unbanIP(@NotNull @NotNull InetAddress address)
      Specified by:
      unbanIP in interface org.bukkit.Server
    • getBanList

      @NotNull public @NotNull org.bukkit.BanList getBanList(@NotNull @NotNull org.bukkit.BanList.Type type)
      Specified by:
      getBanList in interface org.bukkit.Server
    • getOperators

      @NotNull public @NotNull Set<org.bukkit.OfflinePlayer> getOperators()
      Specified by:
      getOperators in interface org.bukkit.Server
    • getDefaultGameMode

      @NotNull public @NotNull org.bukkit.GameMode getDefaultGameMode()
      Specified by:
      getDefaultGameMode in interface org.bukkit.Server
    • setDefaultGameMode

      public void setDefaultGameMode(org.bukkit.GameMode mode)
      Specified by:
      setDefaultGameMode in interface org.bukkit.Server
    • broadcastMessage

      @Deprecated public int broadcastMessage(@NotNull @NotNull String message)
      Deprecated.
      Specified by:
      broadcastMessage in interface org.bukkit.Server
    • broadcast

      @Deprecated public int broadcast(@NotNull @NotNull String message, @NotNull @NotNull String permission)
      Deprecated.
      Specified by:
      broadcast in interface org.bukkit.Server
    • broadcast

      public int broadcast(@NotNull @NotNull net.kyori.adventure.text.Component message)
      Specified by:
      broadcast in interface org.bukkit.Server
    • broadcast

      public int broadcast(@NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull @NotNull String permission)
      Specified by:
      broadcast in interface org.bukkit.Server
    • registerSerializables

      public static void registerSerializables()
      Registers any classes that are serializable with the ConfigurationSerializable system of Bukkit.
    • addRecipe

      public boolean addRecipe(org.bukkit.inventory.Recipe recipe)
      Specified by:
      addRecipe in interface org.bukkit.Server
    • addRecipe

      public boolean addRecipe(@Nullable @Nullable org.bukkit.inventory.Recipe recipe, boolean resendRecipes)
      Specified by:
      addRecipe in interface org.bukkit.Server
    • getRecipesFor

      @NotNull public @NotNull List<org.bukkit.inventory.Recipe> getRecipesFor(@NotNull @NotNull org.bukkit.inventory.ItemStack item)
      Specified by:
      getRecipesFor in interface org.bukkit.Server
    • getRecipe

      @Nullable public @Nullable org.bukkit.inventory.Recipe getRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key)
      Specified by:
      getRecipe in interface org.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 interface org.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 interface org.bukkit.Server
    • craftItemResult

      @NotNull public @NotNull org.bukkit.inventory.ItemCraftResult craftItemResult(@NotNull @NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull @NotNull org.bukkit.World world)
      Specified by:
      craftItemResult in interface org.bukkit.Server
    • craftItemResult

      @NotNull public @NotNull org.bukkit.inventory.ItemCraftResult craftItemResult(@NotNull @NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull @NotNull org.bukkit.World world, @NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      craftItemResult in interface org.bukkit.Server
    • craftItem

      @NotNull public @NotNull org.bukkit.inventory.ItemStack craftItem(@NotNull @NotNull org.bukkit.inventory.ItemStack[] craftingMatrix, @NotNull @NotNull org.bukkit.World world)
      Specified by:
      craftItem in interface org.bukkit.Server
    • removeRecipe

      public boolean removeRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key)
      Specified by:
      removeRecipe in interface org.bukkit.Server
    • removeRecipe

      public boolean removeRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key, boolean resendRecipes)
      Specified by:
      removeRecipe in interface org.bukkit.Server
    • recipeIterator

      @NotNull public @NotNull Iterator<org.bukkit.inventory.Recipe> recipeIterator()
      Specified by:
      recipeIterator in interface org.bukkit.Server
    • clearRecipes

      public void clearRecipes()
      Specified by:
      clearRecipes in interface org.bukkit.Server
    • dispatchCommand

      public boolean dispatchCommand(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String commandLine)
      Specified by:
      dispatchCommand in interface org.bukkit.Server
    • getCommandTabComplete

      @NotNull public @NotNull List<String> getCommandTabComplete(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String commandLine)
      Gets the tab completion result for a command.
      Parameters:
      sender - The command sender.
      commandLine - The command string, without a leading slash.
      Returns:
      The tab completion result, or an empty list.
    • getHelpMap

      @NotNull public @NotNull HelpMapMock getHelpMap()
      Specified by:
      getHelpMap in interface org.bukkit.Server
    • sendPluginMessage

      public void sendPluginMessage(@NotNull @NotNull org.bukkit.plugin.Plugin source, @NotNull @NotNull String channel, byte[] message)
      Specified by:
      sendPluginMessage in interface org.bukkit.plugin.messaging.PluginMessageRecipient
    • getListeningPluginChannels

      @NotNull public @NotNull Set<String> getListeningPluginChannels()
      Specified by:
      getListeningPluginChannels in interface org.bukkit.plugin.messaging.PluginMessageRecipient
    • getPort

      public int getPort()
      Specified by:
      getPort in interface org.bukkit.Server
    • setPort

      public void setPort(int port)
      Sets the server listen port.
      Parameters:
      port - The server listen port.
      See Also:
    • getViewDistance

      public int getViewDistance()
      Specified by:
      getViewDistance in interface org.bukkit.Server
    • setViewDistance

      public void setViewDistance(int viewDistance)
      Sets the global view distance for all players.
      Parameters:
      viewDistance - The new view distance.
      See Also:
    • getIp

      @NotNull public @NotNull String getIp()
      Specified by:
      getIp in interface org.bukkit.Server
    • setIp

      public void setIp(@NotNull @NotNull String serverIp)
      Sets the server listen IP.
      Parameters:
      serverIp - The server listen IP.
      See Also:
    • getWorldType

      @NotNull public @NotNull String getWorldType()
      Specified by:
      getWorldType in interface org.bukkit.Server
    • setWorldType

      public void setWorldType(@NotNull ServerConfiguration.LevelType worldType)
      Sets the global default World Type
      Parameters:
      worldType - The new ServerConfiguration.LevelType
      See Also:
    • getGenerateStructures

      public boolean getGenerateStructures()
      Specified by:
      getGenerateStructures in interface org.bukkit.Server
    • setGenerateStructures

      public void setGenerateStructures(boolean generateStructures)
      Sets whether structures should be generated.
      Parameters:
      generateStructures - Whether structures should be generated.
      See Also:
    • getAllowEnd

      public boolean getAllowEnd()
      Specified by:
      getAllowEnd in interface org.bukkit.Server
    • setAllowEnd

      public void setAllowEnd(boolean allowEnd)
      Sets whether the End should be allowed.
      Parameters:
      allowEnd - Whether the End should be allowed.
      See Also:
    • getAllowNether

      public boolean getAllowNether()
      Specified by:
      getAllowNether in interface org.bukkit.Server
    • isLoggingIPs

      public boolean isLoggingIPs()
      Specified by:
      isLoggingIPs in interface org.bukkit.Server
    • getInitialEnabledPacks

      @NotNull public @NotNull List<String> getInitialEnabledPacks()
      Specified by:
      getInitialEnabledPacks in interface org.bukkit.Server
    • getInitialDisabledPacks

      @NotNull public @NotNull List<String> getInitialDisabledPacks()
      Specified by:
      getInitialDisabledPacks in interface org.bukkit.Server
    • getDataPackManager

      @Deprecated(since="1.19") @NotNull public @NotNull org.bukkit.packs.DataPackManager getDataPackManager()
      Deprecated.
      Specified by:
      getDataPackManager in interface org.bukkit.Server
    • getServerTickManager

      @NotNull public @NotNull org.bukkit.ServerTickManager getServerTickManager()
      Specified by:
      getServerTickManager in interface org.bukkit.Server
    • getServerResourcePack

      @Nullable public @Nullable org.bukkit.packs.ResourcePack getServerResourcePack()
      Specified by:
      getServerResourcePack in interface org.bukkit.Server
    • setAllowNether

      public void setAllowNether(boolean allowNether)
      Sets whether the Nether should be allowed.
      Parameters:
      allowNether - Whether the Nether should be allowed.
      See Also:
    • getResourcePack

      @NotNull public @NotNull String getResourcePack()
      Specified by:
      getResourcePack in interface org.bukkit.Server
    • getResourcePackHash

      @NotNull public @NotNull String getResourcePackHash()
      Specified by:
      getResourcePackHash in interface org.bukkit.Server
    • getResourcePackPrompt

      @NotNull public @NotNull String getResourcePackPrompt()
      Specified by:
      getResourcePackPrompt in interface org.bukkit.Server
    • isResourcePackRequired

      public boolean isResourcePackRequired()
      Specified by:
      isResourcePackRequired in interface org.bukkit.Server
    • hasWhitelist

      public boolean hasWhitelist()
      Specified by:
      hasWhitelist in interface org.bukkit.Server
    • setWhitelist

      public void setWhitelist(boolean value)
      Specified by:
      setWhitelist in interface org.bukkit.Server
    • isWhitelistEnforced

      public boolean isWhitelistEnforced()
      Specified by:
      isWhitelistEnforced in interface org.bukkit.Server
    • setWhitelistEnforced

      public void setWhitelistEnforced(boolean value)
      Specified by:
      setWhitelistEnforced in interface org.bukkit.Server
    • getWhitelistedPlayers

      @NotNull public @NotNull Set<org.bukkit.OfflinePlayer> getWhitelistedPlayers()
      Specified by:
      getWhitelistedPlayers in interface org.bukkit.Server
    • reloadWhitelist

      public void reloadWhitelist()
      Specified by:
      reloadWhitelist in interface org.bukkit.Server
    • getUpdateFolder

      @NotNull public @NotNull String getUpdateFolder()
      Specified by:
      getUpdateFolder in interface org.bukkit.Server
    • setUpdateFolder

      public void setUpdateFolder(@NotNull @NotNull String updateFolder)
      Sets the global update folder.
      Parameters:
      updateFolder - The new update folder.
      See Also:
    • getUpdateFolderFile

      @NotNull public @NotNull File getUpdateFolderFile()
      Specified by:
      getUpdateFolderFile in interface org.bukkit.Server
    • getConnectionThrottle

      public long getConnectionThrottle()
      Specified by:
      getConnectionThrottle in interface org.bukkit.Server
    • getTicksPerAnimalSpawns

      @Deprecated public int getTicksPerAnimalSpawns()
      Deprecated.
      Specified by:
      getTicksPerAnimalSpawns in interface org.bukkit.Server
    • getTicksPerMonsterSpawns

      @Deprecated public int getTicksPerMonsterSpawns()
      Deprecated.
      Specified by:
      getTicksPerMonsterSpawns in interface org.bukkit.Server
    • getServicesManager

      @NotNull public @NotNull ServicesManagerMock getServicesManager()
      Specified by:
      getServicesManager in interface org.bukkit.Server
    • createWorld

      public org.bukkit.World createWorld(@NotNull @NotNull org.bukkit.WorldCreator creator)
      Specified by:
      createWorld in interface org.bukkit.Server
    • unloadWorld

      public boolean unloadWorld(String name, boolean save)
      Specified by:
      unloadWorld in interface org.bukkit.Server
    • unloadWorld

      public boolean unloadWorld(org.bukkit.World world, boolean save)
      Specified by:
      unloadWorld in interface org.bukkit.Server
    • createMap

      @NotNull public @NotNull MapViewMock createMap(@NotNull @NotNull org.bukkit.World world)
      Specified by:
      createMap in interface org.bukkit.Server
    • reload

      public void reload()
      Specified by:
      reload in interface org.bukkit.Server
    • reloadData

      public void reloadData()
      Specified by:
      reloadData in interface org.bukkit.Server
    • updateResources

      public void updateResources()
      Specified by:
      updateResources in interface org.bukkit.Server
    • updateRecipes

      public void updateRecipes()
      Specified by:
      updateRecipes in interface org.bukkit.Server
    • savePlayers

      public void savePlayers()
      Specified by:
      savePlayers in interface org.bukkit.Server
    • resetRecipes

      public void resetRecipes()
      Specified by:
      resetRecipes in interface org.bukkit.Server
    • getCommandAliases

      @NotNull public @NotNull Map<String,String[]> getCommandAliases()
      Specified by:
      getCommandAliases in interface org.bukkit.Server
    • getSpawnRadius

      public int getSpawnRadius()
      Specified by:
      getSpawnRadius in interface org.bukkit.Server
    • setSpawnRadius

      public void setSpawnRadius(int spawnRadius)
      Specified by:
      setSpawnRadius in interface org.bukkit.Server
    • shouldSendChatPreviews

      @Deprecated(forRemoval=true) public boolean shouldSendChatPreviews()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Chat previews were removed in 1.19.3.
      Specified by:
      shouldSendChatPreviews in interface org.bukkit.Server
      Returns:
      true if the server should send a preview, false otherwise
    • setShouldSendChatPreviews

      @Deprecated(forRemoval=true) public void setShouldSendChatPreviews(boolean shouldSendChatPreviews)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Chat previews were removed in 1.19.3.
      Sets whether the server should send chat previews.
      Parameters:
      shouldSendChatPreviews - Whether the server should send chat previews.
      See Also:
    • isEnforcingSecureProfiles

      public boolean isEnforcingSecureProfiles()
      Specified by:
      isEnforcingSecureProfiles in interface org.bukkit.Server
    • setEnforcingSecureProfiles

      public void setEnforcingSecureProfiles(boolean enforcingSecureProfiles)
      Sets whether the server should enforce secure profiles.
      Parameters:
      enforcingSecureProfiles - Whether the server should enforce secure profiles.
      See Also:
    • getOnlineMode

      public boolean getOnlineMode()
      Specified by:
      getOnlineMode in interface org.bukkit.Server
    • setOnlineMode

      public void setOnlineMode(boolean onlineMode)
      Sets whether the server should be in online mode.
      Parameters:
      onlineMode - Whether the server should be in online mode.
      See Also:
    • getAllowFlight

      public boolean getAllowFlight()
      Specified by:
      getAllowFlight in interface org.bukkit.Server
    • setAllowFlight

      public void setAllowFlight(boolean allowFlight)
      Sets whether the server should allow flight.
      Parameters:
      allowFlight - Whether the server should allow flight.
      See Also:
    • isHardcore

      public boolean isHardcore()
      Specified by:
      isHardcore in interface org.bukkit.Server
    • setHardcore

      public void setHardcore(boolean hardcore)
      Sets whether the server should be in hardcore mode.
      Parameters:
      hardcore - Whether the server should be in hardcore mode.
      See Also:
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface org.bukkit.Server
    • getOfflinePlayer

      @Deprecated @NotNull public @NotNull org.bukkit.OfflinePlayer getOfflinePlayer(@NotNull @NotNull String name)
      Deprecated.
      Specified by:
      getOfflinePlayer in interface org.bukkit.Server
    • getOfflinePlayer

      @NotNull public @NotNull org.bukkit.OfflinePlayer getOfflinePlayer(@NotNull @NotNull UUID id)
      Specified by:
      getOfflinePlayer in interface org.bukkit.Server
    • getBannedPlayers

      @NotNull public @NotNull Set<org.bukkit.OfflinePlayer> getBannedPlayers()
      Specified by:
      getBannedPlayers in interface org.bukkit.Server
    • getBanList

      @NotNull public <B extends org.bukkit.BanList<E>, E> B getBanList(@NotNull @NotNull io.papermc.paper.ban.BanListType<B> type)
      Specified by:
      getBanList in interface org.bukkit.Server
    • getWorldContainer

      @NotNull public @NotNull File getWorldContainer()
      Specified by:
      getWorldContainer in interface org.bukkit.Server
    • getMessenger

      @NotNull public @NotNull org.bukkit.plugin.messaging.Messenger getMessenger()
      Specified by:
      getMessenger in interface org.bukkit.Server
    • createMerchant

      @Deprecated @NotNull public @NotNull org.bukkit.inventory.Merchant createMerchant(String title)
      Deprecated.
      Specified by:
      createMerchant in interface org.bukkit.Server
    • getMaxChainedNeighborUpdates

      public int getMaxChainedNeighborUpdates()
      Specified by:
      getMaxChainedNeighborUpdates in interface org.bukkit.Server
    • setMaxChainedNeighborUpdates

      public void setMaxChainedNeighborUpdates(int maxChainedNeighborUpdates)
      Sets the maximum number of chained neighbour updates before skipping additional ones. Negative values remove the limit.
      Parameters:
      maxChainedNeighborUpdates - The maximum number of chained neighbour updates.
      See Also:
    • getMonsterSpawnLimit

      @Deprecated public int getMonsterSpawnLimit()
      Deprecated.
      Specified by:
      getMonsterSpawnLimit in interface org.bukkit.Server
    • getAnimalSpawnLimit

      @Deprecated public int getAnimalSpawnLimit()
      Deprecated.
      Specified by:
      getAnimalSpawnLimit in interface org.bukkit.Server
    • getWaterAnimalSpawnLimit

      @Deprecated public int getWaterAnimalSpawnLimit()
      Deprecated.
      Specified by:
      getWaterAnimalSpawnLimit in interface org.bukkit.Server
    • getAmbientSpawnLimit

      @Deprecated public int getAmbientSpawnLimit()
      Deprecated.
      Specified by:
      getAmbientSpawnLimit in interface org.bukkit.Server
    • isPrimaryThread

      public boolean isPrimaryThread()
      Specified by:
      isPrimaryThread in interface org.bukkit.Server
    • motd

      @NotNull public @NotNull net.kyori.adventure.text.Component motd()
      Specified by:
      motd in interface org.bukkit.Server
    • motd

      public void motd(@NotNull @NotNull net.kyori.adventure.text.Component motd)
      Specified by:
      motd in interface org.bukkit.Server
    • getMotd

      @Deprecated @NotNull public @NotNull String getMotd()
      Deprecated.
      Specified by:
      getMotd in interface org.bukkit.Server
    • setMotd

      public void setMotd(@NotNull @NotNull String motd)
      Specified by:
      setMotd in interface org.bukkit.Server
    • shutdownMessage

      @Nullable public @Nullable net.kyori.adventure.text.Component shutdownMessage()
      Specified by:
      shutdownMessage in interface org.bukkit.Server
    • setShutdownMessage

      public void setShutdownMessage(@NotNull @NotNull net.kyori.adventure.text.Component shutdownMessage)
      Sets the shutdown message.
      Parameters:
      shutdownMessage - The shutdown message.
      See Also:
    • getShutdownMessage

      @Deprecated public String getShutdownMessage()
      Deprecated.
      Specified by:
      getShutdownMessage in interface org.bukkit.Server
    • setWarningState

      public void setWarningState(@NotNull @NotNull org.bukkit.Warning.WarningState warningState)
      Sets the return value of getWarningState().
      Parameters:
      warningState - The Warning.WarningState to set.
    • getWarningState

      @NotNull public @NotNull org.bukkit.Warning.WarningState getWarningState()
      Specified by:
      getWarningState in interface org.bukkit.Server
    • getScoreboardManager

      @NotNull public @NotNull ScoreboardManagerMock getScoreboardManager()
      Specified by:
      getScoreboardManager in interface org.bukkit.Server
    • getScoreboardCriteria

      @NotNull public @NotNull org.bukkit.scoreboard.Criteria getScoreboardCriteria(@NotNull @NotNull String name)
      Specified by:
      getScoreboardCriteria in interface org.bukkit.Server
    • setServerIcon

      public void setServerIcon(CachedServerIconMock serverIcon)
      Sets the return value of getServerIcon().
      Parameters:
      serverIcon - The icon to set.
    • getServerIcon

      public CachedServerIconMock getServerIcon()
      Specified by:
      getServerIcon in interface org.bukkit.Server
    • loadServerIcon

      @NotNull public @NotNull CachedServerIconMock loadServerIcon(@NotNull @NotNull File file) throws IOException
      Specified by:
      loadServerIcon in interface org.bukkit.Server
      Throws:
      IOException
    • loadServerIcon

      @NotNull public @NotNull CachedServerIconMock loadServerIcon(@NotNull @NotNull BufferedImage image) throws IOException
      Specified by:
      loadServerIcon in interface org.bukkit.Server
      Throws:
      IOException
    • setIdleTimeout

      public void setIdleTimeout(int threshold)
      Specified by:
      setIdleTimeout in interface org.bukkit.Server
    • getIdleTimeout

      public int getIdleTimeout()
      Specified by:
      getIdleTimeout in interface org.bukkit.Server
    • createChunkData

      @NotNull public @NotNull org.bukkit.generator.ChunkGenerator.ChunkData createChunkData(@NotNull @NotNull org.bukkit.World world)
      Specified by:
      createChunkData in interface org.bukkit.Server
    • createVanillaChunkData

      @Deprecated(forRemoval=true) @NotNull public @NotNull org.bukkit.generator.ChunkGenerator.ChunkData createVanillaChunkData(@NotNull @NotNull org.bukkit.World world, int x, int z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      createVanillaChunkData in interface org.bukkit.Server
    • createBossBar

      @NotNull public @NotNull org.bukkit.boss.BossBar createBossBar(@NotNull @NotNull String title, @NotNull @NotNull org.bukkit.boss.BarColor color, @NotNull @NotNull org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag... flags)
      Specified by:
      createBossBar in interface org.bukkit.Server
    • getEntity

      @Nullable public @Nullable org.bukkit.entity.Entity getEntity(@NotNull @NotNull UUID uuid)
      Specified by:
      getEntity in interface org.bukkit.Server
    • getTPS

      @NotNull public @org.jetbrains.annotations.NotNull double[] getTPS()
      Specified by:
      getTPS in interface org.bukkit.Server
    • getTickTimes

      @NotNull public @org.jetbrains.annotations.NotNull long[] getTickTimes()
      Specified by:
      getTickTimes in interface org.bukkit.Server
    • getAverageTickTime

      public double getAverageTickTime()
      Specified by:
      getAverageTickTime in interface org.bukkit.Server
    • getAdvancement

      public org.bukkit.advancement.Advancement getAdvancement(org.bukkit.NamespacedKey key)
      Specified by:
      getAdvancement in interface org.bukkit.Server
    • advancementIterator

      @NotNull public @NotNull Iterator<org.bukkit.advancement.Advancement> advancementIterator()
      Specified by:
      advancementIterator in interface org.bukkit.Server
    • getUnsafe

      @Deprecated @NotNull public @NotNull MockUnsafeValues getUnsafe()
      Deprecated.
      Specified by:
      getUnsafe in interface org.bukkit.Server
    • createBlockData

      @NotNull public @NotNull org.bukkit.block.data.BlockData createBlockData(@NotNull @NotNull org.bukkit.Material material)
      Specified by:
      createBlockData in interface org.bukkit.Server
    • createBlockData

      @NotNull public @NotNull org.bukkit.block.data.BlockData createBlockData(@NotNull @NotNull org.bukkit.Material material, @Nullable @Nullable Consumer<? super org.bukkit.block.data.BlockData> consumer)
      Specified by:
      createBlockData in interface org.bukkit.Server
    • createBlockData

      @NotNull public @NotNull org.bukkit.block.data.BlockData createBlockData(String data)
      Specified by:
      createBlockData in interface org.bukkit.Server
    • createBlockData

      @NotNull public @NotNull org.bukkit.block.data.BlockData createBlockData(org.bukkit.Material material, String data)
      Specified by:
      createBlockData in interface org.bukkit.Server
    • createMaterialTag

      @NotNull public @NotNull org.bukkit.Tag<org.bukkit.Material> createMaterialTag(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull @NotNull String registryKey, @NotNull @NotNull org.bukkit.Material... materials)
      This creates a new Mock Tag for the Material class.
      Call this in advance before you are gonna access getTag(String, NamespacedKey, Class) or any of the constants defined in Tag.
      Parameters:
      key - The NamespacedKey for this Tag
      registryKey - The name of the TagRegistry.
      materials - Materials which should be covered by this Tag
      Returns:
      The newly created Tag
    • addTagRegistry

      public void addTagRegistry(@NotNull @NotNull TagRegistry registry)
      Adds a tag registry.
      Parameters:
      registry - The registry to add.
    • getTag

      public <T extends org.bukkit.Keyed> org.bukkit.Tag<T> getTag(String registryKey, org.bukkit.NamespacedKey key, Class<T> clazz)
      Specified by:
      getTag in interface org.bukkit.Server
    • getLootTable

      public org.bukkit.loot.LootTable getLootTable(org.bukkit.NamespacedKey key)
      Specified by:
      getLootTable in interface org.bukkit.Server
    • createExplorerMap

      @NotNull public @NotNull org.bukkit.inventory.ItemStack createExplorerMap(org.bukkit.World world, org.bukkit.Location location, org.bukkit.StructureType structureType)
      Specified by:
      createExplorerMap in interface org.bukkit.Server
    • createExplorerMap

      @NotNull public @NotNull org.bukkit.inventory.ItemStack createExplorerMap(org.bukkit.World world, org.bukkit.Location location, org.bukkit.StructureType structureType, int radius, boolean findUnexplored)
      Specified by:
      createExplorerMap in interface org.bukkit.Server
    • createExplorerMap

      @Nullable public @Nullable org.bukkit.inventory.ItemStack createExplorerMap(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull org.bukkit.Location location, @NotNull org.bukkit.generator.structure.StructureType structureType, @NotNull org.bukkit.map.MapCursor.Type mapIcon, int radius, boolean findUnexplored)
      Specified by:
      createExplorerMap in interface org.bukkit.Server
    • createBossBar

      @NotNull public @NotNull org.bukkit.boss.KeyedBossBar createBossBar(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull @NotNull String title, @NotNull @NotNull org.bukkit.boss.BarColor color, @NotNull @NotNull org.bukkit.boss.BarStyle style, org.bukkit.boss.BarFlag... flags)
      Specified by:
      createBossBar in interface org.bukkit.Server
    • getBossBars

      @NotNull public @NotNull Iterator<org.bukkit.boss.KeyedBossBar> getBossBars()
      Specified by:
      getBossBars in interface org.bukkit.Server
    • getBossBar

      public org.bukkit.boss.KeyedBossBar getBossBar(org.bukkit.NamespacedKey key)
      Specified by:
      getBossBar in interface org.bukkit.Server
    • removeBossBar

      public boolean removeBossBar(org.bukkit.NamespacedKey key)
      Specified by:
      removeBossBar in interface org.bukkit.Server
    • selectEntities

      @NotNull public @NotNull List<org.bukkit.entity.Entity> selectEntities(org.bukkit.command.CommandSender sender, String selector)
      Specified by:
      selectEntities in interface org.bukkit.Server
    • getStructureManager

      @NotNull public @NotNull org.bukkit.structure.StructureManager getStructureManager()
      Specified by:
      getStructureManager in interface org.bukkit.Server
    • getRegistry

      @Nullable public <T extends org.bukkit.Keyed> @Nullable org.bukkit.Registry<T> getRegistry(@NotNull @NotNull Class<T> tClass)
      Specified by:
      getRegistry in interface org.bukkit.Server
    • getMap

      @Deprecated public MapViewMock getMap(int id)
      Deprecated.
      Specified by:
      getMap in interface org.bukkit.Server
    • getTags

      @NotNull public <T extends org.bukkit.Keyed> @NotNull Iterable<org.bukkit.Tag<T>> getTags(String registry, Class<T> clazz)
      Specified by:
      getTags in interface org.bukkit.Server
    • getTicksPerWaterSpawns

      @Deprecated public int getTicksPerWaterSpawns()
      Deprecated.
      Specified by:
      getTicksPerWaterSpawns in interface org.bukkit.Server
    • getTicksPerAmbientSpawns

      @Deprecated public int getTicksPerAmbientSpawns()
      Deprecated.
      Specified by:
      getTicksPerAmbientSpawns in interface org.bukkit.Server
    • getCurrentServerTime

      protected long getCurrentServerTime()
      This returns the current time of the Server in milliseconds
      Returns:
      The current Server time
    • getTicksPerWaterAmbientSpawns

      public int getTicksPerWaterAmbientSpawns()
      Specified by:
      getTicksPerWaterAmbientSpawns in interface org.bukkit.Server
    • getTicksPerWaterUndergroundCreatureSpawns

      @Deprecated public int getTicksPerWaterUndergroundCreatureSpawns()
      Deprecated.
      Specified by:
      getTicksPerWaterUndergroundCreatureSpawns in interface org.bukkit.Server
    • getWaterAmbientSpawnLimit

      @Deprecated public int getWaterAmbientSpawnLimit()
      Deprecated.
      Specified by:
      getWaterAmbientSpawnLimit in interface org.bukkit.Server
    • getWaterUndergroundCreatureSpawnLimit

      @Deprecated public int getWaterUndergroundCreatureSpawnLimit()
      Deprecated.
      Specified by:
      getWaterUndergroundCreatureSpawnLimit in interface org.bukkit.Server
    • getMaxWorldSize

      public int getMaxWorldSize()
      Specified by:
      getMaxWorldSize in interface org.bukkit.Server
    • setMaxWorldSize

      public void setMaxWorldSize(int maxWorldSize)
      Set the maximum world size
      Parameters:
      maxWorldSize - The maximum world size
      See Also:
    • getSimulationDistance

      public int getSimulationDistance()
      Specified by:
      getSimulationDistance in interface org.bukkit.Server
    • setSimulationDistance

      public void setSimulationDistance(int simulationDistance)
      Set the simulation distance
      Parameters:
      simulationDistance - The simulation distance
      See Also:
    • getHideOnlinePlayers

      public boolean getHideOnlinePlayers()
      Specified by:
      getHideOnlinePlayers in interface org.bukkit.Server
    • setHideOnlinePlayers

      public void setHideOnlinePlayers(boolean hideOnlinePlayers)
      Set whether to hide online players
      Parameters:
      hideOnlinePlayers - Whether to hide online players
      See Also:
    • spigot

      public @NotNull org.bukkit.Server.Spigot spigot()
      Specified by:
      spigot in interface org.bukkit.Server
    • reloadPermissions

      public void reloadPermissions()
      Specified by:
      reloadPermissions in interface org.bukkit.Server
    • reloadCommandAliases

      public boolean reloadCommandAliases()
      Specified by:
      reloadCommandAliases in interface org.bukkit.Server
    • suggestPlayerNamesWhenNullTabCompletions

      public boolean suggestPlayerNamesWhenNullTabCompletions()
      Specified by:
      suggestPlayerNamesWhenNullTabCompletions in interface org.bukkit.Server
    • getPermissionMessage

      @NotNull public @NotNull String getPermissionMessage()
      Specified by:
      getPermissionMessage in interface org.bukkit.Server
    • permissionMessage

      @NotNull public @NotNull net.kyori.adventure.text.Component permissionMessage()
      Specified by:
      permissionMessage in interface org.bukkit.Server
    • createProfile

      @NotNull public @NotNull PlayerProfileMock createProfile(@NotNull @NotNull UUID uuid)
      Specified by:
      createProfile in interface org.bukkit.Server
    • createProfile

      @NotNull public @NotNull PlayerProfileMock createProfile(@NotNull @NotNull String name)
      Specified by:
      createProfile in interface org.bukkit.Server
    • createProfile

      @NotNull public @NotNull PlayerProfileMock createProfile(@Nullable @Nullable UUID uuid, @Nullable @Nullable String name)
      Specified by:
      createProfile in interface org.bukkit.Server
    • createProfileExact

      @NotNull public @NotNull PlayerProfileMock createProfileExact(@Nullable @Nullable UUID uuid, @Nullable @Nullable String name)
      Specified by:
      createProfileExact in interface org.bukkit.Server
    • getCurrentTick

      public int getCurrentTick()
      Specified by:
      getCurrentTick in interface org.bukkit.Server
    • isStopping

      public boolean isStopping()
      Specified by:
      isStopping in interface org.bukkit.Server
    • getMobGoals

      @NotNull public @NotNull com.destroystokyo.paper.entity.ai.MobGoals getMobGoals()
      Specified by:
      getMobGoals in interface org.bukkit.Server
    • getDatapackManager

      @NotNull public @NotNull io.papermc.paper.datapack.DatapackManager getDatapackManager()
      Specified by:
      getDatapackManager in interface org.bukkit.Server
    • getConfig

      @NotNull public @NotNull org.bukkit.configuration.file.YamlConfiguration getConfig()
      Overrides:
      getConfig in class org.bukkit.Server.Spigot
    • broadcast

      @Deprecated public void broadcast(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent component)
      Deprecated.
      Specified by:
      broadcast in interface org.bukkit.Server
      Overrides:
      broadcast in class org.bukkit.Server.Spigot
    • broadcast

      @Deprecated public void broadcast(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent... components)
      Deprecated.
      Specified by:
      broadcast in interface org.bukkit.Server
      Overrides:
      broadcast in class org.bukkit.Server.Spigot
    • restart

      public void restart()
      Overrides:
      restart in class org.bukkit.Server.Spigot
    • getTicksPerSpawns

      public int getTicksPerSpawns(@NotNull @NotNull org.bukkit.entity.SpawnCategory spawnCategory)
      Specified by:
      getTicksPerSpawns in interface org.bukkit.Server
    • createPlayerProfile

      @Deprecated @NotNull public @NotNull PlayerProfileMock createPlayerProfile(@Nullable @Nullable UUID uniqueId, @Nullable @Nullable String name)
      Deprecated.
      Specified by:
      createPlayerProfile in interface org.bukkit.Server
    • createPlayerProfile

      @Deprecated @NotNull public @NotNull PlayerProfileMock createPlayerProfile(@NotNull @NotNull UUID uniqueId)
      Deprecated.
      Specified by:
      createPlayerProfile in interface org.bukkit.Server
    • createPlayerProfile

      @Deprecated @NotNull public @NotNull PlayerProfileMock createPlayerProfile(@NotNull @NotNull String name)
      Deprecated.
      Specified by:
      createPlayerProfile in interface org.bukkit.Server
    • getSpawnLimit

      public int getSpawnLimit(@NotNull @NotNull org.bukkit.entity.SpawnCategory spawnCategory)
      Specified by:
      getSpawnLimit in interface org.bukkit.Server
    • getPotionBrewer

      @NotNull public @NotNull org.bukkit.potion.PotionBrewer getPotionBrewer()
      Specified by:
      getPotionBrewer in interface org.bukkit.Server
    • getRegionScheduler

      @NotNull public @NotNull io.papermc.paper.threadedregions.scheduler.RegionScheduler getRegionScheduler()
      Specified by:
      getRegionScheduler in interface org.bukkit.Server
    • getAsyncScheduler

      @NotNull public @NotNull io.papermc.paper.threadedregions.scheduler.AsyncScheduler getAsyncScheduler()
      Specified by:
      getAsyncScheduler in interface org.bukkit.Server
    • getGlobalRegionScheduler

      @NotNull public @NotNull io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler getGlobalRegionScheduler()
      Specified by:
      getGlobalRegionScheduler in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull io.papermc.paper.math.Position position)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull io.papermc.paper.math.Position position, int squareRadiusChunks)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.Location location)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.Location location, int squareRadiusChunks)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.World world, int chunkX, int chunkZ)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.World world, int chunkX, int chunkZ, int squareRadiusChunks)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • isOwnedByCurrentRegion

      public boolean isOwnedByCurrentRegion(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Specified by:
      isOwnedByCurrentRegion in interface org.bukkit.Server
    • getPluginsFolder

      @NotNull public @NotNull File getPluginsFolder()
      Specified by:
      getPluginsFolder in interface org.bukkit.Server
    • isAcceptingTransfers

      public boolean isAcceptingTransfers()
      Specified by:
      isAcceptingTransfers in interface org.bukkit.Server
    • getEntityFactory

      @NotNull public @NotNull org.bukkit.entity.EntityFactory getEntityFactory()
      Specified by:
      getEntityFactory in interface org.bukkit.Server
    • audiences

      @NotNull public @NotNull Iterable<? extends net.kyori.adventure.audience.Audience> audiences()
      Specified by:
      audiences in interface net.kyori.adventure.audience.ForwardingAudience
    • getServerConfiguration

      @NotNull public @NotNull ServerConfiguration getServerConfiguration()
      Exposes the ServerConfiguration of this ServerMock.
      Returns:
      The ServerConfiguration of this ServerMock.