org.bukkit
Class Bukkit

java.lang.Object
  extended by org.bukkit.Bukkit

public final class Bukkit
extends Object

Represents the Bukkit core, for version and Server singleton handling


Method Summary
static boolean addRecipe(Recipe recipe)
           
static void banIP(String address)
           
static int broadcast(String message, String permission)
           
static int broadcastMessage(String message)
           
static void clearRecipes()
           
static void configureDbConfig(com.avaje.ebean.config.ServerConfig config)
           
static Inventory createInventory(InventoryHolder owner, int size)
           
static Inventory createInventory(InventoryHolder owner, int size, String title)
           
static Inventory createInventory(InventoryHolder owner, InventoryType type)
           
static MapView createMap(World world)
           
static World createWorld(WorldCreator options)
           
static boolean dispatchCommand(CommandSender sender, String commandLine)
           
static boolean getAllowEnd()
           
static boolean getAllowFlight()
           
static boolean getAllowNether()
           
static int getAmbientSpawnLimit()
           
static int getAnimalSpawnLimit()
           
static Set<OfflinePlayer> getBannedPlayers()
           
static String getBukkitVersion()
           
static Map<String,String[]> getCommandAliases()
           
static long getConnectionThrottle()
           
static ConsoleCommandSender getConsoleSender()
           
static GameMode getDefaultGameMode()
           
static boolean getGenerateStructures()
           
static HelpMap getHelpMap()
           
static String getIp()
           
static Set<String> getIPBans()
           
static ItemFactory getItemFactory()
           
static Logger getLogger()
           
static MapView getMap(short id)
          Deprecated. Magic value
static int getMaxPlayers()
           
static Messenger getMessenger()
           
static int getMonsterSpawnLimit()
           
static String getMotd()
           
static String getName()
           
static OfflinePlayer getOfflinePlayer(String name)
           
static OfflinePlayer[] getOfflinePlayers()
           
static boolean getOnlineMode()
           
static Player[] getOnlinePlayers()
           
static Set<OfflinePlayer> getOperators()
           
static Player getPlayer(String name)
           
static Player getPlayerExact(String name)
           
static PluginCommand getPluginCommand(String name)
           
static PluginManager getPluginManager()
           
static int getPort()
           
static List<Recipe> getRecipesFor(ItemStack result)
           
static BukkitScheduler getScheduler()
           
static ScoreboardManager getScoreboardManager()
           
static Server getServer()
          Gets the current Server singleton
static String getServerId()
           
static String getServerName()
           
static ServicesManager getServicesManager()
           
static String getShutdownMessage()
           
static int getSpawnRadius()
           
static int getTicksPerAnimalSpawns()
           
static int getTicksPerMonsterSpawns()
           
static String getUpdateFolder()
           
static File getUpdateFolderFile()
           
static String getVersion()
           
static int getViewDistance()
           
static Warning.WarningState getWarningState()
           
static int getWaterAnimalSpawnLimit()
           
static Set<OfflinePlayer> getWhitelistedPlayers()
           
static World getWorld(String name)
           
static World getWorld(UUID uid)
           
static File getWorldContainer()
           
static List<World> getWorlds()
           
static String getWorldType()
           
static boolean hasWhitelist()
           
static boolean isHardcore()
           
static boolean isPrimaryThread()
           
static List<Player> matchPlayer(String name)
           
static Iterator<Recipe> recipeIterator()
           
static void reload()
           
static void reloadWhitelist()
           
static void resetRecipes()
           
static void savePlayers()
           
static void setDefaultGameMode(GameMode mode)
           
static void setServer(Server server)
          Attempts to set the Server singleton.
static void setSpawnRadius(int value)
           
static void setWhitelist(boolean value)
           
static void shutdown()
           
static void unbanIP(String address)
           
static boolean unloadWorld(String name, boolean save)
           
static boolean unloadWorld(World world, boolean save)
           
static boolean useExactLoginLocation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServer

public static Server getServer()
Gets the current Server singleton

Returns:
Server instance being ran

setServer

public static void setServer(Server server)
Attempts to set the Server singleton.

This cannot be done if the Server is already set.

Parameters:
server - Server instance

getName

public static String getName()
See Also:
Server.getName()

getVersion

public static String getVersion()
See Also:
Server.getVersion()

getBukkitVersion

public static String getBukkitVersion()
See Also:
Server.getBukkitVersion()

getOnlinePlayers

