Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.Server Interface Reference
Inheritance diagram for org.bukkit.Server:
org.bukkit.plugin.messaging.PluginMessageRecipient

Public Member Functions

String getName ()
 
String getVersion ()
 
String getBukkitVersion ()
 
Player[] getOnlinePlayers ()
 
int getMaxPlayers ()
 
int getPort ()
 
int getViewDistance ()
 
String getIp ()
 
String getServerName ()
 
String getServerId ()
 
String getWorldType ()
 
boolean getGenerateStructures ()
 
boolean getAllowEnd ()
 
boolean getAllowNether ()
 
boolean hasWhitelist ()
 
void setWhitelist (boolean value)
 
Set< OfflinePlayergetWhitelistedPlayers ()
 
void reloadWhitelist ()
 
int broadcastMessage (String message)
 
String getUpdateFolder ()
 
File getUpdateFolderFile ()
 
long getConnectionThrottle ()
 
int getTicksPerAnimalSpawns ()
 
int getTicksPerMonsterSpawns ()
 
Player getPlayer (String name)
 
Player getPlayerExact (String name)
 
List< PlayermatchPlayer (String name)
 
Player getPlayer (UUID id)
 
PluginManager getPluginManager ()
 
BukkitScheduler getScheduler ()
 
ServicesManager getServicesManager ()
 
List< WorldgetWorlds ()
 
World createWorld (WorldCreator creator)
 
boolean unloadWorld (String name, boolean save)
 
boolean unloadWorld (World world, boolean save)
 
World getWorld (String name)
 
World getWorld (UUID uid)
 
MapView getMap (short id)
 
MapView createMap (World world)
 
void reload ()
 
Logger getLogger ()
 
PluginCommand getPluginCommand (String name)
 
void savePlayers ()
 
boolean dispatchCommand (CommandSender sender, String commandLine) throws CommandException
 
void configureDbConfig (ServerConfig config)
 
boolean addRecipe (Recipe recipe)
 
List< RecipegetRecipesFor (ItemStack result)
 
Iterator< ReciperecipeIterator ()
 
void clearRecipes ()
 
void resetRecipes ()
 
Map< String, String[]> getCommandAliases ()
 
int getSpawnRadius ()
 
void setSpawnRadius (int value)
 
boolean getOnlineMode ()
 
boolean getAllowFlight ()
 
boolean isHardcore ()
 
boolean useExactLoginLocation ()
 
void shutdown ()
 
int broadcast (String message, String permission)
 
OfflinePlayer getOfflinePlayer (String name)
 
OfflinePlayer getOfflinePlayer (UUID id)
 
Set< String > getIPBans ()
 
void banIP (String address)
 
void unbanIP (String address)
 
Set< OfflinePlayergetBannedPlayers ()
 
BanList getBanList (BanList.Type type)
 
Set< OfflinePlayergetOperators ()
 
GameMode getDefaultGameMode ()
 
void setDefaultGameMode (GameMode mode)
 
ConsoleCommandSender getConsoleSender ()
 
File getWorldContainer ()
 
OfflinePlayer[] getOfflinePlayers ()
 
Messenger getMessenger ()
 
HelpMap getHelpMap ()
 
Inventory createInventory (InventoryHolder owner, InventoryType type)
 
Inventory createInventory (InventoryHolder owner, InventoryType type, String title)
 
Inventory createInventory (InventoryHolder owner, int size) throws IllegalArgumentException
 
Inventory createInventory (InventoryHolder owner, int size, String title) throws IllegalArgumentException
 
int getMonsterSpawnLimit ()
 
int getAnimalSpawnLimit ()
 
int getWaterAnimalSpawnLimit ()
 
int getAmbientSpawnLimit ()
 
boolean isPrimaryThread ()
 
String getMotd ()
 
String getShutdownMessage ()
 
WarningState getWarningState ()
 
ItemFactory getItemFactory ()
 
ScoreboardManager getScoreboardManager ()
 
CachedServerIcon getServerIcon ()
 
CachedServerIcon loadServerIcon (File file) throws IllegalArgumentException, Exception
 
CachedServerIcon loadServerIcon (BufferedImage image) throws IllegalArgumentException, Exception
 
void setIdleTimeout (int threshold)
 
int getIdleTimeout ()
 
