typesforbukkit
Version:
Types For Bukkit
380 lines (262 loc) • 18.2 kB
text/typescript
// API Link: https://tfb.neocities.org/1.18/org/bukkit/Server
namespace org.bukkit {
/** @description Represents a server implementation. !! Static fields are missing due to TS restrictions !! */
export interface Server extends org.bukkit.plugin.messaging.PluginMessageRecipient {
/** @description Adds a recipe to the crafting manager */
addRecipe(recipe: org.bukkit.inventory.Recipe) : boolean;
/** @description Get an iterator through all advancements */
advancementIterator() : java.util.Iterator<org.bukkit.advancement.Advancement>;
/** @description Bans the specified address from the server */
banIP(adress: String) : void;
/** @description Broadcasts the specified message to every user with the given permission name */
broadcast(message: String, permission: String) : int;
/** @description Broadcast a message to all players */
broadcastMessage(message: String) : int;
/** @description Clears the list of crafting recipes */
clearRecipes() : void;
/** @description Get the crafted item using the list of ItemStack provided */
craftItem(craftingMatrix: org.bukkit.inventory.ItemStack[], world: org.bukkit.World, player: org.bukkit.entity.Player) : org.bukkit.inventory.ItemStack;
/** @description Creates a new BlockData instance with material and properties parsed from provided data */
createBlockData(data: String) : org.bukkit.block.data.BlockData;
/** @description Creates a new BlockData instance for the specified Material, with all properties initialized to unspecified defaults */
createBlockData(material: org.bukkit.Material) : org.bukkit.block.data.BlockData;
/** @description Creates a new BlockData instance for the specified Material, with all properties initialized to unspecified defaults, except for those provided in data */
createBlockData(material: org.bukkit.Material, data: String) : org.bukkit.block.data.BlockData;
/** @description Creates a new BlockData instance for the specified Material, with all properties initialized to unspecified defaults. consumer is of type java.util.function.Consumer<org.bukkit.block.data.BlockData> but couldn't be implented due to TS restrictions */
createBlockData(material: org.bukkit.Material, consumer: any) : org.bukkit.block.data.BlockData;
/** @description Creates a boss bar instance to display to players */
createBossBar(title: String, color: org.bukkit.boss.BarColor, style: org.bukkit.boss.BarStyle, ...flags: org.bukkit.boss.BarFlag[]) : org.bukkit.boss.BossBar;
/** @description Creates a boss bar instance to display to players */
createBossBar(key: org.bukkit.NamespacedKey, title: String, color: org.bukkit.boss.BarColor, style: org.bukkit.boss.BarStyle, ...flags: org.bukkit.boss.BarFlag[]) : org.bukkit.boss.KeyedBossBar;
/** @description Create a ChunkData for use in a generator */
createChunkData(world: org.bukkit.World) : org.bukkit.generator.ChunkGenerator_$_ChunkData;
/** @description Create a new explorer map targeting the closest nearby structure of a given StructureType */
createExplorerMap(world: org.bukkit.World, location: org.bukkit.Location, structureType: org.bukkit.StructureType) : org.bukkit.inventory.ItemStack;
/** @description Create a new explorer map targeting the closest nearby structure of a given StructureType */
createExplorerMap(world: org.bukkit.World, location: org.bukkit.Location, structureType: org.bukkit.StructureType, radius: int, findUnexplored: boolean) : org.bukkit.inventory.ItemStack;
/** @description Creates an empty inventory of type InventoryType.CHEST with the specified size */
createInventory(owner: org.bukkit.inventory.InventoryHolder, size: int) : org.bukkit.inventory.Inventory;
/** @description Creates an empty inventory of type InventoryType.CHEST with the specified size and title */
createInventory(owner: org.bukkit.inventory.InventoryHolder, size: int, title: String) : org.bukkit.inventory.Inventory;
/** @description Creates an empty inventory with the specified type */
createInventory(owner: org.bukkit.inventory.InventoryHolder, type: org.bukkit.event.inventory.InventoryType) : org.bukkit.inventory.Inventory;
/** @description Creates an empty inventory with the specified type and title */
createInventory(owner: org.bukkit.inventory.InventoryHolder, type: org.bukkit.event.inventory.InventoryType, title: String) : org.bukkit.inventory.Inventory;
/** @description Create a new map with an automatically assigned ID */
createMap(world: org.bukkit.World) : org.bukkit.map.MapView;
/** @description Creates an empty merchant */
createMerchant(title: String) : org.bukkit.inventory.Merchant;
/** @description Creates or loads a world with the given name using the specified options */
createWorld(creator: org.bukkit.WorldCreator) : org.bukkit.World;
/** @description Dispatches a command on this server, and executes it if found */
dispatchCommand(sender: org.bukkit.command.CommandSender, commandLine: String) : boolean;
/** @description Get the advancement specified by this key */
getAdvancement(key: org.bukkit.advancement.Advancement) : org.bukkit.advancement.Advancement;
/** @description Gets whether this server allows the End or not */
getAllowEnd() : boolean;
/** @description Gets whether this server allows flying or not */
getAllowFlight() : boolean;
/** @description Gets whether this server allows the Nether or not */
getAllowNether() : boolean;
/** @description Gets user-specified limit for number of ambient mobs that can spawn in a chunk */
getAmbientSpawnLimit() : int;
/** @description Gets user-specified limit for number of animals that can spawn in a chunk */
getAnimalSpawnLimit() : int;
/** @description Gets a ban list for the supplied type */
getBanList(type: org.bukkit.BanList_$_Type) : org.bukkit.BanList;
/** @description Gets a set containing all banned players */
getBannedPlayers() : java.util.Set<org.bukkit.OfflinePlayer>;
/** @description Gets the KeyedBossBar specified by this key */
getBossBar(key: org.bukkit.NamespacedKey) : org.bukkit.boss.KeyedBossBar;
/** @description Gets an unmodifiable iterator through all persistent bossbars */
getBossBars() : java.util.Iterator<org.bukkit.boss.KeyedBossBar>;
/** @description Gets the Bukkit version that this server is running */
getBukkitVersion() : String;
/** @description Gets a list of command aliases defined in the server properties */
getCommandAliases() : java.util.Map<String,String[]>;
/** @description Gets the value of the connection throttle setting */
getConnectionThrottle() : long;
/** @description Gets a ConsoleCommandSender that may be used as an input source for this server */
getConsoleSender() : org.bukkit.command.ConsoleCommandSender;
/** @description Get the Recipe for the list of ItemStacks provided */
getCraftingRecipe(craftingMatrix: org.bukkit.inventory.ItemStack[], world: org.bukkit.World) : org.bukkit.inventory.Recipe;
/** @description Gets the default GameMode for new players */
getDefaultGameMode() : org.bukkit.GameMode;
/** @description Gets an entity on the server by its UUID */
getEntity(uuid: java.util.UUID) : org.bukkit.entity.Entity;
/** @description Get generate-structures setting */
getGenerateStructures() : boolean;
/** @description Gets the HelpMap providing help topics for this server */
getHelpMap() : org.bukkit.help.HelpMap;
/** @description Gets whether the Server hide online players in server status */
getHideOnlinePlayers() : boolean;
/** @description Gets the idle kick timeout */
getIdleTimeout() : int;
/** @description Get the IP that this server is bound to, or empty string if not specified */
getIp() : String;
/** @description Gets a set containing all current IPs that are banned */
getIPBans() : java.util.Set<String>;
/** @description Gets the instance of the item factory (for ItemMeta) */
getItemFactory() : org.bukkit.inventory.ItemFactory;
/** @description Returns the primary logger associated with this server instance */
getLogger() : java.util.logging.Logger;
/** @description Gets the specified LootTable */
getLootTable(key: org.bukkit.NamespacedKey) : org.bukkit.loot.LootTable;
/** @deprecated Magic value */
getMap(id: int) : org.bukkit.map.MapView;
/** @description Get the maximum amount of players which can login to this server */
getMaxPlayers() : int;
/** @description Get max world size */
getMaxWorldSize() : int;
/** @description Gets the Messenger responsible for this server */
getMessenger() : org.bukkit.plugin.messaging.Messenger;
/** @description Gets user-specified limit for number of monsters that can spawn in a chunk */
getMonsterSpawnLimit() : int;
/** @description Gets the message that is displayed on the server list */
getMotd() : String;
/** @description Gets the name of this server implementation */
getName() : String;
/** @deprecated Persistent storage of users should be by UUID as names are no longer unique past a single session */
getOfflinePlayer(name: String) : org.bukkit.OfflinePlayer;
/** @description Gets the player by the given UUID, regardless if they are offline or online */
getOfflinePlayer(id: java.util.UUID) : org.bukkit.OfflinePlayer;
/** @description Gets every player that has ever played on this server */
getOfflinePlayers() : org.bukkit.OfflinePlayer[];
/** @description Gets whether the Server is in online mode or not */
getOnlineMode() : boolean;
/** @description Gets a view of all currently logged in players, the generic type of the return extends org.bukkit.entity.Player */
getOnlinePlayers() : java.util.Collection<any>;
/** @description Gets a set containing all player operators */
getOperators() : java.util.Set<org.bukkit.OfflinePlayer>;
/** @description Gets a player object by the given username */
getPlayer(name: String) : org.bukkit.entity.Player;
/** @description Gets the player with the given UUID */
getPlayer(id: java.util.UUID) : org.bukkit.entity.Player;
/** @description Gets the player with the exact given name, case insensitive */
getPlayerExact(name: String) : org.bukkit.entity.Player;
/** @description Gets a PluginCommand with the given name or alias */
getPluginCommand(name: String) : org.bukkit.command.PluginCommand;
/** @description Gets the plugin manager for interfacing with plugins */
getPluginManager() : org.bukkit.plugin.PluginManager;
/** @description Get the game port that the server runs on */
getPort() : int;
/** @description Get the Recipe for the given key */
getRecipe(recipeKey: org.bukkit.NamespacedKey) : org.bukkit.inventory.Recipe;
/** @description Get a list of all recipes for a given item */
getRecipesFor(result: org.bukkit.inventory.ItemStack) : java.util.List<org.bukkit.inventory.Recipe>;
/** @description Gets the scheduler for managing scheduled events */
getScheduler() : org.bukkit.scheduler.BukkitScheduler;
/** @description Gets the instance of the scoreboard manager */
getScoreboardManager() : org.bukkit.scoreboard.ScoreboardManager;
/** @description Gets an instance of the server's default server-icon */
getServerIcon() : org.bukkit.util.CachedServerIcon;
/** @description Gets a services manager */
getServicesManager() : org.bukkit.plugin.ServicesManager;
/** @description Gets the default message that is displayed when the server is stopped */
getShutdownMessage() : String;
/** @description Get the simulation distance from this server */
getSimulationDistance() : int;
/** @description Gets the radius, in blocks, around each worlds spawn point to protect */
getSpawnRadius() : int;
/** @description Gets the structure manager for loading and saving structures */
getStructureManager() : org.bukkit.structure.StructureManager;
/** @description Gets a tag which has already been defined within the server */
getTag<T extends org.bukkit.Keyed>(registry: String, tag: org.bukkit.NamespacedKey, clazz: java.lang.Class<T>) : org.bukkit.Tag<T>;
/** @description Gets a all tags which have been defined within the server */
getTags<T extends org.bukkit.Keyed>(registry: String, clazz: java.lang.Class<T>) : java.lang.Iterable<org.bukkit.Tag<T>>;
/** @description Gets the default ticks per ambient mob spawns value */
getTicksPerAmbientSpawns() : int;
/** @description Gets default ticks per animal spawns value */
getTicksPerAnimalSpawns() : int;
/** @description Gets the default ticks per monster spawns value */
getTicksPerMonsterSpawns() : int;
/** @description Gets the default ticks per water ambient mob spawns value */
getTicksPerWaterAmbientSpawns() : int;
/** @description Gets the default ticks per water mob spawns value */
getTicksPerWaterSpawns() : int;
/** @description Gets the default ticks per water underground creature spawns value */
getTicksPerWaterUndergroundCreatureSpawns() : int;
/** @deprecated */
getUnsafe() : org.bukkit.UnsafeValues;
/** @description Gets the name of the update folder */
getUpdateFolder() : String;
/** @description Gets the update folder */
getUpdateFolderFile() : java.io.File;
/** @description Gets the version string of this server implementation */
getVersion() : String;
/** @description Get the view distance from this server */
getViewDistance() : int;
/** @description Gets the current warning state for the server */
getWarningState() : org.bukkit.Warning_$_WarningState;
/** @description Gets user-specified limit for number of water ambient mobs that can spawn in a chunk */
getWaterAmbientSpawnLimit() : int;
/** @description Gets user-specified limit for number of water animals that can spawn in a chunk */
getWaterAnimalSpawnLimit() : int;
/** @description Get user-specified limit for number of water creature underground that can spawn in a chunk */
getWaterUndergroundCreatureSpawnLimit() : int;
/** @description Gets a list of whitelisted players */
getWhitelistedPlayers() : java.util.Set<org.bukkit.OfflinePlayer>;
/** @description Gets the world with the given name */
getWorld(name: String) : org.bukkit.World;
/** @description Gets the world from the given Unique ID */
getWorld(uid: java.util.UUID) : org.bukkit.World;
/** @description Gets the folder that contains all of the various Worlds */
getWorldContainer() : java.io.File;
/** @description Gets a list of all worlds on this server */
getWorlds() : java.util.List<org.bukkit.World>;
/** @description Get world type (level-type setting) for default world */
getWorldType() : String;
/** @description Gets whether this server has a whitelist or not */
hasWhitelist() : boolean;
/** @description Gets whether the server is in hardcore mode or not */
isHardcore() : boolean;
/** @description Checks the current thread against the expected primary thread for the server */
isPrimaryThread() : boolean;
/** @description Gets whether the server whitelist is enforced */
isWhitelistEnforced() : boolean;
/** @description Creates a cached server-icon for the specific image */
loadServerIcon(image: java.awt.image.BufferedImage) : org.bukkit.util.CachedServerIcon;
/** @description Loads an image from a file, and returns a cached image for the specific server-icon */
loadServerIcon(file: java.io.File) : org.bukkit.util.CachedServerIcon;
/** @description Attempts to match any players with the given name, and returns a list of all possibly matches */
matchPlayer(name: String) : java.util.List<org.bukkit.entity.Player>;
/** @description Get an iterator through the list of crafting recipes */
recipeIterator() : java.util.Iterator<org.bukkit.inventory.Recipe>;
/** @description Reloads the server, refreshing settings and plugin information */
reload() : void;
/** @description Reload only the Minecraft data for the server */
reloadData() : void;
/** @description Reloads the whitelist from disk */
reloadWhitelist() : void;
/** @description Removes a KeyedBossBar specified by this key */
removeBossBar(key: org.bukkit.NamespacedKey) : boolean;
/** @description Remove a recipe from the server */
removeRecipe(key: org.bukkit.NamespacedKey) : boolean;
/** @description Resets the list of crafting recipes to the default */
resetRecipes() : void;
/** @description Writes loaded players to disk */
savePlayers() : void;
/** @description Selects entities using the given Vanilla selector */
selectEntities(sender: org.bukkit.command.CommandSender, selector: String) : java.util.List<org.bukkit.entity.Entity>;
/** @description Sets the default GameMode for new players */
setDefaultGameMode(mode: org.bukkit.GameMode) : void;
/** @description Set the idle kick timeout */
setIdleTimeout(threshold: int) : void;
/** @description Sets the radius, in blocks, around each worlds spawn point to protect */
setSpawnRadius(value: int) : void;
/** @description Sets if the server is whitelisted */
setWhitelist(value: boolean) : void;
/** @description Sets if the server whitelist is enforced */
setWhitelistEnforced(value: boolean) : void;
/** @description Shutdowns the server, stopping everything */
shutdown() : void;
/** @description TODO: Spigot Server Class */
spigot() : any;
/** @description Unbans the specified address from the server */
unbanIP(address: String) : void;
/** @description Unloads a world with the given name */
unloadWorld(name: String, save: boolean) : boolean;
/** @description Unloads the given world */
unloadWorld(world: org.bukkit.World, save: boolean) : boolean;
}
}