### Configure and Register MavenLibraryResolver Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.html Example of creating a MavenLibraryResolver, adding a dependency, and configuring a repository. This setup is necessary before registering the resolver with the plugin classpath builder. ```java MavenLibraryResolver resolver = new MavenLibraryResolver(); resolver.addDependency(new Dependency(new DefaultArtifact("org.jooq:jooq:3.17.7"), null)); resolver.addRepository(new RemoteRepository.Builder( "central", "default", MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR ).build()); ``` -------------------------------- ### getUsage() - Command Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets an example usage of this command. ```APIDOC ## getUsage() ### Description Gets an example usage of this command. ### Method Method ### Class org.bukkit.command.Command ``` -------------------------------- ### Example Usage of PreFlattenTagRegistrar Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/tag/PreFlattenTagRegistrar.html An example demonstrating how to use the PreFlattenTagRegistrar within a plugin's bootstrap process. ```APIDOC ```java class YourBootstrapClass implements PluginBootstrap { public static final TagKey AXE_PICKAXE = ItemTypeTagKeys.create(Key.key("papermc:axe_pickaxe")); @Override public void bootstrap(BootstrapContext context) { final LifecycleEventManager manager = context.getLifecycleManager(); manager.registerEventHandler(LifecycleEvents.TAGS.preFlatten(RegistryKey.ITEM), event -> { final PreFlattenTagRegistrar registrar = event.registrar(); registrar.setTag(AXE_PICKAXE, Set.of( TagEntry.tagEntry(ItemTypeTagKeys.PICKAXES), TagEntry.tagEntry(ItemTypeTagKeys.AXES) )); }); } } ``` ``` -------------------------------- ### isStarted() Source: https://jd.papermc.io/paper/1.21.10/index-all.html Get whether this raid has started. ```APIDOC ## isStarted() ### Description Get whether this raid started. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (boolean) - Returns `true` if the raid has started, `false` otherwise. ### Response Example N/A ``` -------------------------------- ### Full Command Definition Example Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/plugin/PluginDescriptionFile.html An example demonstrating the structure for defining multiple commands with various properties like description, aliases, permission, and usage. ```yaml commands: flagrate: description: Set yourself on fire. aliases: [combust_me, combustMe] permission: inferno.flagrate permission-message: You do not have / usage: Syntax error! Perhaps you meant / PlayerName? burningdeaths: description: List how many times you have died by fire. aliases: - burning_deaths - burningDeaths permission: inferno.burningdeaths usage: | / [player] Example: / - see how many times you have burned to death Example: / CaptainIce - see how many times CaptainIce has burned to death apocalypse: ``` -------------------------------- ### JavaPlugin.init() (overload 2) Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/class-use/Server.html Initializes a JavaPlugin with server, description, data folder, file, class loader, configuration, and logger. ```APIDOC ## JavaPlugin.init(Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader, @Nullable PluginMeta configuration, Logger logger) ### Description Initializes the JavaPlugin with the provided server instance, description file, data folder, file, class loader, plugin meta configuration, and logger. ### Method `final void` ### Endpoint N/A (Java Method Call) ### Parameters - **server** (`Server`) - The server instance. - **description** (`PluginDescriptionFile`) - The plugin's description file. - **dataFolder** (`File`) - The plugin's data folder. - **file** (`File`) - The plugin's JAR file. - **classLoader** (`ClassLoader`) - The class loader for the plugin. - **configuration** (`@Nullable PluginMeta`) - The plugin's meta configuration (can be null). - **logger** (`Logger`) - The logger for the plugin. ### Response None ### Request Example ```java // This method is typically called internally by the PluginLoader. ``` ``` -------------------------------- ### Enchantment.getStartLevel Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the level that this Enchantment should start at. ```APIDOC ## getStartLevel() ### Description Gets the level that this Enchantment should start at ### Method GET ### Endpoint N/A (Method within Enchantment class) ### Parameters None ### Response #### Success Response (200) - **startLevel** (int) - The starting level of the enchantment. ``` -------------------------------- ### Command Methods Source: https://jd.papermc.io/paper/1.21.10/index-all.html Methods for the Command class, including setting the example usage. ```APIDOC ## setUsage(String) ### Description Sets the example usage of this command. ### Method Method ### Parameters #### Path Parameters - **usage** (String) - Required - The example usage string. ``` -------------------------------- ### HelpTopic Constructor Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/help/HelpTopic.html Initializes a new HelpTopic instance. This is typically used by subclasses or internal Bukkit mechanisms. ```APIDOC ## HelpTopic() ### Description Initializes a new HelpTopic instance. ### Constructor `public HelpTopic()` ``` -------------------------------- ### Dolphin.getTreasureLocation Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/class-use/Location.html Gets the treasure Location this dolphin tries to guide players to. ```APIDOC ## Dolphin.getTreasureLocation ### Description Gets the treasure location this dolphin tries to guide players to. ### Method Signature `@Nullable Location getTreasureLocation()` ``` -------------------------------- ### Plugin.yml Example Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/plugin/PluginDescriptionFile.html An example of a plugin.yml file, showcasing common entries like name, provides, version, and description. Comments are used to explain specific choices. ```yaml name: Inferno provides: [Hell] version: 1.4.1 description: This plugin is so 31337. You can set yourself on fire. # We could place every author in the authors list, but chose not to for illustrative purposes # Also, having an author distinguishes that person as the project lead, and ensures their ``` -------------------------------- ### Vex.hasLimitedLifetime() Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets if this vex should start to take damage once `Vex.getLimitedLifetimeTicks()` is less than or equal to 0. ```APIDOC ## Vex.hasLimitedLifetime() ### Description Gets if this vex should start to take damage once `Vex.getLimitedLifetimeTicks()` is less than or equal to 0. ### Method `hasLimitedLifetime()` ### Parameters None ### Response - **hasLimitedLifetime** (boolean) - True if the vex has a limited lifetime, false otherwise. ``` -------------------------------- ### WorldInfo.vanillaBiomeProvider() Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the vanilla `BiomeProvider` for this world. ```APIDOC ## vanillaBiomeProvider() Get the vanilla `BiomeProvider` for this world. **Interface:** org.bukkit.generator.WorldInfo ``` -------------------------------- ### Auto Enable on Server Start Configuration Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/datapack/DatapackRegistrar.Configurer.html Sets whether the datapack should be automatically enabled when the server starts, even if it was previously disabled. ```APIDOC ## Method: autoEnableOnServerStart ### Description Sets whether this pack is going to be automatically enabled on server starts even if previously disabled. Defaults to false. ### Parameters * `autoEnableOnServerStart` (boolean) - `true` to ensure the pack is enabled on server starts. ### Returns DatapackRegistrar.Configurer - The configurer instance for chaining. ``` -------------------------------- ### getLimitedLifetimeTicks() - Vex Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the number of ticks remaining until the vex will start to take damage. ```APIDOC ## getLimitedLifetimeTicks() ### Description Gets the number of ticks remaining until the vex will start to take damage. ### Method Method in interface org.bukkit.entity.Vex ``` -------------------------------- ### Recipe Creation with Material Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/class-use/Material.html Examples of creating different types of recipes using Material as a parameter. ```APIDOC ## Recipe Creation with Material ### Description Methods for creating various recipe types that utilize `Material` to define their components or results. ### Methods - `SmokingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)` Creates a smoking recipe. - `StonecuttingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source)` Create a Stonecutting recipe to craft the specified ItemStack. - `TransmuteRecipe(@NotNull NamespacedKey key, @NotNull Material result, @NotNull RecipeChoice input, @NotNull RecipeChoice material)` Create a transmute recipe to produce a result of the specified type. ``` -------------------------------- ### HelpCommand Constructor Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/command/defaults/HelpCommand.html Initializes a new instance of the HelpCommand class. ```APIDOC ## HelpCommand ### Description Constructs a new HelpCommand. ### Method `public HelpCommand()` ``` -------------------------------- ### Getting ItemStack from Block Events Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/inventory/class-use/ItemStack.html Examples of methods that retrieve an ItemStack from a block event. ```APIDOC ## VaultDisplayItemEvent.getDisplayItem() ### Description Gets the item that will be displayed inside the vault. ### Method `@Nullable ItemStack` ### Endpoint VaultDisplayItemEvent ``` ```APIDOC ## BlockDispenseEvent.getItem() ### Description Gets the item that is being dispensed. ### Method `@NotNull ItemStack` ### Endpoint BlockDispenseEvent ``` ```APIDOC ## BlockDamageAbortEvent.getItemInHand() ### Description Gets the ItemStack for the item currently in the player's hand. ### Method `@NotNull ItemStack` ### Endpoint BlockDamageAbortEvent ``` ```APIDOC ## BlockDamageEvent.getItemInHand() ### Description Gets the ItemStack for the item currently in the player's hand. ### Method `@NotNull ItemStack` ### Endpoint BlockDamageEvent ``` ```APIDOC ## BlockPlaceEvent.getItemInHand() ### Description Gets the item in the player's hand when they placed the block. ### Method `@NotNull ItemStack` ### Endpoint BlockPlaceEvent ``` ```APIDOC ## BlockCookEvent.getResult() ### Description Gets the resultant ItemStack for this event. ### Method `@NotNull ItemStack` ### Endpoint BlockCookEvent ``` ```APIDOC ## CrafterCraftEvent.getResult() ### Description Gets the result for the craft. ### Method `@NotNull ItemStack` ### Endpoint CrafterCraftEvent ``` ```APIDOC ## BlockCookEvent.getSource() ### Description Gets the smelted ItemStack for this event. ### Method `@NotNull ItemStack` ### Endpoint BlockCookEvent ``` ```APIDOC ## InventoryBlockStartEvent.getSource() ### Description Gets the source ItemStack for this event. ### Method `@NotNull ItemStack` ### Endpoint InventoryBlockStartEvent ``` ```APIDOC ## BlockShearEntityEvent.getTool() ### Description Gets the item used to shear this entity. ### Method `@NotNull ItemStack` ### Endpoint BlockShearEntityEvent ``` -------------------------------- ### getExample Source: https://jd.papermc.io/paper/1.21.10/index-all.html Deprecated. for internal compatibility use only. ```APIDOC ## getExample() ### Description Deprecated. for internal compatibility use only. ### Method Method ### Response #### Success Response (Object) - **Object** (Object) - An example object. ``` -------------------------------- ### Getting Lists of ItemStacks from Block Events Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/inventory/class-use/ItemStack.html Examples of methods that return a list of ItemStacks from a block event. ```APIDOC ## BlockDispenseLootEvent.getDispensedLoot() ### Description Gets the loot that will be dispensed. ### Method `@NotNull List` ### Endpoint BlockDispenseLootEvent ``` ```APIDOC ## BlockShearEntityEvent.getDrops() ### Description Get an immutable list of drops for this shearing. ### Method `@NotNull @Unmodifiable List` ### Endpoint BlockShearEntityEvent ``` -------------------------------- ### Creating FoodProperties Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/datacomponent/item/class-use/FoodProperties.Builder.html Static method to start building FoodProperties. ```APIDOC ## static FoodProperties.Builder food() ### Description Creates a new FoodProperties.Builder instance to define food properties. ### Method `FoodProperties.food` ### Returns `FoodProperties.Builder` - A new builder instance. ``` -------------------------------- ### Brewing Start Event Recipe Time Source: https://jd.papermc.io/paper/1.21.10/index-all.html Method to set the recipe time for a brewing start event. ```APIDOC ## BrewingStartEvent ### setRecipeBrewTime(int) Sets the recipe time for the brewing process. ``` -------------------------------- ### getExamples Source: https://jd.papermc.io/paper/1.21.10/index-all.html Cannot be controlled by the server. ```APIDOC ## getExamples() ### Description Cannot be controlled by the server. ### Method Method ### Response #### Success Response (List) - **List** (List) - A list of examples. ``` -------------------------------- ### EntityToggleGlideEvent Methods Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/event/entity/EntityToggleGlideEvent.html This event is fired when an entity's gliding status is toggled, for example, when a player starts or stops gliding with an Elytra. It implements the Cancellable interface, allowing the event to be cancelled. ```APIDOC ## EntityToggleGlideEvent Sent when an entity's gliding status is toggled with an Elytra. ### Methods * `isCancelled()`: Gets the cancellation state of this event. * `setCancelled(boolean cancel)`: Sets the cancellation state of this event. * `isGliding()`: Returns `true` if the entity is now gliding or `false` if the entity stops gliding. * `getHandlers()`: Returns a list of all handlers for this event. * `getHandlerList()`: Gets the handler list for this event. ``` -------------------------------- ### Create a JarLibrary Instance Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/plugin/loader/library/impl/JarLibrary.html Instantiate a JarLibrary by providing the path to the JAR file. The file must exist at the specified path relative to the JVM's start directory. ```java final JarLibrary customLibrary = new JarLibrary(Path.of("libs/custom-library-1.24.jar")); ``` -------------------------------- ### Get Iterator from Index Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/inventory/Inventory.html Returns an iterator starting at the given index. If the index is positive, then the first call to next() will return the item at that index; if it is negative, the first call to previous will return the item at index (getSize() + index). ```APIDOC ## iterator @NotNull @NotNull ListIterator iterator(int index) ### Description Returns an iterator starting at the given index. If the index is positive, then the first call to next() will return the item at that index; if it is negative, the first call to previous will return the item at index (getSize() + index). ### Parameters * `index` - The index. ### Returns An iterator. ``` -------------------------------- ### Creating PluginInformation Source: https://jd.papermc.io/paper/1.21.10/com/destroystokyo/paper/event/server/class-use/GS4QueryEvent.QueryResponse.PluginInformation.html Demonstrates how to create a new instance of PluginInformation. ```APIDOC ## static GS4QueryEvent.QueryResponse.PluginInformation of(String name, String version) ### Description Creates a new PluginInformation instance with the specified name and version. ### Method `static GS4QueryEvent.QueryResponse.PluginInformation of(String name, String version)` ### Parameters #### Path Parameters - **name** (String) - Description of the plugin. - **version** (String) - Version of the plugin. ``` -------------------------------- ### InventoryBlockStartEvent Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/event/block/InventoryBlockStartEvent.html Represents an event that is called when a block with an inventory starts an operation. This includes furnaces starting to smelt, brewing stands starting to brew, and campfires starting to cook. ```APIDOC ## Class: InventoryBlockStartEvent ### Description This event is used when a block with an inventory begins an operation. It extends `BlockEvent` and has subclasses like `BrewingStartEvent`, `CampfireStartEvent`, and `FurnaceStartSmeltEvent`. ### Methods #### `getSource()` - **Description**: Gets the source ItemStack that initiated the event. - **Return Type**: `@NotNull ItemStack` #### `getHandlers()` - **Description**: Returns the handler list for this event. - **Return Type**: `@NotNull HandlerList` #### `getHandlerList()` - **Description**: Gets the handler list for all events of this type. - **Return Type**: `@NotNull HandlerList` ### Constructor #### `InventoryBlockStartEvent(Block block, ItemStack source)` - **Description**: Constructs a new InventoryBlockStartEvent. - **Parameters**: - `block` (`@NotNull Block`): The block that triggered the event. - `source` (`@NotNull ItemStack`): The ItemStack that initiated the operation. ``` -------------------------------- ### start Method Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/raytracing/PositionedRayTraceConfigurationBuilder.html Sets the starting location for the raytrace. ```APIDOC ## start Sets the starting location. ### Method Signature `PositionedRayTraceConfigurationBuilder start(Location start)` ### Parameters * `start` (Location) - The new starting location. ### Returns * `PositionedRayTraceConfigurationBuilder` - A reference to this object. ``` -------------------------------- ### Creating and Populating BundleContents Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/datacomponent/item/class-use/BundleContents.Builder.html Demonstrates how to create a new BundleContents builder and add individual items or a list of items to it. ```APIDOC ## static BundleContents.Builder bundleContents() ### Description Creates a new instance of the BundleContents.Builder. ### Method `static BundleContents.Builder` ### Code Example ```java BundleContents.Builder builder = BundleContents.bundleContents(); ``` ## BundleContents.Builder add(ItemStack stack) ### Description Adds a single item stack to the bundle contents being built. ### Method `BundleContents.Builder` ### Parameters - **stack** (ItemStack) - The item stack to add. ### Code Example ```java builder.add(someItemStack); ``` ## BundleContents.Builder addAll(List stacks) ### Description Adds a list of item stacks to the bundle contents being built. ### Method `BundleContents.Builder` ### Parameters - **stacks** (List) - The list of item stacks to add. ### Code Example ```java builder.addAll(listOfItemStacks); ``` ``` -------------------------------- ### Registering a Command Lifecycle Event Handler with Handler Configuration Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/plugin/lifecycle/event/LifecycleEventManager.html This shows the equivalent of the previous example but explicitly uses the newHandler method for creating the handler configuration. ```java LifecycleEventHandler> handler = new Handler(); manager.registerEventHandler(LifecycleEvents.COMMANDS.newHandler(handler)); ``` -------------------------------- ### Get Villager Level Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/Villager.html Gets the level of this villager. ```APIDOC ## Method: getVillagerLevel ### Description Gets the level of this villager. ### Method Signature `int getVillagerLevel()` ``` -------------------------------- ### getServer Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/Bukkit.html Gets the current Server singleton instance. ```APIDOC ## getServer ### Description Gets the current `Server` singleton. ### Returns Server instance being ran ``` -------------------------------- ### Get Profession Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/Villager.html Gets the current profession of this villager. ```APIDOC ## Method: getProfession ### Description Gets the current profession of this villager. ### Method Signature `@NotNull Villager.Profession getProfession()` ``` -------------------------------- ### Bukkit.getHelpMap() Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/help/class-use/HelpMap.html Retrieves the HelpMap instance from the Bukkit class. This map contains all registered help topics for the server. ```APIDOC ## Bukkit.getHelpMap() ### Description Gets the `HelpMap` providing help topics for this server. ### Method `static @NotNull HelpMap` ### Endpoint N/A (Java Method Call) ``` -------------------------------- ### width() Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/configuration/file/YamlConfigurationOptions.html Gets how long a line can be, before it gets split. ```APIDOC ## width ### Description Gets how long a line can be, before it gets split. ### Method GET ### Endpoint /width ### Returns How the max line width ``` -------------------------------- ### Server.Spigot Constructor Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/Server.Spigot.html Initializes a new instance of the Server.Spigot class. ```APIDOC ## Server.Spigot Constructor ### Description Initializes a new instance of the Server.Spigot class. ### Method Signature `public Spigot()` ``` -------------------------------- ### FallingBlock.getBlockState() Source: https://jd.papermc.io/paper/1.21.10/index-all.html Get the data of the falling block represented as a `BlockState` which includes potential NBT data that gets applied when the block gets placed on landing. ```APIDOC ## FallingBlock.getBlockState() ### Description Get the data of the falling block represented as a `BlockState` which includes potential NBT data that gets applied when the block gets placed on landing. ### Method GET ### Endpoint /FallingBlock/getBlockState ``` -------------------------------- ### Constructor Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/plugin/SimpleServicesManager.html Initializes a new instance of the SimpleServicesManager class. ```APIDOC ## SimpleServicesManager() ### Description Initializes a new instance of the SimpleServicesManager class. ### Constructor `SimpleServicesManager()` ``` -------------------------------- ### Get Villager Type Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/Villager.html Gets the current type of this villager. ```APIDOC ## Method: getVillagerType ### Description Gets the current type of this villager. ### Method Signature `@NotNull Villager.Type getVillagerType()` ``` -------------------------------- ### Get Villager Experience Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/Villager.html Gets the trading experience of this villager. ```APIDOC ## Method: getVillagerExperience ### Description Gets the trading experience of this villager. ### Method Signature `int getVillagerExperience()` ``` -------------------------------- ### Constructor Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/plugin/SimpleServicesManager.html Initializes a new instance of the SimpleServicesManager class. ```APIDOC ## SimpleServicesManager ### Description Initializes a new instance of the SimpleServicesManager class. ### Method `SimpleServicesManager()` ``` -------------------------------- ### Get Reputation Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/Villager.html Get the reputation for a specific player by UUID. ```APIDOC ## Method: getReputation ### Description Get the `reputation` for a specific player by `UUID`. ### Method Signature `Reputation getReputation(@NotNull UUID uniqueId)` ``` -------------------------------- ### build Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/registry/data/dialog/input/TextDialogInput.Builder.html Finalizes the configuration and creates the TextDialogInput object. ```APIDOC ## build @Contract(value="-> new", pure=true) TextDialogInput build() ### Description Builds the text dialog input. ### Returns the text dialog input ``` -------------------------------- ### Get Sign Side Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets which side of the sign was edited or clicked. ```APIDOC ## getSide() ### Description Gets which side of the sign was edited. ### Method Method in class io.papermc.paper.event.packet.UncheckedSignChangeEvent ### Signature `getSide() - Method in class io.papermc.paper.event.packet.UncheckedSignChangeEvent` --- ### Description Gets which side of the sign was clicked. ### Method Method in class io.papermc.paper.event.player.PlayerOpenSignEvent ### Signature `getSide() - Method in class io.papermc.paper.event.player.PlayerOpenSignEvent` --- ### Description Gets the side of the sign that the command originated from. ### Method Method in class io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent ### Signature `getSide() - Method in class io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent` --- ### Description Returns which side is changed. ### Method Method in class org.bukkit.event.block.SignChangeEvent ### Signature `getSide() - Method in class org.bukkit.event.block.SignChangeEvent` --- ### Description Deprecated. Gets side of the sign opened. ### Method Method in class org.bukkit.event.player.PlayerSignOpenEvent ### Signature `getSide() - Method in class org.bukkit.event.player.PlayerSignOpenEvent` ### Deprecated Deprecated. ``` -------------------------------- ### Trial Spawner Configuration Methods Source: https://jd.papermc.io/paper/1.21.10/index-all.html Methods for configuring trial spawners. ```APIDOC ## Trial Spawner Configuration Methods ### `TrialSpawnerConfiguration.getAdditionalSimultaneousEntities()` **Description**: Gets the additional number of entities this spawner can track at once per tracked player. ### `TrialSpawnerConfiguration.getAdditionalSpawnsBeforeCooldown()` **Description**: Gets the additional number of entities the spawner will spawn per tracked player before going into cooldown. ``` -------------------------------- ### init Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/plugin/java/PluginClassLoader.html Initializes the class loader and links it to the JavaPlugin. ```APIDOC ## init ### Description Initializes both this configured plugin class loader and the java plugin passed to link to each other. This logic is to be called exactly once when the initial setup between the class loader and the instantiated `JavaPlugin` is loaded. ### Method public void init(JavaPlugin plugin) ### Parameters * **plugin** (JavaPlugin) - The `JavaPlugin` that should be interlinked with this class loader. ``` -------------------------------- ### Get Applicable Rail Shapes Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets all applicable shapes for a rail. ```APIDOC ## getShapes() ### Description Gets the shapes which are applicable to this block. ### Method Method in interface org.bukkit.block.data.Rail ### Signature `getShapes() - Method in interface org.bukkit.block.data.Rail` ``` -------------------------------- ### Get Stairs Shape Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the value of the 'shape' property for stairs. ```APIDOC ## getShape() ### Description Gets the value of the 'shape' property. ### Method Method in interface org.bukkit.block.data.type.Stairs ### Signature `getShape() - Method in interface org.bukkit.block.data.type.Stairs` ``` -------------------------------- ### HelpTopic Class Overview Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/help/HelpTopic.html HelpTopic implementations are displayed to the user when they use the /help command. Custom implementations can be simple, by setting name, shortText, and fullText, or complex by overriding all methods. ```APIDOC ## Class: HelpTopic ### Description Abstract base class for help topics displayed via the /help command. Custom implementations can be simple or complex. ### Known Subclasses - `GenericCommandHelpTopic` - `IndexHelpTopic` ### Fields - `amendedPermission` (String, protected) - `fullText` (String, protected) - `name` (String, protected) - `shortText` (String, protected) ### Constructors - `HelpTopic()`: Creates a new HelpTopic instance. ``` -------------------------------- ### Recipe Constructors with ItemStack Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/inventory/class-use/ItemStack.html Demonstrates various recipe constructors that accept or produce ItemStacks. ```APIDOC ## Recipe Constructors Accepting ItemStack ### Description These constructors are used to create different types of recipes, with the result often being an ItemStack. ### Constructors **BlastingRecipe** - `BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)` - `BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **CampfireRecipe** - `CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)` - `CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **CookingRecipe** - `CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)` - `CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **FurnaceRecipe** - `FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)` - `FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **ShapedRecipe** - `ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result)` **ShapelessRecipe** - `ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result)` **SmithingTransformRecipe** - `SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition)` ``` -------------------------------- ### Get Rail Shape Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the value of the 'shape' property for a rail. ```APIDOC ## getShape() ### Description Gets the value of the 'shape' property. ### Method Method in interface org.bukkit.block.data.Rail ### Signature `getShape() - Method in interface org.bukkit.block.data.Rail` ``` -------------------------------- ### create Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/registry/keys/PaintingVariantKeys.html Creates a typed key for `Art` in the registry `minecraft:painting_variant`. ```APIDOC ## create public static TypedKey create(Key key) ### Description Creates a typed key for `Art` in the registry `minecraft:painting_variant`. ### Parameters #### Path Parameters - **key** (Key) - Required - the value's key in the registry ### Returns - TypedKey - a new typed key ``` -------------------------------- ### Get Entity Count Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/structure/Structure.html Gets the number of entities present in the structure. ```APIDOC ## getEntityCount ### Description Gets the number of entities in this structure. ### Returns - The number of entities in this structure. ``` -------------------------------- ### Get Palette Count Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/structure/Structure.html Gets the number of palettes available in this structure. ```APIDOC ## getPaletteCount ### Description Gets the number of palettes in this structure. ### Returns - The number of palettes in this structure. ``` -------------------------------- ### Plugin Load Order Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/plugin/PluginDescriptionFile.html Retrieves the phase of server startup at which the plugin should be loaded. Possible values are defined in `PluginLoadOrder`. Defaults to `POSTWORLD`. ```APIDOC ## getLoad ### Description Gives the phase of server startup that the plugin should be loaded. * Possible values are in `PluginLoadOrder`. * Defaults to `PluginLoadOrder.POSTWORLD`. * Certain caveats apply to each phase. * When different, `getDepend()`, `getSoftDepend()`, and `getLoadBefore()` become relative in order loaded per-phase. If a plugin loads at `STARTUP`, but a dependency loads at `POSTWORLD`, the dependency will not be loaded before the plugin is loaded. In the plugin.yml, this entry is named `load`. Example: > ``` load: STARTUP ``` ### Method GET ### Endpoint /plugin/description/load ### Returns - **PluginLoadOrder**: the phase when the plugin should be loaded ``` -------------------------------- ### BlockPopulator Constructor Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/generator/BlockPopulator.html Initializes a new BlockPopulator instance. ```APIDOC ## BlockPopulator() ### Description Initializes a new BlockPopulator. ### Constructor `BlockPopulator()` ``` -------------------------------- ### Get Reputations Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/Villager.html Get all reputations for all players mapped by their unique IDs. ```APIDOC ## Method: getReputations ### Description Get all `reputations` for all players mapped by their `unique IDs`. ### Method Signature `@NotNull Map getReputations()` ``` -------------------------------- ### Get Translation Key Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/EntityType.html Gets the translation key for the entity type. ```APIDOC ## translationKey ### Description Gets the translation key. ### Returns the translation key ### Throws `IllegalArgumentException` - if the entity does not have a translation key (is probably a custom entity) ``` -------------------------------- ### getFullText(CommandSender) - HelpTopic Source: https://jd.papermc.io/paper/1.21.10/index-all.html Returns the full description of this help topic that is displayed when the user requests this topic's details. ```APIDOC ## getFullText(CommandSender) ### Description Returns the full description of this help topic that is displayed when the user requests this topic's details. ### Method Method ### Endpoint N/A ### Parameters - **sender** (CommandSender) - The sender requesting the help topic details. ### Request Example None ### Response #### Success Response (200) - **fullText** (string) - The full description of the help topic. ``` -------------------------------- ### JavaPlugin.init() (overload 1) Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/class-use/Server.html Initializes a JavaPlugin with various server and plugin-related components. ```APIDOC ## JavaPlugin.init(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) ### Description Initializes the JavaPlugin with the provided loader, server instance, description file, data folder, file, and class loader. ### Method `final void` ### Endpoint N/A (Java Method Call) ### Parameters - **loader** (`PluginLoader`) - The plugin loader. - **server** (`Server`) - The server instance. - **description** (`PluginDescriptionFile`) - The plugin's description file. - **dataFolder** (`File`) - The plugin's data folder. - **file** (`File`) - The plugin's JAR file. - **classLoader** (`ClassLoader`) - The class loader for the plugin. ### Response None ### Request Example ```java // This method is typically called internally by the PluginLoader. ``` ``` -------------------------------- ### Get IP Address Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/Server.html Gets the IP address that this server is bound to. ```APIDOC ## getIp ### Description Get the IP that this server is bound to, or empty string if not specified. ### Method GET ### Endpoint /server/ip ### Returns - `@NotNull String` - The IP address the server is bound to. ``` -------------------------------- ### Experience and Recipe Methods Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/HumanEntity.html Methods related to player experience and recipe discovery. ```APIDOC ## getExpToLevel ### Description Get the total amount of experience required for the player to level. ### Returns Experience required to level up ## discoverRecipe ### Description Discover a recipe for this player such that it has not already been discovered. This method will add the key's associated recipe to the player's recipe book. ### Parameters - `recipe` (NamespacedKey) - the key of the recipe to discover ### Returns whether or not the recipe was newly discovered ## discoverRecipes ### Description Discover a collection of recipes for this player such that they have not already been discovered. This method will add the keys' associated recipes to the player's recipe book. If a recipe in the provided collection has already been discovered, it will be silently ignored. ### Parameters - `recipes` (Collection) - A collection of recipe keys to discover. ### Returns The number of recipes that were newly discovered. ``` -------------------------------- ### Get Current Tick Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/Server.html Gets the current internal server tick. ```APIDOC ## getCurrentTick ### Description Get the current internal server tick. ### Method GET ### Endpoint /server/current-tick ### Returns - `int` - The current server tick. ``` -------------------------------- ### Server Configuration and State Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/Bukkit.html Methods for getting and setting server-wide configurations like Nether and whitelist status, and checking player IP logging. ```APIDOC ## getAllowEnd ### Description Gets whether this server allows the End dimension. ### Method public static boolean getAllowEnd() ### Returns whether this server allows the End dimension ``` ```APIDOC ## getAllowNether ### Description Gets whether this server allows the Nether dimension. ### Method public static boolean getAllowNether() ### Returns whether this server allows the Nether dimension ``` ```APIDOC ## isLoggingIPs ### Description Gets whether the server is logging the IP addresses of players. ### Method public static boolean isLoggingIPs() ### Returns whether the server is logging the IP addresses of players ``` -------------------------------- ### Get Command Dispatcher Source: https://jd.papermc.io/paper/1.21.10/io/papermc/paper/command/brigadier/Commands.html Gets the underlying CommandDispatcher. Use with care. ```APIDOC ## getDispatcher @Experimental com.mojang.brigadier.CommandDispatcher getDispatcher() ### Description Gets the underlying `CommandDispatcher`. **Note:** This is a delicate API that must be used with care to ensure a consistent user experience. When registering commands, it should be preferred to use the `register methods` over directly registering to the dispatcher wherever possible. `Register methods` automatically handle command namespacing, command help, plugin association with commands, and more. Example use cases for this method **may** include: * Implementing integration between an external command framework and Paper (although `register methods` should still be preferred where possible) * Registering new child nodes to an existing plugin command (for example an "addon" plugin to another plugin may want to do this) * Retrieving existing command nodes to build redirects ### Returns the dispatcher instance ``` -------------------------------- ### RecipeChoice Creation and Usage Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/inventory/class-use/RecipeChoice.html Demonstrates creating and using RecipeChoice instances for different recipe types. ```APIDOC ## RecipeChoice Methods ### `static RecipeChoice createPredicateChoice(Predicate stackPredicate)` **Description**: Creates a `RecipeChoice` based on a Predicate. ### `RecipeChoice getIngredient()` **Description**: Gets the ingredient in the top slot of the brewing stand. ### `RecipeChoice getInput()` **Description**: Gets the input for the bottom 3 slots in the brewing stand. ### `static RecipeChoice empty()` **Description**: Creates an "empty" recipe choice. ### `RecipeChoice clone()` **Description**: Creates a copy of the RecipeChoice. ### `RecipeChoice validate(boolean allowEmptyRecipes)` **Description**: Validates the RecipeChoice. ## RecipeChoice Constructors and Usage in Recipes ### `ShapelessRecipe addIngredient(@NotNull RecipeChoice ingredient)` **Description**: Adds an ingredient to a ShapelessRecipe. ### `ShapelessRecipe removeIngredient(@NotNull RecipeChoice ingredient)` **Description**: Removes an ingredient from a ShapelessRecipe. ### `ShapedRecipe setIngredient(char key, @NotNull RecipeChoice ingredient)` **Description**: Sets the `RecipeChoice` that a character in the recipe shape refers to. ### `CookingRecipe setInputChoice(@NotNull RecipeChoice input)` **Description**: Sets the input of this cooking recipe. ### `FurnaceRecipe setInputChoice(@NotNull RecipeChoice input)` **Description**: Sets the input choice for a FurnaceRecipe. ### `StonecuttingRecipe setInputChoice(@NotNull RecipeChoice input)` **Description**: Sets the input of this Stonecutting recipe. ### `BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **Description**: Constructor for BlastingRecipe. ### `CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **Description**: Constructor for CampfireRecipe. ### `CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **Description**: Creates a cooking recipe to craft the specified ItemStack. ### `FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)` **Description**: Create a furnace recipe to craft the specified ItemStack. ### `SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition)` **Description**: Deprecated constructor for SmithingRecipe. ### `SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents)` **Description**: Deprecated constructor for SmithingRecipe. ## RecipeChoice Implementations ### `static class RecipeChoice.ExactChoice` **Description**: Represents a choice that will be valid only if one of the stacks is exactly matched (aside from stack size). ### `static class RecipeChoice.MaterialChoice` **Description**: Represents a choice of multiple matching Materials. ## RecipeChoice Usage in Other Recipes ### `SmithingRecipe getAddition()` **Description**: Get the addition recipe item. ### `SmithingRecipe getBase()` **Description**: Get the base recipe item. ### `TransmuteRecipe getInput()` **Description**: Gets the input material, which will be transmuted. ### `CookingRecipe getInputChoice()` **Description**: Get the input choice. ### `StonecuttingRecipe getInputChoice()` **Description**: Get the input choice. ### `TransmuteRecipe getMaterial()` **Description**: Gets the additional material required to cause the transmutation. ### `SmithingTransformRecipe getTemplate()` **Description**: Get the template recipe item. ### `SmithingTrimRecipe getTemplate()` **Description**: Get the template recipe item. ### `List getChoiceList()` **Description**: Get a list of RecipeChoices. ### `Map getChoiceMap()` **Description**: Get a copy of the choice map. ``` -------------------------------- ### getModZ Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the amount of Z-coordinates to modify to get the represented block face. ```APIDOC ## getModZ ### Description Get the amount of Z-coordinates to modify to get the represented block. ### Method `BlockFace.getModZ()` ### Returns `int` - The Z-coordinate modification value. ``` -------------------------------- ### getModY Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the amount of Y-coordinates to modify to get the represented block face. ```APIDOC ## getModY ### Description Get the amount of Y-coordinates to modify to get the represented block. ### Method `BlockFace.getModY()` ### Returns `int` - The Y-coordinate modification value. ``` -------------------------------- ### Bukkit and Server Methods Source: https://jd.papermc.io/paper/1.21.10/index-all.html Methods for setting the default game mode. ```APIDOC ## setDefaultGameMode ### Description Sets the default `GameMode` for new players. ### Method `setDefaultGameMode(GameMode)` ### Endpoint `org.bukkit.Bukkit` (static method) `org.bukkit.Server` (interface method) ``` -------------------------------- ### Server.getHelpMap() Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/help/class-use/HelpMap.html Retrieves the HelpMap instance from the Server interface. This map contains all registered help topics for the server. ```APIDOC ## Server.getHelpMap() ### Description Gets the `HelpMap` providing help topics for this server. ### Method `@NotNull HelpMap` ### Endpoint N/A (Java Method Call) ``` -------------------------------- ### getModX Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the amount of X-coordinates to modify to get the represented block face. ```APIDOC ## getModX ### Description Get the amount of X-coordinates to modify to get the represented block. ### Method `BlockFace.getModX()` ### Returns `int` - The X-coordinate modification value. ``` -------------------------------- ### Constructors Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/command/Command.html Constructors for creating new Command instances. ```APIDOC ## Command (name) ### Description Protected constructor for creating a Command with a name. ### Method `protected Command(@NotNull String name)` ``` ```APIDOC ## Command (name, description, usageMessage, aliases) ### Description Protected constructor for creating a Command with a name, description, usage message, and aliases. ### Method `protected Command(@NotNull String name, @NotNull String description, @NotNull String usageMessage, @NotNull List aliases)` ``` -------------------------------- ### Get Translation Key Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/GameRule.html Gets the translation key for the GameRule, useful for localization. ```APIDOC ## translationKey ### Description Gets the translation key. ### Method Signature `@NotNull public @NotNull String translationKey()` ### Returns - `String` - The translation key for this GameRule. ``` -------------------------------- ### create Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/MusicInstrument.html Creates an inlined music instrument. ```APIDOC ## create Creates an inlined music instrument. ### Method `static MusicInstrument` ### Parameters - `value` (Consumer>) - The consumer to build the instrument. ### Returns A new `MusicInstrument` instance. ``` -------------------------------- ### Custom PersistentDataType Example Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/persistence/PersistentDataType.html An example demonstrating how to implement a custom PersistentDataType for UUIDs. ```APIDOC ## Custom Implementation Example ```java public class UUIDTagType implements PersistentDataType { @Override public Class getPrimitiveType() { return byte[].class; } @Override public Class getComplexType() { return UUID.class; } @Override public byte[] toPrimitive(UUID complex, PersistentDataAdapterContext context) { ByteBuffer bb = ByteBuffer.wrap(new byte[16]); bb.putLong(complex.getMostSignificantBits()); bb.putLong(complex.getLeastSignificantBits()); return bb.array(); } @Override public UUID fromPrimitive(byte[] primitive, PersistentDataAdapterContext context) { ByteBuffer bb = ByteBuffer.wrap(primitive); long firstLong = bb.getLong(); long secondLong = bb.getLong(); return new UUID(firstLong, secondLong); } } ``` ``` -------------------------------- ### Get Signal Strength Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the strength of the redstone signal to be emitted by a Target block. ```APIDOC ## getSignalStrength() ### Description Gets the strength of the redstone signal to be emitted by the Target block ### Method Method in class io.papermc.paper.event.block.TargetHitEvent ### Signature `getSignalStrength() - Method in class io.papermc.paper.event.block.TargetHitEvent` ``` -------------------------------- ### PlayerLaunchProjectileEvent Methods Source: https://jd.papermc.io/paper/1.21.10/index-all.html Methods related to player projectile launch events. ```APIDOC ## PlayerLaunchProjectileEvent ### setShouldConsume Set whether to consume the ItemStack or not **Method:** N/A (Event method) **Parameters:** - **boolean** - Whether to consume the ItemStack. ``` -------------------------------- ### setServer Source: https://jd.papermc.io/paper/1.21.10/org/bukkit/Bukkit.html Attempts to set the Server singleton. This cannot be done if the Server is already set. ```APIDOC ## setServer ### Description Attempts to set the `Server` singleton. This cannot be done if the Server is already set. ### Parameters * `server` (Server) - Server instance ``` -------------------------------- ### Get Sign from Player Event Source: https://jd.papermc.io/paper/1.21.10/index-all.html Gets the sign involved in a player sign-related event. ```APIDOC ## getSign() ### Description Gets the sign that was clicked. ### Method Method in class io.papermc.paper.event.player.PlayerOpenSignEvent ### Signature `getSign() - Method in class io.papermc.paper.event.player.PlayerOpenSignEvent` --- ### Description Gets the sign that the command originated from. ### Method Method in class io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent ### Signature `getSign() - Method in class io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent` --- ### Description Deprecated. Gets the sign that was opened. ### Method Method in class org.bukkit.event.player.PlayerSignOpenEvent ### Signature `getSign() - Method in class org.bukkit.event.player.PlayerSignOpenEvent` ### Deprecated Deprecated. ```