UnsafeValues getUnsafe ()
 
- Public Member Functions inherited from org.bukkit.plugin.messaging.PluginMessageRecipient
void sendPluginMessage (Plugin source, String channel, byte[] message)
 
Set< String > getListeningPluginChannels ()
 

Static Public Attributes

static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin"
 
static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user"
 

Detailed Description

Represents a server implementation.

Definition at line 43 of file Server.java.

Member Function Documentation

boolean org.bukkit.Server.addRecipe ( Recipe  recipe)

Adds a recipe to the crafting manager.

Parameters
recipethe recipe to add
Returns
true if the recipe was added, false if it wasn't for some reason

Referenced by org.bukkit.Bukkit.addRecipe().

void org.bukkit.Server.banIP ( String  address)

Bans the specified address from the server.

Parameters
addressthe IP address to ban

Referenced by org.bukkit.Bukkit.banIP().

int org.bukkit.Server.broadcast ( String  message,
String  permission 
)

Broadcasts the specified message to every user with the given permission name.

Parameters
messagemessage to broadcast
permissionthe required permission permissibles must have to receive the broadcast
Returns
number of message recipients

Referenced by org.bukkit.Bukkit.broadcast().

int org.bukkit.Server.broadcastMessage ( String  message)

Broadcast a message to all players.

This is the same as calling java.lang.String) to BROADCAST_CHANNEL_USERS

Parameters
messagethe message
Returns
the number of players

Referenced by org.bukkit.Bukkit.broadcastMessage().

void org.bukkit.Server.clearRecipes ( )

Clears the list of crafting recipes.

Referenced by org.bukkit.Bukkit.clearRecipes().

void org.bukkit.Server.configureDbConfig ( ServerConfig  config)

Populates a given ServerConfig with values attributes to this server.

Parameters
configthe server config to populate

Referenced by org.bukkit.Bukkit.configureDbConfig().

Inventory org.bukkit.Server.createInventory ( InventoryHolder  owner,
InventoryType  type 
)

Creates an empty inventory of the specified type. If the type is InventoryType#CHEST, the new inventory has a size of 27; otherwise the new inventory has the normal size for its type.

Parameters
ownerthe holder of the inventory, or null to indicate no holder
typethe type of inventory to create
Returns
a new inventory

Referenced by org.bukkit.Bukkit.createInventory().

Inventory org.bukkit.Server.createInventory ( InventoryHolder  owner,
InventoryType  type,
String  title 
)

Creates an empty inventory with the specified type and title. If the type is InventoryType#CHEST, the new inventory has a size of 27; otherwise the new inventory has the normal size for its type.
It should be noted that some inventory types do not support titles and may not render with said titles on the Minecraft client.

Parameters
ownerThe holder of the inventory; can be null if there's no holder.
typeThe type of inventory to create.
titleThe title of the inventory, to be displayed when it is viewed.
Returns
The new inventory.
Inventory org.bukkit.Server.createInventory ( InventoryHolder  owner,
int  size 
) throws IllegalArgumentException

Creates an empty inventory of type InventoryType#CHEST with the specified size.

Parameters
ownerthe holder of the inventory, or null to indicate no holder
sizea multiple of 9 as the size of inventory to create
Returns
a new inventory
Exceptions
IllegalArgumentExceptionif the size is not a multiple of 9
Inventory org.bukkit.Server.createInventory ( InventoryHolder  owner,
int  size,
String  title 
) throws IllegalArgumentException

Creates an empty inventory of type InventoryType#CHEST with the specified size and title.

Parameters
ownerthe holder of the inventory, or null to indicate no holder
sizea multiple of 9 as the size of inventory to create
titlethe title of the inventory, displayed when inventory is viewed
Returns
a new inventory
Exceptions
IllegalArgumentExceptionif the size is not a multiple of 9
MapView org.bukkit.Server.createMap ( World  world)

Create a new map with an automatically assigned ID.

Parameters
worldthe world the map will belong to
Returns
a newly created map view

Referenced by org.bukkit.Bukkit.createMap().

World org.bukkit.Server.createWorld ( WorldCreator  creator)

Creates or loads a world with the given name using the specified options.

If the world is already loaded, it will just return the equivalent of getWorld(creator.name()).

Parameters
creatorthe options to use when creating the world
Returns
newly created or loaded world