public static Player[] getOnlinePlayers()
See Also:
Server.getOnlinePlayers()

getMaxPlayers

public static int getMaxPlayers()
See Also:
Server.getMaxPlayers()

getPort

public static int getPort()
See Also:
Server.getPort()

getViewDistance

public static int getViewDistance()
See Also:
Server.getViewDistance()

getIp

public static String getIp()
See Also:
Server.getIp()

getServerName

public static String getServerName()
See Also:
Server.getServerName()

getServerId

public static String getServerId()
See Also:
Server.getServerId()

getWorldType

public static String getWorldType()
See Also:
Server.getWorldType()

getGenerateStructures

public static boolean getGenerateStructures()
See Also:
Server.getGenerateStructures()

getAllowNether

public static boolean getAllowNether()
See Also:
Server.getAllowNether()

hasWhitelist

public static boolean hasWhitelist()
See Also:
Server.hasWhitelist()

broadcastMessage

public static int broadcastMessage(String message)
See Also:
Server.broadcastMessage(String message)

getUpdateFolder

public static String getUpdateFolder()
See Also:
Server.getUpdateFolder()

getPlayer

public static Player getPlayer(String name)
See Also:
Server.getPlayer(String name)

matchPlayer

public static List<Player> matchPlayer(String name)
See Also:
Server.matchPlayer(String name)

getPluginManager

public static PluginManager getPluginManager()
See Also:
Server.getPluginManager()

getScheduler

public static BukkitScheduler getScheduler()
See Also:
Server.getScheduler()

getServicesManager

public static ServicesManager getServicesManager()
See Also:
Server.getServicesManager()

getWorlds

public static List<World> getWorlds()
See Also:
Server.getWorlds()

createWorld

public static World createWorld(WorldCreator options)
See Also:
Server.createWorld(WorldCreator options)

unloadWorld

public static boolean unloadWorld(String name,
                                  boolean save)
See Also:
Server.unloadWorld(String name, boolean save)

unloadWorld

public static boolean unloadWorld(World world,
                                  boolean save)
See Also:
Server.unloadWorld(World world, boolean save)

getWorld

public static World getWorld(String name)
See Also:
Server.getWorld(String name)

getWorld

public static World getWorld(UUID uid)
See Also:
Server.getWorld(UUID uid)

getMap

@Deprecated
public static MapView getMap(short id)
Deprecated. Magic value

See Also:
Server.getMap(short id)

createMap

public static MapView createMap(World world)
See Also:
Server.createMap(World world)

reload

public static void reload()
See Also:
Server.reload()

getLogger

public static Logger getLogger()
See Also:
Server.getLogger()

getPluginCommand

public static PluginCommand getPluginCommand(String name)
See Also:
Server.getPluginCommand(String name)

savePlayers

public static void savePlayers()
See Also:
Server.savePlayers()

dispatchCommand

public static boolean dispatchCommand(CommandSender sender,
                                      String commandLine)
See Also:
Server.dispatchCommand(CommandSender sender, String commandLine)

configureDbConfig

public static void configureDbConfig(com.avaje.ebean.config.ServerConfig config)
See Also:
Server.configureDbConfig(ServerConfig config)

addRecipe

public static boolean addRecipe(Recipe recipe)
See Also:
Server.addRecipe(Recipe recipe)

getRecipesFor

public static List<Recipe> getRecipesFor(ItemStack result)
See Also:
Server.getRecipesFor(ItemStack result)

recipeIterator

public static Iterator<Recipe> recipeIterator()
See Also:
Server.recipeIterator()

clearRecipes

public static void clearRecipes()
See Also:
Server.clearRecipes()

resetRecipes

public static void resetRecipes()
See Also:
Server.resetRecipes()

getCommandAliases

public static Map<String,String[]> getCommandAliases()
See Also:
Server.getCommandAliases()

getSpawnRadius

public static int getSpawnRadius()
See Also:
Server.getSpawnRadius()

setSpawnRadius

public static void setSpawnRadius(int value)
See Also:
Server.setSpawnRadius(int value)

getOnlineMode

public static boolean getOnlineMode()
See Also:
Server.getOnlineMode()

getAllowFlight

public static boolean getAllowFlight()
See Also:
Server.getAllowFlight()

isHardcore

public static boolean isHardcore()
See Also:
Server.isHardcore()

shutdown

public static void shutdown()
See Also:
Server.shutdown()

