### BattlePass Quests Example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/battlepass This snippet demonstrates how to configure player quests for the BattlePass system. It includes examples for harvesting a specific crop stage and planting a crop. The `variable` field specifies the crop ID or stage, and `name` provides a display name for the quest. ```yaml quests: 1:# Harvest crops type:customcrops_harvest variable:tomato_stage_4# remove the namespace if you are using ItemsAdder name:'Harvest tomatoes' required-progress:5 2:# Plant crops type:customcrops_plant variable:tomato# crop id name:'Plant tomatoes' required-progress:5 ``` -------------------------------- ### Sprinkler Configuration Example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/sprinkler This snippet shows an example of how to configure a sprinkler in the CustomCrops plugin. It highlights the importance of a unique identifier and specifying the sprinkler type. ```yaml sprinkler_1: type: FURNITURE ``` -------------------------------- ### Setup Requirements Configuration Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/sprinkler Configures the conditions players must meet to use a crop, supporting 'break', 'place', and 'use' events. Includes permission-based requirements. ```yaml requirements: use: {} place: {} break: requirement_1: type: permission value: xxx.xxx ``` -------------------------------- ### CustomCrops Plugin Placeholders and Expressions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/watering-can Guide to using placeholders and expressions within the CustomCrops plugin for dynamic content and logic. ```APIDOC CustomCrops Plugin Placeholders & Expressions: Placeholder & Expression: - Documentation on how to utilize placeholders and expressions for dynamic values and logic within the plugin. ``` -------------------------------- ### CustomCrops Plugin Placeholders and Expressions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/fertilizer Guide to using placeholders and expressions within the CustomCrops plugin for dynamic content and logic. ```APIDOC CustomCrops Plugin Placeholders & Expressions: Placeholder & Expression: - Documentation on how to utilize placeholders and expressions for dynamic values and logic within the plugin. ``` -------------------------------- ### Crop Event Settings (Planting) Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Configures events that occur when a crop is planted. This example plays a sound and triggers a hand-swing animation. ```yml events: plant: swing_hand_action: type: swing-hand value: true sound_action: type: sound value: source: player key: minecraft:item.hoe.till volume: 1 pitch: 1 ``` -------------------------------- ### Expression Action Example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/action Demonstrates how to use expressions for the 'value' field, allowing dynamic calculation based on game variables like '{level}'. ```yaml exp_action: type: exp value: '{level} * 3' ``` -------------------------------- ### Custom Item Provider Implementation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/other-block-system Example implementation of CustomItemProvider for managing custom block and item data. This interface provides methods for placing, removing, and identifying custom blocks and furniture. ```java package net.momirealms.customcrops.api.example; import net.momirealms.customcrops.api.core.CustomItemProvider; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.checkerframework.checker.nullness.qual.Nullable; public class MyCustomItemProvider implements CustomItemProvider { @Override public boolean removeCustomBlock(Location location) { return ...; } @Override public boolean placeCustomBlock(Location location, String id) { return ...; } @Override public @Nullable Entity placeFurniture(Location location, String id) { return ...; } @Override public boolean removeFurniture(Entity entity) { return ...; } @Override public @Nullable String blockID(Block block) { return ...; } @Override public @Nullable String itemID(ItemStack itemStack) { return ...; } @Override public @Nullable ItemStack itemStack(Player player, String id) { return ...; } @Override public @Nullable String furnitureID(Entity entity) { return ...; } @Override public boolean isFurniture(Entity entity) { return ...; } } ``` -------------------------------- ### Configure Pot Water Refill Methods Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Details the methods for refilling a pot with water, including the item used, amount of water added, and any returned items or effects. Examples include using a WATER_BUCKET or POTION. ```yml # Configuration for water refill methods fill-method: # Method 1: Using a WATER_BUCKET WATER_BUCKET: add: 3 return: BUCKET action: "minecraft:item.bucket.fill" animation: "minecraft:player.hand_swing" # Method 2: Using a POTION POTION: add: 1 return: GLASS_BOTTLE action: "minecraft:item.bottle.fill" animation: "minecraft:player.hand_swing" ``` -------------------------------- ### Requirement Setup for Pot Usage Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Configures the conditions players must meet for specific interactions with pots, such as requiring a permission to break them. ```yaml requirements: use: {} place: {} break: requirement_1: type: permission value: xxx.xxx ``` -------------------------------- ### Place/Remove Blocks on Bukkit Worlds Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Provides examples for placing and removing blocks and furniture in Bukkit worlds using the ItemManager. ```java ItemManager itemManager = BukkitCustomCropsPlugin.getInstance().getItemManager(); itemManager.placeFurniture(location, "id", FurnitureRotation.NONE); itemManager.placeBlock(location, "id"); itemManager.removeFurniture(location); itemManager.removeBlock(location); ``` -------------------------------- ### Implement Custom Season Provider Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/custom-season-provider Example of a Java class implementing the `SeasonProvider` interface for CustomCrops. It defines how to get the current season for a world and provides an identifier for the provider. ```java package net.momirealms.customcrops.api.example; import net.momirealms.customcrops.api.core.world.Season; import net.momirealms.customcrops.api.integration.SeasonProvider; import org.bukkit.World; import org.jetbrains.annotations.NotNull; public class MySeasonProvider implements SeasonProvider { @Override public @NotNull Season getSeason(@NotNull World world) { // TODO: Implement season logic based on the world return Season.SPRING; // Placeholder } @Override public String identifier() { return "MySeasonPlugin"; } } ``` -------------------------------- ### Registering Custom Listeners and Providers Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/other-block-system Example of how to register your custom event listener and item provider with the Custom Crops plugin upon your plugin's enablement. This involves getting the ItemManager instance and setting your custom implementations. ```java package net.momirealms.customcrops.api.example; import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; import net.momirealms.customcrops.api.core.AbstractItemManager; import org.bukkit.plugin.java.JavaPlugin; public class MyPlugin extends JavaPlugin { @Override public void onEnable() { register(); } public void register() { AbstractItemManager itemManager = BukkitCustomCropsPlugin.getInstance().getItemManager(); MyCustomListener listener = new MyCustomListener(itemManager); MyCustomItemProvider provider = new MyCustomItemProvider(); itemManager.setCustomEventListener(listener); itemManager.setCustomItemProvider(provider); } } ``` -------------------------------- ### CustomCrops Plugin Action and Condition Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Explains the 'Action' and 'Condition' systems within the CustomCrops plugin, detailing how to define and use custom actions and conditions. ```APIDOC CustomCrops Plugin Actions and Conditions: Action: - Describes the system for defining custom actions that can be performed. - Examples include applying effects, spawning items, or triggering events. Condition: - Details the system for defining custom conditions that must be met. - Examples include checking player inventory, time of day, or block states. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/watering-can API reference for the CustomCrops plugin, detailing basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. - Details on how to perform common tasks like getting crop information or manipulating crop states. Custom Mechanism: - Documentation for creating and integrating custom crop mechanisms. - Explains the structure and requirements for custom mechanism implementations. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Details on integrating with or utilizing other block systems within the plugin. - Explains compatibility and interaction protocols. Custom Season Provider: - Guide for implementing custom season providers. - Covers the interface and methods required for custom season logic. ``` -------------------------------- ### CustomCrops Common Questions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Addresses frequently asked questions about the CustomCrops plugin, such as using vanilla farmland as pots, troubleshooting function issues, making watering cans damageable, and using items from other plugins. ```APIDOC CustomCrops Common Questions: Q1: How to use vanilla farmland as pot - Instructions for using vanilla farmland as a pot. Q2: I can't use any of the plugin's functions - Troubleshooting steps for when plugin functions are not working. Q3: How to make watering-cans damageable - Guide on making watering cans have durability. Q4: I want to use items from other plugins for seeds/drops - Information on integrating items from other plugins as seeds or drops. ``` -------------------------------- ### Get CustomCrops World Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Retrieves the CustomCrops world instance associated with a Bukkit World. ```java CustomCropsWorld world = BukkitCustomCropsPlugin.getInstance().getWorldManager().getWorld(Bukkit.getWorld("world")); ``` -------------------------------- ### Get IDs Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Shows how to retrieve unique IDs for blocks, furniture, and items using the ItemManager. ```java ItemManager itemManager = BukkitCustomCropsPlugin.getInstance().getItemManager(); String blockID = itemManager.blockID(block); String furnitureID = itemManager.furnitureID(entity); String itemID = itemManager.id(itemStack); ``` -------------------------------- ### CustomCrops Plugin Actions and Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/placeholder-and-expression Documentation on the actions that can be performed and the conditions that can be checked within the CustomCrops plugin. ```APIDOC CustomCrops Plugin Actions & Conditions: Action: - Describes the available actions that can be triggered by the plugin. Condition: - Details the conditions that can be evaluated for conditional logic. ``` -------------------------------- ### Get Block Type from Blockstate Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Retrieves the block type from a CustomCropsBlockState and accesses its configuration if it's a CropBlock. ```java CustomCropsBlock block = blockState.type(); if (block instanceof CropBlock cropBlock) { CropConfig cropConfig = cropBlock.config(blockState); } ``` -------------------------------- ### CustomCrops Action and Condition Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Covers the 'Action' and 'Condition' aspects of the CustomCrops plugin, explaining how to define actions to be performed and conditions that must be met for certain behaviors. ```APIDOC CustomCrops Actions and Conditions: Action: - Describes the available actions that can be triggered by the plugin. Condition: - Details the conditions that can be checked for conditional logic within the plugin. ``` -------------------------------- ### Get/Remove Blockstate Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Demonstrates how to get and remove block states from a CustomCrops world using a Pos3 coordinate. ```java CustomCropsWorld world = ...; world.getBlockState(pos3); world.removeBlockState(pos3); ``` -------------------------------- ### CustomCrops Unsafe Commands Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Lists and explains the 'Unsafe Commands' provided by the CustomCrops plugin, which may have advanced or potentially disruptive functionalities. ```APIDOC CustomCrops Unsafe Commands: - Documentation for commands that should be used with caution. ``` -------------------------------- ### Get Built-in Block/Item Type from Registry Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Demonstrates how to obtain built-in block and item mechanics from the CustomCrops registry. ```java PotBlock potBlock = (PotBlock) BuiltInBlockMechanics.POT.mechanic(); SeedItem seedItem = (SeedItem) BuiltInItemMechanics.SEED.mechanic(); ``` -------------------------------- ### CustomCrops Plugin Common Questions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop A collection of frequently asked questions regarding the CustomCrops plugin. ```APIDOC CustomCrops Common Questions: - Addresses common issues and queries related to plugin installation, configuration, and usage. - Provides solutions and explanations for typical user problems. ``` -------------------------------- ### CustomCrops Plugin Action and Condition Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Explains the 'Action' and 'Condition' systems within the CustomCrops plugin, used for defining in-game events and triggers. ```APIDOC CustomCrops Actions and Conditions: Action: - Defines the actions that can be performed within the game, often triggered by specific conditions. - Examples include applying effects, spawning items, or triggering events. Condition: - Specifies the conditions that must be met for an action to occur. - Conditions can be based on player stats, game time, crop status, or other factors. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/fertilizer API reference for the CustomCrops plugin, detailing basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. - Details on how to perform common tasks like getting crop information or manipulating crop states. Custom Mechanism: - Documentation for creating and integrating custom crop mechanisms. - Explains the structure and requirements for custom mechanism implementations. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Details on integrating with or utilizing other block systems within the plugin. - Explains compatibility and interaction protocols. Custom Season Provider: - Guide for implementing custom season providers. - Covers the interface and methods required for custom season logic. ``` -------------------------------- ### Sprinkler Pot Whitelist Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/sprinkler A list of allowed planting pot types where the sprinkler can function. The example includes 'default' pot type. ```yaml # List of allowed planting pots where the sprinkler can function pot-whitelist: - default ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions This section details the API provided by the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, and other block systems. It also includes information on custom season providers. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. Custom Mechanism: - Allows for the creation and management of custom crop mechanisms. Plugin Events: - Details the events that can be triggered or listened to within the plugin. Other Block System: - Information on integrating with or utilizing other block systems. Custom Season Provider: - Documentation for implementing custom season providers. ``` -------------------------------- ### Display and Integration Settings Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/config Configures display elements like hologram offsets, block overrides, legacy color code support, and placeholder integration. ```yaml # Set hologram offset correction for different blocks hologram-offset-correction: "crop_stage_death":0 # Specify block types that should be overridden by the plugin # Some common crops: WHEAT/CARROTS/POTATOES/BEETROOTS/SWEET_BERRY_BUSH override-vanilla-blocks: [] other-settings: # It is recommended to use MiniMessage format. If you want to use legacy color codes ("&"), enable support below. # Disabling this can improve performance legacy-color-code-support:true # Requires PlaceholderAPI to function placeholder-register: '{skill-level}':'%levelplugin_farming%' # To use items from other plugins item-detection-order: [] # Whether to protect the original lore of items # Uses the scoreboard component to identify the plugin's lore, # which may conflict with some plugins still using SpigotAPI#ItemMeta protect-original-lore:false ``` -------------------------------- ### Crop Growth Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Specifies the conditions under which a crop can grow to the next stage. This example requires the season to be suitable (Spring or Autumn) and for there to be water. ```yml grow-conditions: default: point: 1 conditions: season_condition: type: suitable_season value: - Spring - Autumn water_condition: type: water_more_than value: 0 ``` -------------------------------- ### CustomCrops Plugin Actions and Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/index Explains the action and condition systems within the CustomCrops plugin, allowing for complex in-game logic. ```APIDOC CustomCrops Plugin Actions & Conditions: Action: - Describes the available actions that can be triggered by custom crops or events. Condition: - Details the conditions that must be met for certain actions or crop behaviors to occur. ``` -------------------------------- ### Register Custom Season Provider Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/custom-season-provider Example of a Java plugin class that registers a custom season provider. The provider is registered when the plugin is enabled. ```java package net.momirealms.customcrops.api.example; import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; import org.bukkit.plugin.java.JavaPlugin; public class MyPlugin extends JavaPlugin { @Override public void onEnable() { register(); } public void register() { BukkitCustomCropsPlugin.getInstance().getIntegrationManager().registerSeasonProvider(new MySeasonProvider()); } } ``` -------------------------------- ### CustomCrops Actions and Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/cluescrolls Documentation on defining actions and conditions within the CustomCrops plugin. ```APIDOC CustomCrops Actions & Conditions: Action: - Defines the actions that can be performed by custom crops. Condition: - Specifies the conditions that must be met for certain crop behaviors. ``` -------------------------------- ### Crop Planting Requirements Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Defines conditions that must be met before a crop can be planted. This example requires the season to be Spring or Autumn and provides a message if the condition is not met. ```yml requirements: plant: requirement_1: type: season value: - Spring - Autumn not-met-actions: message_action: type: message value: '[X] It''s not a good season to plant tomato' ``` -------------------------------- ### CustomCrops Format Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Explains the various formats used by the CustomCrops plugin, including text, crop definitions, sprinkler and watering can configurations, fertilizer usage, and the config.yml file. ```APIDOC CustomCrops Format: Text: - Defines the format for text-based configurations. Crop: - Specifies the structure for defining custom crops. Sprinkler: - Details the configuration format for sprinklers. Watering Can: - Describes the format for watering can items. Fertilizer: - Outlines the format for fertilizer items. config.yml: - Documentation for the main configuration file. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility API reference for the CustomCrops plugin, detailing basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental methods for interacting with custom crops. - Details on adding, removing, and managing crop data. Custom Mechanism: - Documentation for creating and implementing custom crop mechanics. - Covers event handling and custom logic integration. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom functionality. Other Block System: - Explains integration with other block-related systems. - Details on compatibility and data exchange. Custom Season Provider: - Guide for implementing custom season providers. - How to define and manage custom seasonal effects on crops. ``` -------------------------------- ### Set/Remove/Get Custom Data in Blockstate Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Illustrates how to manage custom data within a block state using a SynchronizedCompoundMap, including putting, getting, and removing data. ```java SynchronizedCompoundMap compoundMap = blockState.compoundMap(); compoundMap.remove("key"); compoundMap.put("key", newStringTag("key", "test")); compoundMap.get("key"); ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/custom-season-provider This section details the API for the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. - Details on creating, managing, and retrieving crop data. Custom Mechanism: - Explains how to implement custom crop behaviors and mechanics. - Includes examples of defining unique growth patterns and interactions. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Documentation for integrating CustomCrops with other block-related systems. - Covers compatibility and interaction protocols. Custom Season Provider: - Guide on creating custom season providers for the plugin. - Allows for defining unique seasonal effects on crops. ``` -------------------------------- ### Sprinkler Water Storage Capacity Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/sprinkler Specifies the maximum amount of water the sprinkler can hold, which limits its operational duration before requiring a refill. The example sets the capacity to 4. ```yaml # Maximum capacity for storing water storage: 4 ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/other-block-system This section details the API for the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. - Details on creating, managing, and retrieving crop data. Custom Mechanism: - Explains how to implement custom crop behaviors and mechanics. - Includes examples of defining unique growth patterns and interactions. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Documentation for integrating CustomCrops with other block-related systems. - Covers compatibility and interaction protocols. Custom Season Provider: - Guide on creating custom season providers for the plugin. - Allows for defining unique seasonal effects on crops. ``` -------------------------------- ### Crop Event Settings (Reach Limit) Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Defines actions to take when a crop's planting limit is reached. This example displays an action bar message to the player. ```yml events: reach_limit: actionbar_action: type: actionbar value: '[X] You are not allowed to plant more crops' ``` -------------------------------- ### Modify Level Action Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/action Adjusts the player's level. A negative value decreases the level, while a positive value increases it. The example shows a decrease of 10 levels. ```yaml money_action: type: level value: -10 ``` -------------------------------- ### Get Configs of Built-in Items Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Demonstrates how to retrieve configuration objects for various built-in CustomCrops items like crops, sprinklers, pots, watering cans, and fertilizers. ```java CropConfig cropConfig = Registries.CROP.get("tomato"); SprinklerConfig sprinklerConfig = Registries.SPRINKLER.get("sprinkler"); PotConfig potConfig = Registries.POT.get("default"); WateringCanConfig wateringCanConfig = Registries.WATERING_CAN.get("watering_can_1"); FertilizerConfig fertilizerConfig = Registries.FERTILIZER.get("quality_1"); ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot This section details the API for the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. - Details on how to perform core tasks like getting crop information or manipulating crop states. Custom Mechanism: - Explains how to implement custom crop behaviors and mechanics. - Covers the structure and requirements for defining unique crop functionalities. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Documentation for integrating with or utilizing other block systems within the plugin. - Details on compatibility and interaction methods. Custom Season Provider: - Guide on creating custom season providers for the plugin. - Explains the interface and implementation for custom seasonal logic. ``` -------------------------------- ### Register Custom Placeholders Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/placeholder-and-expression Allows customization of placeholder identifiers in `config.yml` to integrate with other plugins or custom logic. The example shows how to map a custom placeholder `{skill-level}` to a PlaceholderAPI placeholder. ```APIDOC placeholder-register: '{skill-level}': '%levelplugin_farming%' ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/placeholder-and-expression This section details the API for the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental methods for interacting with the plugin's core functionalities. Custom Mechanism: - Details on how to implement custom crop mechanisms within the plugin. Plugin Events: - Lists and describes events that can be listened to or triggered by the plugin. Other Block System: - Information on integrating with or utilizing other block-related systems. Custom Season Provider: - Documentation for creating custom season providers for the plugin. ``` -------------------------------- ### CustomCrops Plugin Actions and Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility Documentation on the action and condition systems within the CustomCrops plugin, allowing for custom game logic and triggers. ```APIDOC CustomCrops Actions and Conditions: Action: - Describes the available actions that can be performed by or on custom crops. Condition: - Details the conditions that can be checked to trigger specific events or actions. ``` -------------------------------- ### Custom Event Listener Implementation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/other-block-system Example implementation of AbstractCustomEventListener to handle various Custom Crops events like block and furniture interactions. It requires an AbstractItemManager instance for event handling. ```java package net.momirealms.customcrops.api.example; import net.momirealms.customcrops.api.core.AbstractCustomEventListener; import net.momirealms.customcrops.api.core.AbstractItemManager; import org.bukkit.event.EventHandler; public class MyCustomListener extends AbstractCustomEventListener { public MyCustomListener(AbstractItemManager itemManager) { super(itemManager); } @EventHandler(ignoreCancelled = true) public void onInteractFurniture(FurnitureInteractEvent event) { itemManager.handlePlayerInteractFurniture(...); } @EventHandler(ignoreCancelled = true) public void onInteractCustomBlock(CustomBlockInteractEvent event) { itemManager.handlePlayerInteractBlock(...); } @EventHandler(ignoreCancelled = true) public void onBreakFurniture(FurnitureBreakEvent event) { itemManager.handlePlayerBreak(...); } @EventHandler(ignoreCancelled = true) public void onBreakCustomBlock(CustomBlockBreakEvent event) { itemManager.handlePlayerBreak(..); } @EventHandler(ignoreCancelled = true) public void onPlaceFurniture(FurniturePlaceEvent event) { itemManager.handlePlayerPlace(...); } @EventHandler(ignoreCancelled = true) public void onPlaceCustomBlock(CustomBlockPlaceEvent event) { itemManager.handlePlayerPlace(...); } } ``` -------------------------------- ### CustomCrops Plugin Actions and Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format Documentation on the action and condition systems within the CustomCrops plugin, allowing for custom game logic and triggers. ```APIDOC CustomCrops Actions and Conditions: Action: - Describes the available actions that can be performed by or on custom crops. Condition: - Details the conditions that can be checked to trigger specific events or actions. ``` -------------------------------- ### Crop Growth Stages and Models Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Defines the maximum growth stages for a crop and the appearance (model) and actions for each stage. This example shows stage 0 with a specific model and a chance to drop seeds upon breaking. ```yml max-points: 6 points: 0: model: tomato_stage_1 hologram-offset-correction: 0.2 type: BLOCK requirements: break: ... interact: ... events: grow: {} interact: {} break: action_1: type: drop-item value: ignore-fertilizer: true item: tomato_seeds min: 1 max: 1 chance: 0.3 ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format API reference for the CustomCrops plugin, detailing basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental methods for interacting with custom crops. - Details on adding, removing, and managing crop data. Custom Mechanism: - Documentation for creating and implementing custom crop mechanics. - Covers event handling and custom logic integration. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom functionality. Other Block System: - Explains integration with other block-related systems. - Details on compatibility and data exchange. Custom Season Provider: - Guide for implementing custom season providers. - How to define and manage custom seasonal effects on crops. ``` -------------------------------- ### Advanced Permission Condition with Actions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/condition This example showcases an advanced condition using permissions. It includes multiple permission checks and defines actions to be taken if the conditions are not met. The structure highlights correct YAML formatting for multiple conditions of the same type. ```yaml # This example uses two permission conditions requirement_permission_1: type:permission value: - xxx.1.xxx requirement_permission_2: type:permission value: - xxx.2.xxx not-met-actions: action_1: type:xxx value:... ``` -------------------------------- ### Conditional Action: Harvest and Replant Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/action An example showcasing conditional actions. If the player interacts with a ripe crop with an empty hand, it's harvested and the hand is swung. If the player interacts with tomato seeds, it's harvested, the hand is swung, the crop is replanted, and the seed count is decremented. ```yaml events: interact: action_1: type: conditional value: conditions: # require both hands to be empty requirement_1: type: item-in-hand value: item: "AIR" requirement_2: type: item-in-hand value: hand: other item: "AIR" actions: action_1: type: break value: true action_2: type: swing-hand value: true action_2: type: conditional value: conditions: requirement_1: type: item-in-hand value: item: "customcrops:tomato_seeds" amount: 1 actions: action_1: type: break value: true action_2: type: swing-hand value: true action_3: type: plant value: crop: tomato point: 0 action_4: type: item-amount value: -1 ``` -------------------------------- ### CustomCrops Plugin Actions and Conditions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/action Documentation on the action and condition systems within the CustomCrops plugin, allowing for custom game logic and triggers. ```APIDOC CustomCrops Actions and Conditions: Action: - Describes the available actions that can be performed by or on custom crops. Condition: - Details the conditions that can be checked to trigger specific events or actions. ``` -------------------------------- ### CustomCrops Plugin Format Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/watering-can Details the various file formats used by the CustomCrops plugin, including text, crop, sprinkler, watering can, pot, fertilizer, and configuration files. ```APIDOC CustomCrops Plugin Format: Text Format: - Specifies the format for text-based configurations or data. Crop Format: - Defines the structure for defining custom crops. Sprinkler Format: - Details the configuration for sprinkler mechanics. Watering Can Format: - Describes the format for watering can functionalities. Pot Format: - Specifies the configuration for pot-related features. Fertilizer Format: - Outlines the format for fertilizer configurations. config.yml: - Documentation for the main plugin configuration file. ``` -------------------------------- ### CustomCrops Plugin Unsafe Commands Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/placeholder-and-expression Lists and explains potentially unsafe commands available in the CustomCrops plugin, with warnings about their usage. ```APIDOC CustomCrops Plugin Unsafe Commands: Description: - This section lists commands that should be used with caution as they might have unintended consequences or affect game stability if misused. Usage: - Provides syntax and explanations for each unsafe command. ``` -------------------------------- ### CustomCrops Plugin Format Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/placeholder-and-expression Details the various file formats and data structures used by the CustomCrops plugin for configuration and data management. ```APIDOC CustomCrops Plugin Format: Text Format: - Describes the format for text-based configurations or data. Crop Format: - Specifies the structure for defining custom crops. Sprinkler Format: - Details the configuration format for sprinklers. Watering Can Format: - Outlines the format for watering can configurations. Pot Format: - Describes the format for pot configurations. Fertilizer Format: - Specifies the format for fertilizer configurations. config.yml: - Documentation for the main configuration file, config.yml. ``` -------------------------------- ### CustomCrops Plugin Format Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Details the various file formats used by the CustomCrops plugin, including text, crop definitions, sprinkler, watering can, pot, fertilizer, and configuration files. ```APIDOC CustomCrops Plugin Format: Text Format: - Describes the format for text-based elements within the plugin. Crop Format: - Specifies the structure for defining custom crops. - Includes properties like growth stages, yield, and environmental requirements. Sprinkler Format: - Details the configuration for sprinklers. - Covers parameters like range, water output, and placement. Watering Can Format: - Explains the format for watering can items. - Includes properties related to capacity, watering speed, and effects. Pot Format: - Describes the format for defining pots. - Covers pot size, soil types, and plant compatibility. Fertilizer Format: - Details the format for fertilizer items. - Includes properties like nutrient content, application effects, and duration. config.yml: - Documentation for the main configuration file. - Covers global settings, default values, and plugin behavior customization. ``` -------------------------------- ### CustomCrops Placeholders and Expressions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/cluescrolls Details on using placeholders and expressions for dynamic crop behavior. ```APIDOC CustomCrops Placeholders & Expressions: - Provides a system for using placeholders and expressions to create dynamic crop functionalities. ``` -------------------------------- ### CustomCrops Plugin Format Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/fertilizer Details the various file formats used by the CustomCrops plugin, including text, crop, sprinkler, watering can, pot, fertilizer, and configuration files. ```APIDOC CustomCrops Plugin Format: Text Format: - Specifies the format for text-based configurations or data. Crop Format: - Defines the structure for defining custom crops. Sprinkler Format: - Details the configuration for sprinkler mechanics. Watering Can Format: - Describes the format for watering can functionalities. Pot Format: - Specifies the configuration for pot-related features. Fertilizer Format: - Outlines the format for fertilizer configurations. config.yml: - Documentation for the main plugin configuration file. ``` -------------------------------- ### CustomCrops Plugin Placeholder & Expression Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Provides information on using placeholders and expressions within the CustomCrops plugin for dynamic content and logic. ```APIDOC CustomCrops Plugin Placeholders and Expressions: Placeholder & Expression: - Explains how to use placeholders to retrieve dynamic information. - Details on creating and using expressions for conditional logic and calculations. ``` -------------------------------- ### CustomCrops Unsafe Commands Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/cluescrolls Lists and explains potentially unsafe commands for the CustomCrops plugin. ```APIDOC CustomCrops Unsafe Commands: - Lists commands that should be used with caution due to their potential impact on the game or plugin data. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/typewriter This section details the API for the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental methods for interacting with the CustomCrops plugin. - Likely includes functions for managing crops, accessing crop data, and performing basic actions. Custom Mechanism: - Allows developers to implement custom crop behaviors and mechanics. - Details on how to define and register new crop types or interactions. Plugin Events: - Lists events that can be listened to or triggered by the CustomCrops plugin. - Useful for integrating with other plugins or creating custom functionalities based on crop events. Other Block System: - Information on how CustomCrops interacts with or can be integrated into other block-related systems. Custom Season Provider: - Documentation for creating custom season logic or providers for the plugin. - Enables dynamic season changes or custom season effects on crops. ``` -------------------------------- ### CustomCrops Plugin Unsafe Commands Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Documents potentially unsafe commands provided by the CustomCrops plugin, with warnings and usage guidelines. ```APIDOC CustomCrops Plugin Unsafe Commands: - Lists commands that may have unintended consequences if used improperly. - Provides guidance on safe usage and potential risks. ``` -------------------------------- ### Using Vanilla Items as Drops/Seeds Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Demonstrates how to specify vanilla items, such as seeds or other drops, by using their capitalized names in the configuration. ```plaintext seed: APPLE ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop This section details the API for the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops Plugin API: Basic Operations: - Provides fundamental functions for interacting with the CustomCrops plugin. - Details on adding, removing, and managing custom crops. Custom Mechanism: - Explains how to implement custom crop mechanisms. - Includes information on defining crop growth stages, interactions, and effects. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Useful for integrating with other plugins or creating custom behaviors. Other Block System: - Documentation for integrating CustomCrops with other block-related systems. Custom Season Provider: - Information on creating custom season providers for the plugin. - Allows for dynamic season changes affecting crop growth. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/action API reference for the CustomCrops plugin, detailing basic operations, custom mechanisms, plugin events, other block systems, and custom season providers. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental methods for interacting with custom crops. - Details on adding, removing, and managing crop data. Custom Mechanism: - Documentation for creating and implementing custom crop mechanics. - Covers event handling and custom logic integration. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom functionality. Other Block System: - Explains integration with other block-related systems. - Details on compatibility and data exchange. Custom Season Provider: - Guide for implementing custom season providers. - How to define and manage custom seasonal effects on crops. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/custom-mechanism This section details the API provided by the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, and other block systems. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental functions for interacting with custom crops. - Details on creating, modifying, and deleting crop data. Custom Mechanism: - Explains how to implement custom crop behaviors and mechanics. - Includes examples of custom growth, interaction, and effects. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Documentation for integrating CustomCrops with other block-related systems. - Covers compatibility and interaction protocols. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/plugin-events This section details the API provided by the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, and other block systems. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental functions for interacting with custom crops. - Details on creating, modifying, and deleting crop data. Custom Mechanism: - Explains how to implement custom crop behaviors and mechanics. - Includes examples of custom growth, interaction, and effects. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Documentation for integrating CustomCrops with other block-related systems. - Covers compatibility and interaction protocols. ``` -------------------------------- ### CustomCrops Plugin Unsafe Commands Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/index Lists and explains potentially unsafe commands available in the CustomCrops plugin, with warnings about their usage. ```APIDOC CustomCrops Plugin Unsafe Commands: Unsafe Commands: - Provides a list of commands that should be used with caution due to their potential impact on the game or plugin state. ``` -------------------------------- ### CustomCrops Plugin Unsafe Commands Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Documents potentially risky or advanced commands for the CustomCrops plugin, intended for experienced users. ```APIDOC CustomCrops Unsafe Commands: - Provides commands that may alter game state significantly or require careful usage. - Examples might include force-setting crop states or manipulating plugin data directly. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/battlepass This section details the API provided by the CustomCrops plugin, including basic operations, custom mechanisms, plugin events, and other block systems. It also covers custom season providers. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental functions for interacting with custom crops. Custom Mechanism: - Allows for the creation and management of custom crop mechanisms. Plugin Events: - Details the events that the CustomCrops plugin emits, enabling integration with other systems. Other Block System: - Information on how CustomCrops interacts with or provides alternative block systems. Custom Season Provider: - Documentation for implementing custom season logic within the plugin. ``` -------------------------------- ### CustomCrops Plugin Compatibility Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Outlines the compatibility of the CustomCrops plugin with other popular Minecraft plugins and systems. ```APIDOC CustomCrops Plugin Compatibility: Supported Plugins: - MMOItems - MythicMobs - Zaphkiel - ExecutableItems - NeigeItems - BetonQuest 2.0 - BattlePass - ClueScrolls - TypeWriter Supported Levelers: - Lists compatible leveling systems. ``` -------------------------------- ### CustomCrops Plugin API Documentation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/compatibility/cluescrolls This section details the API provided by the CustomCrops plugin, covering basic operations, custom mechanisms, plugin events, and other block systems. ```APIDOC CustomCrops API: Basic Operations: - Provides fundamental functions for interacting with custom crops. - Details on creating, modifying, and deleting crop data. Custom Mechanism: - Explains how to implement custom crop behaviors and mechanics. - Includes examples of custom growth, interaction, and effects. Plugin Events: - Lists and describes events triggered by the CustomCrops plugin. - Information on how to hook into these events for custom logic. Other Block System: - Documentation for integrating CustomCrops with other block-related systems. Custom Season Provider: - Guide on creating custom season providers for advanced crop management. ```