Referenced by org.bukkit.Bukkit.createWorld().

boolean org.bukkit.Server.dispatchCommand ( CommandSender  sender,
String  commandLine 
) throws CommandException

Dispatches a command on this server, and executes it if found.

Parameters
senderthe apparent sender of the command
commandLinethe command + arguments. Example: test abc 123
Returns
returns false if no target is found
Exceptions
CommandExceptionthrown when the executor for the given command fails with an unhandled exception

Referenced by org.bukkit.Bukkit.dispatchCommand().

boolean org.bukkit.Server.getAllowEnd ( )

Gets whether this server allows the End or not.

Returns
whether this server allows the End or not

Referenced by org.bukkit.Bukkit.getAllowEnd().

boolean org.bukkit.Server.getAllowFlight ( )

Gets whether this server allows flying or not.

Returns
true if the server allows flight, false otherwise

Referenced by org.bukkit.Bukkit.getAllowFlight().

boolean org.bukkit.Server.getAllowNether ( )

Gets whether this server allows the Nether or not.

Returns
whether this server allows the Nether or not

Referenced by org.bukkit.Bukkit.getAllowNether().

int org.bukkit.Server.getAmbientSpawnLimit ( )

Gets user-specified limit for number of ambient mobs that can spawn in a chunk.

Returns
the ambient spawn limit

Referenced by org.bukkit.Bukkit.getAmbientSpawnLimit().

int org.bukkit.Server.getAnimalSpawnLimit ( )

Gets user-specified limit for number of animals that can spawn in a chunk.

Returns
the animal spawn limit

Referenced by org.bukkit.Bukkit.getAnimalSpawnLimit().

BanList org.bukkit.Server.getBanList ( BanList.Type  type)

Gets a ban list for the supplied type.

Bans by name are no longer supported and this method will return null when trying to request them. The replacement is bans by UUID.

Parameters
typethe type of list to fetch, cannot be null
Returns
a ban list of the specified type

Referenced by org.bukkit.Bukkit.getBanList().

Set<OfflinePlayer> org.bukkit.Server.getBannedPlayers ( )

Gets a set containing all banned players.

Returns
a set containing banned players

Referenced by org.bukkit.Bukkit.getBannedPlayers().

String org.bukkit.Server.getBukkitVersion ( )

Gets the Bukkit version that this server is running.

Returns
version of Bukkit

Referenced by org.bukkit.Bukkit.getBukkitVersion().

Map<String, String[]> org.bukkit.Server.getCommandAliases ( )

Gets a list of command aliases defined in the server properties.

Returns
a map of aliases to command names

Referenced by org.bukkit.Bukkit.getCommandAliases().

long org.bukkit.Server.getConnectionThrottle ( )

Gets the value of the connection throttle setting.

Returns
the value of the connection throttle setting

Referenced by org.bukkit.Bukkit.getConnectionThrottle().

ConsoleCommandSender org.bukkit.Server.getConsoleSender ( )

Gets a ConsoleCommandSender that may be used as an input source for this server.

Returns
a console command sender

Referenced by org.bukkit.Bukkit.getConsoleSender().

GameMode org.bukkit.Server.getDefaultGameMode ( )

Gets the default GameMode for new players.

Returns
the default game mode

Referenced by org.bukkit.Bukkit.getDefaultGameMode().

boolean org.bukkit.Server.getGenerateStructures ( )

Get generate-structures setting.

Returns
true if structure generation is enabled, false otherwise

Referenced by org.bukkit.Bukkit.getGenerateStructures().

HelpMap org.bukkit.Server.getHelpMap ( )

Gets the HelpMap providing help topics for this server.

Returns
a help map for this server

Referenced by org.bukkit.Bukkit.getHelpMap().

int org.bukkit.Server.getIdleTimeout ( )

Gets the idle kick timeout.

Returns
the idle timeout in minutes

Referenced by org.bukkit.Bukkit.getIdleTimeout().

String org.bukkit.Server.getIp ( )

Get the IP that this server is bound to, or empty string if not specified.

Returns
the IP string that this server is bound to, otherwise empty string

Referenced by org.bukkit.Bukkit.getIp().

Set<String> org.bukkit.Server.getIPBans ( )

Gets a set containing all current IPs that are banned.