broadcast

public static int broadcast(String message,
                            String permission)
See Also:
Server.broadcast(String message, String permission)

getOfflinePlayer

public static OfflinePlayer getOfflinePlayer(String name)
See Also:
Server.getOfflinePlayer(String name)

getPlayerExact

public static Player getPlayerExact(String name)
See Also:
Server.getPlayerExact(String name)

getIPBans

public static Set<String> getIPBans()
See Also:
Server.getIPBans()

banIP

public static void banIP(String address)
See Also:
Server.banIP(String address)

unbanIP

public static void unbanIP(String address)
See Also:
Server.unbanIP(String address)

getBannedPlayers

public static Set<OfflinePlayer> getBannedPlayers()
See Also:
Server.getBannedPlayers()

setWhitelist

public static void setWhitelist(boolean value)
See Also:
Server.setWhitelist(boolean value)

getWhitelistedPlayers

public static Set<OfflinePlayer> getWhitelistedPlayers()
See Also:
Server.getWhitelistedPlayers()

reloadWhitelist

public static void reloadWhitelist()
See Also:
Server.reloadWhitelist()

getConsoleSender

public static ConsoleCommandSender getConsoleSender()
See Also:
Server.getConsoleSender()

getOperators

public static Set<OfflinePlayer> getOperators()
See Also:
Server.getOperators()

getWorldContainer

public static File getWorldContainer()
See Also:
Server.getWorldContainer()

getMessenger

public static Messenger getMessenger()
See Also:
Server.getMessenger()

getAllowEnd

public static boolean getAllowEnd()
See Also:
Server.getAllowEnd()

getUpdateFolderFile

public static File getUpdateFolderFile()
See Also:
Server.getUpdateFolderFile()

getConnectionThrottle

public static long getConnectionThrottle()
See Also:
Server.getConnectionThrottle()

getTicksPerAnimalSpawns

public static int getTicksPerAnimalSpawns()
See Also:
Server.getTicksPerAnimalSpawns()

getTicksPerMonsterSpawns

public static int getTicksPerMonsterSpawns()
See Also:
Server.getTicksPerMonsterSpawns()

useExactLoginLocation

public static boolean useExactLoginLocation()
See Also:
Server.useExactLoginLocation()

getDefaultGameMode

public static GameMode getDefaultGameMode()
See Also:
Server.getDefaultGameMode()

setDefaultGameMode

public static void setDefaultGameMode(GameMode mode)
See Also:
Server.setDefaultGameMode(GameMode mode)

getOfflinePlayers

public static OfflinePlayer[] getOfflinePlayers()
See Also:
Server.getOfflinePlayers()

createInventory

public static Inventory createInventory(InventoryHolder owner,
                                        InventoryType type)
See Also:
Server.createInventory(InventoryHolder owner, InventoryType type)

createInventory

public static Inventory createInventory(InventoryHolder owner,
                                        int size)
See Also:
Server.createInventory(InventoryHolder owner, int size)

createInventory

public static Inventory createInventory(InventoryHolder owner,
                                        int size,
                                        String title)
See Also:
Server.createInventory(InventoryHolder owner, int size, String title)

getHelpMap

public static HelpMap getHelpMap()
See Also:
Server.getHelpMap()

getMonsterSpawnLimit

public static int getMonsterSpawnLimit()
See Also:
Server.getMonsterSpawnLimit()

getAnimalSpawnLimit

public static int getAnimalSpawnLimit()
See Also:
Server.getAnimalSpawnLimit()

getWaterAnimalSpawnLimit

public static int getWaterAnimalSpawnLimit()
See Also:
Server.getWaterAnimalSpawnLimit()

getAmbientSpawnLimit

public static int getAmbientSpawnLimit()
See Also:
Server.getAmbientSpawnLimit()

isPrimaryThread

public static boolean isPrimaryThread()
See Also:
Server.isPrimaryThread()

getMotd

public static String getMotd()
See Also:
Server.getMotd()

getShutdownMessage

public static String getShutdownMessage()
See Also:
Server.getShutdownMessage()

getWarningState

public static Warning.WarningState getWarningState()
See Also:
Server.getWarningState()

getItemFactory

public static ItemFactory getItemFactory()
See Also:
Server.getItemFactory()

getScoreboardManager

public static ScoreboardManager getScoreboardManager()
See Also:
Server.getScoreboardManager()


Copyright © 2013. All Rights Reserved.