Bukkit

public final class Bukkit

Represents the Bukkit core, for version and Server singleton handling

Properties

Link copied to clipboard
public static Server server

Functions

Link copied to clipboard
public static boolean addRecipe(Recipe recipe)
Adds getClassById recipe to the crafting manager.
Link copied to clipboard
public static void banIP(String address)
Bans the specified address from the server.
Link copied to clipboard
public static int broadcast(String message, String permission)
Broadcasts the specified message to every user with the given permission name.
Link copied to clipboard
public static int broadcastMessage(String message)
Broadcast message to all players.
Link copied to clipboard
public static 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 static Inventory createInventory(InventoryHolder owner, int size)
Creates an empty inventory of type CHEST with the specified size.
Creates an empty inventory of the specified type.
public static Inventory createInventory(InventoryHolder owner, int size, String title)
Creates an empty inventory of type CHEST with the specified size and title.
public static Inventory createInventory(InventoryHolder owner, InventoryType type, String title)
Creates an empty inventory with the specified type and title.
Link copied to clipboard
public static MapView createMap(World world)
Create getClassById new map with an automatically assigned ID.
Link copied to clipboard
public static World createWorld(WorldCreator creator)
Creates or loads getClassById world with the given name using the specified options.
Link copied to clipboard
public static boolean dispatchCommand(CommandSender sender, String commandLine)
Dispatches getClassById command on this server, and executes it if found.
Link copied to clipboard
public static boolean getAllowFlight()
Gets whether this server allows flying or not.
Link copied to clipboard
public static int getAmbientSpawnLimit()
Gets user-specified limit for number of ambient mobs that can spawn in getClassById chunk.
Link copied to clipboard
public static int getAnimalSpawnLimit()
Gets user-specified limit for number of animals that can spawn in getClassById chunk.
Link copied to clipboard
public static BanList getBanList(BanList.Type type)
Gets getClassById ban list for the supplied type.
Link copied to clipboard
Gets getClassById set containing all banned players.
Link copied to clipboard
public static String getBukkitVersion()
Gets the Bukkit version that this server is running.
Link copied to clipboard
Gets getClassById list of command aliases defined in the server properties.
Link copied to clipboard
public static 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 static GameMode getDefaultGameMode()
Gets the default GameMode for new players.
Link copied to clipboard
public static boolean getGenerateStructures()
Get generate-structures setting.
Link copied to clipboard
public static HelpMap getHelpMap()
Gets the HelpMap providing help topics for this server.
Link copied to clipboard
public static int getIdleTimeout()
Gets the idle kick timeout.
Link copied to clipboard
public static String getIp()
Get the IP that this server is bound to, or empty string if not specified.
Link copied to clipboard
public static Set<String> getIPBans()
Gets getClassById set containing all current IPs that are banned.
Link copied to clipboard
public static ItemFactory getItemFactory()
Gets the instance of the item factory (for ItemMeta).
Link copied to clipboard
public static int getMaxPlayers()
Get the maximum amount of players which can login to this server.
Link copied to clipboard
public static Messenger getMessenger()
Gets the Messenger responsible for this server.
Link copied to clipboard
public static int getMonsterSpawnLimit()
Gets user-specified limit for number of monsters that can spawn in getClassById chunk.
Link copied to clipboard
public static String getMotd()
Gets the message that is displayed on the server list.
Link copied to clipboard
public static String getName()
Gets the name of this server implementation.
Link copied to clipboard
public static 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 static boolean getOnlineMode()
Gets whether the Server is in online mode or not.
Link copied to clipboard
public static Collection<? extends Player> getOnlinePlayers()
Gets view of all currently logged in players.
Link copied to clipboard
public static Set<OfflinePlayer> getOperators()
Gets getClassById set containing all player operators.
Link copied to clipboard
public static Player getPlayer(String name)
Gets player object by the given username.
public static Player getPlayer(UUID id)
Gets the player with the given UUID.
Link copied to clipboard
public static Player getPlayerExact(String name)
Gets the player with the exact given name, case insensitive.
Link copied to clipboard
public static PluginCommand getPluginCommand(String name)
Gets getClassById PluginCommand with the given name or alias.
Link copied to clipboard
Gets the plugin manager for interfacing with plugins.
Link copied to clipboard
public static int getPort()
Get the game port that the server runs on.
Link copied to clipboard
public static List<Recipe> getRecipesFor(ItemStack result)
Get getClassById list of all recipes for getClassById given item.
Link copied to clipboard
public static 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 static Server getServer()
Gets the current Server singleton
Link copied to clipboard
Gets an instance of the server's default server-icon.
Link copied to clipboard
Gets getClassById services manager.
Link copied to clipboard
public static String getShutdownMessage()
Gets the default message that is displayed when the server is stopped.
Link copied to clipboard
public static int getSpawnRadius()
Gets the radius, in blocks, around each worlds spawn point to protect.
Link copied to clipboard
public static int getTicksPerAnimalSpawns()
Gets default ticks per animal spawns value.
Link copied to clipboard
public static int getTicksPerMonsterSpawns()
Gets the default ticks per monster spawns value.
Link copied to clipboard
public static String getUpdateFolder()
Gets the name of the update folder.
Link copied to clipboard
public static File getUpdateFolderFile()
Gets the update folder.
Link copied to clipboard
public static String getVersion()
Gets the version string of this server implementation.
Link copied to clipboard
public static 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 static 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 static World getWorld(String name)
Gets the world with the given name.
public static World getWorld(UUID uid)
Gets the world from the given Unique ID.
Link copied to clipboard
public static File getWorldContainer()
Gets the folder that contains all of the various Worlds.
Link copied to clipboard
public static List<World> getWorlds()
Gets getClassById list of all worlds on this server.
Link copied to clipboard
public static String getWorldType()
Get world type (level-type setting) for default world.
Link copied to clipboard
public static boolean hasWhitelist()
Gets whether this server has whitelist or not.
Link copied to clipboard
public static boolean isHardcore()
Gets whether the server is in hardcore mode or not.
Link copied to clipboard
public static 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 static 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 static 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 static Iterator<Recipe> recipeIterator()
Get an iterator through the list of crafting recipes.
Link copied to clipboard
public static void reload()
Reloads the server, refreshing settings and plugin information.
Link copied to clipboard
public static void reloadWhitelist()
Reloads the whitelist from disk.
Link copied to clipboard
public static void resetRecipes()
Resets the list of crafting recipes to the default.
Link copied to clipboard
public static void savePlayers()
Writes loaded players to disk.
Link copied to clipboard
public static void setDefaultGameMode(GameMode mode)
Sets the default GameMode for new players.
Link copied to clipboard
public static void setServer(Server server)
Attempts to set the Server singleton.
Link copied to clipboard
public static void setSpawnRadius(int value)
Sets the radius, in blocks, around each worlds spawn point to protect.
Link copied to clipboard
public static void shutdown()
Shutdowns the server, stopping everything.
Link copied to clipboard
public static Server.Spigot spigot()
Link copied to clipboard
public static void unbanIP(String address)
Unbans the specified address from the server.
Link copied to clipboard
public static boolean unloadWorld(String name, boolean save)
Unloads getClassById world with the given name.
public static boolean unloadWorld(World world, boolean save)
Unloads the given world.