Returns
a set containing banned IP addresses

Referenced by org.bukkit.Bukkit.getIPBans().

ItemFactory org.bukkit.Server.getItemFactory ( )

Gets the instance of the item factory (for ItemMeta).

Returns
the item factory
See also
ItemFactory

Referenced by org.bukkit.Bukkit.getItemFactory().

MapView org.bukkit.Server.getMap ( short  id)

Gets the map from the given item ID.

Parameters
idthe id of the map to get
Returns
a map view if it exists, or null otherwise
Deprecated:
Magic value

Referenced by org.bukkit.Bukkit.getMap().

int org.bukkit.Server.getMaxPlayers ( )

Get the maximum amount of players which can login to this server.

Returns
the amount of players this server allows

Referenced by org.bukkit.Bukkit.getMaxPlayers().

Messenger org.bukkit.Server.getMessenger ( )

Gets the Messenger responsible for this server.

Returns
messenger responsible for this server

Referenced by org.bukkit.Bukkit.getMessenger().

int org.bukkit.Server.getMonsterSpawnLimit ( )

Gets user-specified limit for number of monsters that can spawn in a chunk.

Returns
the monster spawn limit

Referenced by org.bukkit.Bukkit.getMonsterSpawnLimit().

String org.bukkit.Server.getMotd ( )

Gets the message that is displayed on the server list.

Returns
the servers MOTD

Referenced by org.bukkit.Bukkit.getMotd().

String org.bukkit.Server.getName ( )

Gets the name of this server implementation.

Returns
name of this server implementation

Referenced by org.bukkit.Bukkit.getName().

OfflinePlayer org.bukkit.Server.getOfflinePlayer ( String  name)

Gets the player by the given name, regardless if they are offline or online.

This method may involve a blocking web request to get the UUID for the given name.

This will return an object even if the player does not exist. To this method, all players will exist.

Deprecated:
Persistent storage of users should be by UUID as names are no longer unique past a single session.
Parameters
namethe name the player to retrieve
Returns
an offline player
See also
getOfflinePlayer(java.util.UUID)

Referenced by org.bukkit.Bukkit.getOfflinePlayer().

OfflinePlayer org.bukkit.Server.getOfflinePlayer ( UUID  id)

Gets the player by the given UUID, regardless if they are offline or online.

This will return an object even if the player does not exist. To this method, all players will exist.

Parameters
idthe UUID of the player to retrieve
Returns
an offline player
OfflinePlayer [] org.bukkit.Server.getOfflinePlayers ( )

Gets every player that has ever played on this server.

Returns
an array containing all previous players

Referenced by org.bukkit.Bukkit.getOfflinePlayers().

boolean org.bukkit.Server.getOnlineMode ( )

Gets whether the Server is in online mode or not.

Returns
true if the server authenticates clients, false otherwise

Referenced by org.bukkit.Bukkit.getOnlineMode().

Player [] org.bukkit.Server.getOnlinePlayers ( )

Gets a list of all currently logged in players.

Returns
an array of Players that are currently online

Referenced by org.bukkit.Bukkit.getOnlinePlayers(), and org.bukkit.command.Command.tabComplete().

Set<OfflinePlayer> org.bukkit.Server.getOperators ( )

Gets a set containing all player operators.

Returns
a set containing player operators

Referenced by org.bukkit.Bukkit.getOperators().

Player org.bukkit.Server.getPlayer ( String  name)

Gets a player object by the given username.

This method may not return objects for offline players.

Deprecated:
Use getPlayer(UUID) as player names are no longer guaranteed to be unique
Parameters
namethe name to look up
Returns
a player if one was found, null otherwise

Referenced by org.bukkit.Bukkit.getPlayer().

Player org.bukkit.Server.getPlayer ( UUID  id)

Gets the player with the given UUID.

Parameters
idUUID of the player to retrieve
Returns
a player object if one was found, null otherwise
Player org.bukkit.Server.getPlayerExact ( String  name)

Gets the player with the exact given name, case insensitive.

Deprecated:
Use getPlayer(UUID) as player names are no longer guaranteed to be unique
Parameters
nameExact name of the player to retrieve
Returns
a player object if one was found, null otherwise

Referenced by org.bukkit.Bukkit.getPlayerExact().

PluginCommand org.bukkit.Server.getPluginCommand ( String  name)

