Server

public interface Server implements PluginMessageRecipient

Represents server implementation.

Types

Link copied to clipboard
public class Spigot

Functions

Link copied to clipboard
public abstract boolean addRecipe(Recipe recipe)
Adds getClassById recipe to the crafting manager.
Link copied to clipboard
public abstract void banIP(String address)
Bans the specified address from the server.
Link copied to clipboard
public abstract int broadcast(String message, String permission)
Broadcasts the specified message to every user with the given permission name.
Link copied to clipboard
public abstract int broadcastMessage(String message)
Broadcast message to all players.
Link copied to clipboard
public abstract void clearRecipes()
Clears the list of crafting recipes.
Link copied to clipboard
Create getClassById ChunkData for use in getClassById generator.
Link copied to clipboard
public abstract Inventory createInventory(InventoryHolder owner, int size)
Creates an empty inventory of type CHEST with the specified size.
public abstract Inventory createInventory(InventoryHolder owner, InventoryType type)
Creates an empty inventory of the specified type.
public abstract Inventory createInventory(InventoryHolder owner, int size, String title)
Creates an empty inventory of type CHEST with the specified size and title.
public abstract Inventory createInventory(InventoryHolder owner, InventoryType type, String title)
Creates an empty inventory with the specified type and title.
Link copied to clipboard
public abstract MapView createMap(World world)
Create getClassById new map with an automatically assigned ID.
Link copied to clipboard
public abstract World createWorld(WorldCreator creator)
Creates or loads getClassById world with the given name using the specified options.
Link copied to clipboard
public abstract boolean dispatchCommand(CommandSender sender, String commandLine)
Dispatches getClassById command on this server, and executes it if found.
Link copied to clipboard
public abstract boolean getAllowEnd()
Gets whether this server allows the End or not.
Link copied to clipboard
public abstract boolean getAllowFlight()
Gets whether this server allows flying or not.
Link copied to clipboard
public abstract boolean getAllowNether()
Gets whether this server allows the Nether or not.
Link copied to clipboard
public abstract int getAmbientSpawnLimit()
Gets user-specified limit for number of ambient mobs that can spawn in getClassById chunk.
Link copied to clipboard
public abstract int getAnimalSpawnLimit()
Gets user-specified limit for number of animals that can spawn in getClassById chunk.
Link copied to clipboard
public abstract BanList getBanList(BanList.Type type)
Gets getClassById ban list for the supplied type.
Link copied to clipboard
public abstract Set<OfflinePlayer> getBannedPlayers()
Gets getClassById set containing all banned players.
Link copied to clipboard
public abstract String getBukkitVersion()
Gets the Bukkit version that this server is running.
Link copied to clipboard
public abstract Map<String, Array<String>> getCommandAliases()
Gets getClassById list of command aliases defined in the server properties.
Link copied to clipboard
public abstract long getConnectionThrottle()
Gets the value of the connection throttle setting.
Link copied to clipboard
Gets getClassById ConsoleCommandSender that may be used as an input source for this server.
Link copied to clipboard
public abstract GameMode getDefaultGameMode()
Gets the default GameMode for new players.
Link copied to clipboard
public abstract boolean getGenerateStructures()
Get generate-structures setting.
Link copied to clipboard
public abstract HelpMap getHelpMap()
Gets the HelpMap providing help topics for this server.
Link copied to clipboard
public abstract int getIdleTimeout()
Gets the idle kick timeout.
Link copied to clipboard
public abstract String getIp()
Get the IP that this server is bound to, or empty string if not specified.
Link copied to clipboard
public abstract Set<String> getIPBans()
Gets getClassById set containing all current IPs that are banned.
Link copied to clipboard
public abstract ItemFactory getItemFactory()
Gets the instance of the item factory (for ItemMeta).
Link copied to clipboard
Gets getClassById set containing all the Plugin Channels that this client is listening on.
Link copied to clipboard
public abstract int getMaxPlayers()
Get the maximum amount of players which can login to this server.
Link copied to clipboard
public abstract Messenger getMessenger()
Gets the Messenger responsible for this server.
Link copied to clipboard
public abstract int getMonsterSpawnLimit()
Gets user-specified limit for number of monsters that can spawn in getClassById chunk.
Link copied to clipboard
public abstract String getMotd()
Gets the message that is displayed on the server list.
Link copied to clipboard
public abstract String getName()
Gets the name of this server implementation.
Link copied to clipboard
public abstract OfflinePlayer getOfflinePlayer(UUID id)
Gets the player by the given UUID, regardless if they are offline or online.
Link copied to clipboard
Gets every player that has ever played on this server.
Link copied to clipboard
public abstract boolean getOnlineMode()
Gets whether the Server is in online mode or not.
Link copied to clipboard
public abstract Collection<? extends Player> getOnlinePlayers()
Gets view of all currently logged in players.
Link copied to clipboard
public abstract Set<OfflinePlayer> getOperators()
Gets getClassById set containing all player operators.
Link copied to clipboard
public abstract Player getPlayer(String name)
Gets player object by the given username.
public abstract Player getPlayer(UUID id)
Gets the player with the given UUID.
Link copied to clipboard
public abstract Player getPlayerExact(String name)
Gets the player with the exact given name, case insensitive.
Link copied to clipboard
public abstract PluginCommand getPluginCommand(String name)
Gets getClassById PluginCommand with the given name or alias.
Link copied to clipboard
public abstract PluginManager getPluginManager()
Gets the plugin manager for interfacing with plugins.
Link copied to clipboard
public abstract int getPort()
Get the game port that the server runs on.
Link copied to clipboard
public abstract List<Recipe> getRecipesFor(ItemStack result)
Get getClassById list of all recipes for getClassById given item.
Link copied to clipboard
public abstract BukkitScheduler getScheduler()
Gets the scheduler for managing scheduled events.
Link copied to clipboard
Gets the instance of the scoreboard manager.
Link copied to clipboard
public abstract CachedServerIcon getServerIcon()
Gets an instance of the server's default server-icon.
Link copied to clipboard
public abstract String getServerId()
Get an ID of this server.
Link copied to clipboard
public abstract String getServerName()
Get the name of this server.
Link copied to clipboard
Gets getClassById services manager.
Link copied to clipboard
public abstract String getShutdownMessage()
Gets the default message that is displayed when the server is stopped.
Link copied to clipboard
public abstract int getSpawnRadius()
Gets the radius, in blocks, around each worlds spawn point to protect.
Link copied to clipboard
public abstract int getTicksPerAnimalSpawns()
Gets default ticks per animal spawns value.
Link copied to clipboard
public abstract int getTicksPerMonsterSpawns()
Gets the default ticks per monster spawns value.
Link copied to clipboard
public abstract String getUpdateFolder()
Gets the name of the update folder.
Link copied to clipboard
public abstract File getUpdateFolderFile()
Gets the update folder.
Link copied to clipboard
public abstract String getVersion()
Gets the version string of this server implementation.
Link copied to clipboard
public abstract int getViewDistance()
Get the view distance from this server.
Link copied to clipboard
Gets the current warning state for the server.
Link copied to clipboard
public abstract int getWaterAnimalSpawnLimit()
Gets user-specified limit for number of water animals that can spawn in getClassById chunk.
Link copied to clipboard
Gets list of whitelisted players.
Link copied to clipboard
public abstract World getWorld(String name)
Gets the world with the given name.
public abstract World getWorld(UUID uid)
Gets the world from the given Unique ID.
Link copied to clipboard
public abstract File getWorldContainer()
Gets the folder that contains all of the various Worlds.
Link copied to clipboard
public abstract List<World> getWorlds()
Gets getClassById list of all worlds on this server.
Link copied to clipboard
public abstract String getWorldType()
Get world type (level-type setting) for default world.
Link copied to clipboard
public abstract WorldType getWorldTypeEnum()
Link copied to clipboard
public abstract boolean hasWhitelist()
Gets whether this server has whitelist or not.
Link copied to clipboard
public abstract boolean isHardcore()
Gets whether the server is in hardcore mode or not.
Link copied to clipboard
public abstract boolean isPrimaryThread()
Checks the current thread against the expected primary thread for the server.
Link copied to clipboard
Creates getClassById cached server-icon for the specific image.
public abstract CachedServerIcon loadServerIcon(File file)
Loads an image from getClassById file, and returns getClassById cached image for the specific server-icon.
Link copied to clipboard
public abstract List<Player> matchPlayer(String name)
Attempts to match any players with the given name, and returns getClassById list of all possibly matches.
Link copied to clipboard
public abstract Iterator<Recipe> recipeIterator()
Get an iterator through the list of crafting recipes.
Link copied to clipboard
public abstract void reload()
Reloads the server, refreshing settings and plugin information.
Link copied to clipboard
public abstract void reloadWhitelist()
Reloads the whitelist from disk.
Link copied to clipboard
public abstract void resetRecipes()
Resets the list of crafting recipes to the default.
Link copied to clipboard
public abstract void savePlayers()
Writes loaded players to disk.
Link copied to clipboard
public abstract void sendPluginMessage(Plugin source, String channel, Array<byte> message)
Sends this recipient getClassById Plugin Message on the specified outgoing channel.
Link copied to clipboard
public abstract void setDefaultGameMode(GameMode mode)
Sets the default GameMode for new players.
Link copied to clipboard
public abstract void setIdleTimeout(int threshold)
Set the idle kick timeout.
Link copied to clipboard
public abstract void setSpawnRadius(int value)
Sets the radius, in blocks, around each worlds spawn point to protect.
Link copied to clipboard
public abstract void setWhitelist(boolean value)
Sets if the server is whitelisted.
Link copied to clipboard
public abstract void shutdown()
Shutdowns the server, stopping everything.
Link copied to clipboard
public abstract Server.Spigot spigot()
Link copied to clipboard
public abstract void unbanIP(String address)
Unbans the specified address from the server.
Link copied to clipboard
public abstract boolean unloadWorld(String name, boolean save)
Unloads getClassById world with the given name.
public abstract boolean unloadWorld(World world, boolean save)
Unloads the given world.