Gets a PluginCommand with the given name or alias.

Parameters
namethe name of the command to retrieve
Returns
a plugin command if found, null otherwise

Referenced by org.bukkit.plugin.java.JavaPlugin.getCommand(), and org.bukkit.Bukkit.getPluginCommand().

int org.bukkit.Server.getPort ( )

Get the game port that the server runs on.

Returns
the port number of this server

Referenced by org.bukkit.Bukkit.getPort().

List<Recipe> org.bukkit.Server.getRecipesFor ( ItemStack  result)

Get a list of all recipes for a given item. The stack size is ignored in comparisons. If the durability is -1, it will match any data value.

Parameters
resultthe item to match against recipe results
Returns
a list of recipes with the given result

Referenced by org.bukkit.Bukkit.getRecipesFor().

BukkitScheduler org.bukkit.Server.getScheduler ( )

Gets the scheduler for managing scheduled events.

Returns
a scheduling service for this server

Referenced by org.bukkit.permissions.PermissibleBase.addAttachment(), and org.bukkit.Bukkit.getScheduler().

ScoreboardManager org.bukkit.Server.getScoreboardManager ( )

Gets the instance of the scoreboard manager.

This will only exist after the first world has loaded.

Returns
the scoreboard manager or null if no worlds are loaded.

Referenced by org.bukkit.Bukkit.getScoreboardManager().

CachedServerIcon org.bukkit.Server.getServerIcon ( )

Gets an instance of the server's default server-icon.

Returns
the default server-icon; null values may be used by the implementation to indicate no defined icon, but this behavior is not guaranteed

Referenced by org.bukkit.Bukkit.getServerIcon().

String org.bukkit.Server.getServerId ( )

Get an ID of this server. The ID is a simple generally alphanumeric ID that can be used for uniquely identifying this server.

Returns
the ID of this server

Referenced by org.bukkit.Bukkit.getServerId().

String org.bukkit.Server.getServerName ( )

Get the name of this server.

Returns
the name of this server

Referenced by org.bukkit.Bukkit.getServerName().

ServicesManager org.bukkit.Server.getServicesManager ( )

Gets a services manager.

Returns
s services manager

Referenced by org.bukkit.Bukkit.getServicesManager().

String org.bukkit.Server.getShutdownMessage ( )

Gets the default message that is displayed when the server is stopped.

Returns
the shutdown message

Referenced by org.bukkit.Bukkit.getShutdownMessage().

int org.bukkit.Server.getSpawnRadius ( )

Gets the radius, in blocks, around each worlds spawn point to protect.

Returns
spawn radius, or 0 if none

Referenced by org.bukkit.Bukkit.getSpawnRadius().

int org.bukkit.Server.getTicksPerAnimalSpawns ( )

Gets default ticks per animal spawns value.

Example Usage:

  • A value of 1 will mean the server will attempt to spawn monsters every tick.
  • A value of 400 will mean the server will attempt to spawn monsters every 400th tick.
  • A value below 0 will be reset back to Minecraft's default.

Note: If set to 0, animal spawning will be disabled. We recommend using spawn-animals to control this instead.

Minecraft default: 400.

Returns
the default ticks per animal spawns value

Referenced by org.bukkit.Bukkit.getTicksPerAnimalSpawns().

int org.bukkit.Server.getTicksPerMonsterSpawns ( )

Gets the default ticks per monster spawns value.

Example Usage:

  • A value of 1 will mean the server will attempt to spawn monsters every tick.
  • A value of 400 will mean the server will attempt to spawn monsters every 400th tick.
  • A value below 0 will be reset back to Minecraft's default.

Note: If set to 0, monsters spawning will be disabled. We recommend using spawn-monsters to control this instead.

Minecraft default: 1.

Returns
the default ticks per monsters spawn value

Referenced by org.bukkit.Bukkit.getTicksPerMonsterSpawns().

UnsafeValues org.bukkit.Server.getUnsafe ( )
String org.bukkit.Server.getUpdateFolder ( )

Gets the name of the update folder. The update folder is used to safely update plugins at the right moment on a plugin load.

The update folder name is relative to the plugins folder.

Returns
the name of the update folder

Referenced by org.bukkit.Bukkit.getUpdateFolder(), and org.bukkit.plugin.SimplePluginManager.loadPlugins().

File org.bukkit.Server.getUpdateFolderFile ( )

Gets the update folder. The update folder is used to safely update plugins at the right moment on a plugin load.

Returns
the update folder

Referenced by org.bukkit.Bukkit.getUpdateFolderFile().

String org.bukkit.Server.getVersion ( )

Gets the version string of this server implementation.

Returns
version of this server implementation

Referenced by org.bukkit.Bukkit.getVersion().

int org.bukkit.Server.getViewDistance ( )

Get the view distance from this server.

Returns
the view distance from this server.

Referenced by org.bukkit.Bukkit.getViewDistance().

WarningState org.bukkit.Server.getWarningState ( )

Gets the current warning state for the server.

Returns
the configured warning state

Referenced by org.bukkit.Bukkit.getWarningState(), and org.bukkit.plugin.java.JavaPlugin.initialize().

int org.bukkit.Server.getWaterAnimalSpawnLimit ( )

Gets user-specified limit for number of water animals that can spawn in a chunk.

Returns
the water animal spawn limit

Referenced by org.bukkit.Bukkit.getWaterAnimalSpawnLimit().

Set<OfflinePlayer> org.bukkit.Server.getWhitelistedPlayers ( )

Gets a list of whitelisted players.

Returns
a set containing all whitelisted players

Referenced by org.bukkit.Bukkit.getWhitelistedPlayers().

World org.bukkit.Server.getWorld ( String  name)

Gets the world with the given name.

Parameters
namethe name of the world to retrieve
Returns
a world with the given name, or null if none exists

Referenced by org.bukkit.Bukkit.getWorld().

World org.bukkit.Server.getWorld ( UUID  uid)

Gets the world from the given Unique ID.

Parameters
uida unique-id of the world to retrieve
Returns
a world with the given Unique ID, or null if none exists
File org.bukkit.Server.getWorldContainer ( )

Gets the folder that contains all of the various Worlds.

Returns
folder that contains all worlds

Referenced by org.bukkit.Bukkit.getWorldContainer().

List<World> org.bukkit.Server.getWorlds ( )

Gets a list of all worlds on this server.

Returns
a list of worlds

Referenced by org.bukkit.Bukkit.getWorlds().

String org.bukkit.Server.getWorldType ( )

Get world type (level-type setting) for default world.

Returns
the value of level-type (e.g. DEFAULT, FLAT, DEFAULT_1_1)

Referenced by org.bukkit.Bukkit.getWorldType().

boolean org.bukkit.Server.hasWhitelist ( )

Gets whether this server has a whitelist or not.

Returns
whether this server has a whitelist or not

Referenced by org.bukkit.Bukkit.hasWhitelist().

boolean org.bukkit.Server.isHardcore ( )

Gets whether the server is in hardcore mode or not.

Returns
true if the server mode is hardcore, false otherwise

Referenced by org.bukkit.Bukkit.isHardcore().

boolean org.bukkit.Server.isPrimaryThread ( )

Checks the current thread against the expected primary thread for the server.

Note: this method should not be used to indicate the current synchronized state of the runtime. A current thread matching the main thread indicates that it is synchronized, but a mismatch does not preclude the same assumption.

Returns
true if the current thread matches the expected primary thread, false otherwise

Referenced by org.bukkit.plugin.SimplePluginManager.callEvent(), and org.bukkit.Bukkit.isPrimaryThread().

CachedServerIcon org.bukkit.Server.loadServerIcon ( File  file) throws IllegalArgumentException, Exception

Loads an image from a file, and returns a cached image for the specific server-icon.

Size and type are implementation defined. An incompatible file is guaranteed to throw an implementation-defined Exception.

Parameters
filethe file to load the from
Exceptions
IllegalArgumentExceptionif image is null
Exceptionif the image does not meet current server server-icon specifications
Returns
a cached server-icon that can be used for a ServerListPingEvent#setServerIcon(CachedServerIcon)

Referenced by org.bukkit.Bukkit.loadServerIcon().

CachedServerIcon org.bukkit.Server.loadServerIcon ( BufferedImage  image) throws IllegalArgumentException, Exception

Creates a cached server-icon for the specific image.

Size and type are implementation defined. An incompatible file is guaranteed to throw an implementation-defined Exception.

Parameters
imagethe image to use
Exceptions
IllegalArgumentExceptionif image is null
Exceptionif the image does not meet current server server-icon specifications
Returns
a cached server-icon that can be used for a ServerListPingEvent#setServerIcon(CachedServerIcon)
List<Player> org.bukkit.Server.matchPlayer ( String  name)

Attempts to match any players with the given name, and returns a list of all possibly matches.

This list is not sorted in any particular order. If an exact match is found, the returned list will only contain a single result.

Deprecated:
Use getPlayer(UUID) as player names are no longer guaranteed to be unique
Parameters
namethe (partial) name to match
Returns
list of all possible players

Referenced by org.bukkit.Bukkit.matchPlayer().

Iterator<Recipe> org.bukkit.Server.recipeIterator ( )

Get an iterator through the list of crafting recipes.

Returns
an iterator

Referenced by org.bukkit.Bukkit.recipeIterator().

void org.bukkit.Server.reload ( )

Reloads the server, refreshing settings and plugin information.

Referenced by org.bukkit.Bukkit.reload().

void org.bukkit.Server.reloadWhitelist ( )

Reloads the whitelist from disk.

Referenced by org.bukkit.Bukkit.reloadWhitelist().

void org.bukkit.Server.resetRecipes ( )

Resets the list of crafting recipes to the default.

Referenced by org.bukkit.Bukkit.resetRecipes().

void org.bukkit.Server.savePlayers ( )

Writes loaded players to disk.

Referenced by org.bukkit.Bukkit.savePlayers().

void org.bukkit.Server.setDefaultGameMode ( GameMode  mode)

Sets the default GameMode for new players.

Parameters
modethe new game mode

Referenced by org.bukkit.Bukkit.setDefaultGameMode().

void org.bukkit.Server.setIdleTimeout ( int  threshold)

Set the idle kick timeout. Any players idle for the specified amount of time will be automatically kicked.

A value of 0 will disable the idle kick timeout.

Parameters
thresholdthe idle timeout in minutes

Referenced by org.bukkit.Bukkit.setIdleTimeout().

void org.bukkit.Server.setSpawnRadius ( int  value)

Sets the radius, in blocks, around each worlds spawn point to protect.

Parameters
valuenew spawn radius, or 0 if none

Referenced by org.bukkit.Bukkit.setSpawnRadius().

void org.bukkit.Server.setWhitelist ( boolean  value)

Sets if the server is whitelisted.

Parameters
valuetrue for whitelist on, false for off

Referenced by org.bukkit.Bukkit.setWhitelist().

void org.bukkit.Server.shutdown ( )

Shutdowns the server, stopping everything.

Referenced by org.bukkit.Bukkit.shutdown().

void org.bukkit.Server.unbanIP ( String  address)

Unbans the specified address from the server.

Parameters
addressthe IP address to unban

Referenced by org.bukkit.Bukkit.unbanIP().

boolean org.bukkit.Server.unloadWorld ( String  name,
boolean  save 
)

Unloads a world with the given name.

Parameters
nameName of the world to unload
savewhether to save the chunks before unloading
Returns
true if successful, false otherwise

Referenced by org.bukkit.Bukkit.unloadWorld().

boolean org.bukkit.Server.unloadWorld ( World  world,
boolean  save 
)

Unloads the given world.

Parameters
worldthe world to unload
savewhether to save the chunks before unloading
Returns
true if successful, false otherwise
boolean org.bukkit.Server.useExactLoginLocation ( )

Gets whether to use vanilla (false) or exact behaviour (true).

  • Vanilla behaviour: check for collisions and move the player if needed.
  • Exact behaviour: spawn players exactly where they should be.
Returns
true if exact location locations are used for spawning, false for vanilla collision detection or otherwise

Referenced by org.bukkit.Bukkit.useExactLoginLocation().

Member Data Documentation

final String org.bukkit.Server.BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin"
static

Used for all administrative messages, such as an operator using a command.

For use in broadcast(java.lang.String, java.lang.String).

Definition at line 51 of file Server.java.

final String org.bukkit.Server.BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user"
static

Used for all announcement messages, such as informing users that a player has joined.

For use in broadcast(java.lang.String, java.lang.String).

Definition at line 59 of file Server.java.


The documentation for this interface was generated from the following file: