### Running Locally - Environment Setup Source: https://github.com/kodariai/kodaridocs/blob/master/README.md Sets up the local development environment by copying the example environment file and adding the necessary Anthropic API key. ```bash # Create a .env file in the project root: cp .env.example .env # Add your Anthropic API key to .env: # ANTHROPIC_API_KEY=your-api-key-here ``` -------------------------------- ### Examples Class API Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/itemsadder.md Information about the Examples class, which implements org.bukkit.event.Listener. ```APIDOC ## Class: dev.lone.itemsadder.api.Examples ### Description This class implements the `org.bukkit.event.Listener` interface, suggesting it's involved in handling game events, but no public methods are exposed via the API documentation. ``` -------------------------------- ### Example Response - List Available Docs Source: https://github.com/kodariai/kodaridocs/blob/master/README.md Example JSON response from the `/api/v1/available-docs` endpoint, listing available documentation IDs. ```json [ "luckperms" ] ``` -------------------------------- ### Running Locally - Start Service Source: https://github.com/kodariai/kodaridocs/blob/master/README.md Starts the KodariDocs service using Gradle. Ensure the .env file is configured with the Anthropic API key before running. ```gradle ./gradlew bootRun ``` -------------------------------- ### DeluxeMenus Advanced Configuration Example Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md An example of an advanced DeluxeMenus configuration file, including menu title, open commands with associated sounds and messages, and menu size. ```yaml # A DeluxeMenus advanced configuration guide #========================================================= menu_title: '&8> &6&lD&eM &bAdvanced Example' open_command: - advancedmenu - advancedexamplemenu - themostadvancedmenuintheworld open_commands: - '[sound] BLOCK_BEACON_ACTIVATE' - '[message] &7Opening Advanced example menu, Plugin created by &bextended_clip&7!' size: 27 ``` -------------------------------- ### Install Essentials Expansion for Kits Menu Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Installs the Essentials expansion for PlaceholderAPI, required for the Kits menu functionality. This allows displaying kit availability and cooldowns. ```bash /papi ecloud download Essentials /papi reload ``` -------------------------------- ### Example Response - Get Specific Doc Source: https://github.com/kodariai/kodaridocs/blob/master/README.md Example JSON response from the `/api/v1/docs/{docId}` endpoint, containing the documentation content and token count. ```json { "content": "# Luckperms API Reference\n\n## Package: net.luckperms...", "tokens": 4523 } ``` -------------------------------- ### Main - Start Update Task Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalcreditsapi.md Initiates a background task for updates. ```APIDOC ## POST /api/main/update/start ### Description Starts a scheduled task that performs regular updates or maintenance operations for the plugin. ### Method POST ### Endpoint /api/main/update/start ### Response #### Success Response (200) - **message** (String) - Confirmation message that the update task has started. ``` -------------------------------- ### Install Pinger and Server Expansions for Server Selector Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Installs the Pinger and optional Server expansions for PlaceholderAPI, used in the Server Selector menu. Pinger tracks server status and player counts, while Server might provide additional server-related placeholders. ```bash /papi ecloud download Pinger /papi ecloud download Server /papi reload ``` -------------------------------- ### Install Store Menu Expansions Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Installs necessary PlaceholderAPI expansions for the Store menu, including Player, CheckItem, and economic system integrations like Vault, TokenEnchant, Player Points, or Player XP. ```bash /papi ecloud download Player /papi ecloud download CheckItem /papi ecloud download Vault /papi ecloud download TokenEnchant /papi reload ``` -------------------------------- ### Main - Get SQL Manager Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalcreditsapi.md Retrieves the SQLManager instance. ```APIDOC ## GET /api/main/sql/manager ### Description Returns the SQLManager instance used for database interactions. ### Method GET ### Endpoint /api/main/sql/manager ### Response #### Success Response (200) - **sqlManager** (SQLManager) - The instance of the SQLManager. ``` -------------------------------- ### Install Player Expansion for Ranks Menu Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Installs the Player expansion for PlaceholderAPI, necessary for the Ranks menu. This enables the display of player rank status and purchase options. ```bash /papi ecloud download Player /papi reload ``` -------------------------------- ### RivalPets Main Class Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalpetsapi.md Core class for RivalPets plugin functionalities, including setup and management. ```APIDOC ## RivalPets Main Class Provides core functionalities for the RivalPets plugin. ### Class: me.rivaldev.rivalpets.RivalPets Type: Class Extends: org.bukkit.plugin.java.JavaPlugin Methods: - `ActivePetsChest getActivePetsChest()`: Retrieves the active pets chest. - `double getPlayerOffset()`: Gets the player's offset. - `void setupPlaceholderAPI()`: Sets up PlaceholderAPI integration. - `void onReload()`: Handles plugin reload. - `void teleport(Location location, Entity entity)`: Teleports an entity to a location. - `void onEnable()`: Called when the plugin is enabled. - `void setupModelEngine()`: Sets up ModelEngine integration. - `void onDisable()`: Called when the plugin is disabled. - `void generateFiles()`: Generates necessary plugin files. - `boolean isBuffDisabledInWorld(String worldName, String buffName)`: Checks if a buff is disabled in a specific world. - `void setupProtocolLib()`: Sets up ProtocolLib integration. - `String timeAsString(long time)`: Formats time into a string. - `void registerListeners()`: Registers plugin listeners. - `BuffManager getBuffManager()`: Retrieves the buff manager. - `PluginType getType()`: Gets the plugin type. - `List getBlacklistedWorlds(String pluginName)`: Retrieves blacklisted worlds for a plugin. - `void registerCommand()`: Registers plugin commands. - `RivalPets getInstance()`: Gets the RivalPets plugin instance. - `PetsChest getPetChest()`: Retrieves the pet chest. - `String getFormattedDouble(double value)`: Formats a double value. ``` -------------------------------- ### DeluxeMenus Requirements Examples Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Examples of defining requirements for player interactions within DeluxeMenus, such as checking player permissions, money, or specific item states. ```yaml example_2: type: string equals input: "%player_is_op%" output: "yes" right_click_requirement: requirements: example_3: type: has money amount: 100 deny_commands: - "[message] &7You don't have enough money." click_requirement: minimum_requirements: 1 stop_at_success: true deny_commands: - "[message] &7You don't have 1 of the 2 permissions required." requirements: perm1: type: has permission permission: perm.1 perm2: type: has permission permission: perm.2 click_commands: - "[message] &7You have 1 of the 2 permissions required." ``` -------------------------------- ### CreditAPI - Get Instance Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalcreditsapi.md Retrieves the singleton instance of the CreditAPI. ```APIDOC ## GET /api/credits/instance ### Description Provides access to the main CreditAPI instance, allowing interaction with its methods. ### Method GET ### Endpoint /api/credits/instance ### Response #### Success Response (200) - **creditAPIInstance** (CreditAPI) - The singleton instance of the CreditAPI. ``` -------------------------------- ### ShopType Interface Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/shopkeepers.md Represents a shop type, providing methods to get its display name and descriptions for setup. ```APIDOC ## Interface: com.nisovin.shopkeepers.api.shopkeeper.ShopType ### Description Represents a shop type, providing methods to get its display name and descriptions for setup. ### Implements com.nisovin.shopkeepers.api.types.SelectableType ### Methods - `String getDisplayName()` - `List getTradeSetupDescription()` - `String getSetupDescription()` - `String getDescription()` ``` -------------------------------- ### Example: Full JAR Scan Workflow Source: https://github.com/kodariai/kodaridocs/blob/master/README.md Demonstrates the complete workflow for generating documentation using a full JAR scan, including cloning the repository, adding a JAR, running the generation task, and checking the output. ```bash # Clone the repo git clone https://github.com/KodariAI/kodaridocs.git cd kodaridocs # Add your JAR cp ~/spigot-api-1.20.4.jar autogen/src/main/resources/input/ # Generate complete docs ./gradlew :autogen:run # Check output cat autogen/src/main/resources/output/spigot-api-1.20.4.md ``` -------------------------------- ### Get Player Information from ApolloPlayer Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lunarclient-apollo.md Shows how to retrieve various details about a player using the ApolloPlayer interface, including their name, unique ID, and installed mods. ```java // Assuming 'apolloPlayer' is an instance of ApolloPlayer String playerName = apolloPlayer.getName(); UUID playerUuid = apolloPlayer.getUniqueId(); List installedMods = apolloPlayer.getInstalledMods(); ``` -------------------------------- ### Example: Package-Specific Scan Workflow Source: https://github.com/kodariai/kodaridocs/blob/master/README.md Illustrates the process for generating documentation for a specific package from a JAR file. This involves adding the JAR, running the Gradle task with the package argument, and accessing the generated file. ```bash # Add your JAR cp ~/EcoPets.jar autogen/src/main/resources/input/ # Generate docs only for the API package ./gradlew :autogen:run --args="package com.willfp.ecopets.api" # Output will be named with package suffix cat autogen/src/main/resources/output/EcoPets-com-willfp-ecopets-api.md ``` -------------------------------- ### GeneratorPlugin Interface Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/multiverse-core.md Defines the contract for custom generator plugins. Includes methods to get the plugin name, provide an information link, suggest generator IDs, and list example usages. ```java public String getPluginName() public String getInfoLink() public Collection suggestIds(String partial) public Collection getExampleUsages() ``` -------------------------------- ### Start Stopwatch Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lunarclient-apollo.md Starts the stopwatch for the specified recipients. ```java stopwatchModule.startStopwatch(recipients); ``` -------------------------------- ### QuickShopAPI Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Provides access to various managers and settings within the QuickShop API. Includes methods for localization, stackability, player finding, text management, and more. ```java public interface QuickShopAPI { void registerLocalizedTranslationKeyMapping(String key, String value); boolean isAllowStack(); PlayerFinder getPlayerFinder(); TextManager getTextManager(); RegistryManager getRegistry(); GameVersion getGameVersion(); boolean isPriceChangeRequiresFee(); ItemMatcher getItemMatcher(); Plugin getPluginInstance(); boolean isDisplayEnabled(); void logEvent(Object event); ShopControlPanelManager getShopControlPanelManager(); DatabaseHelper getDatabaseHelper(); Map getLimits(); InteractionManager getInteractionManager(); InventoryWrapperRegistry getInventoryWrapperRegistry(); ShopManager getShopManager(); RankLimiter getRankLimiter(); boolean isLimit(); CommandManager getCommandManager(); QuickShopAPI getInstance(); ShopItemBlackList getShopItemBlackList(); Semver getSemVersion(); } ``` -------------------------------- ### Example Requirement: has permission Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md An example of a requirement checking for player permissions, including a deny message for when the permission is not met. ```YAML open_requirement: requirements: example_1: type: has permission permission: open.menu.one deny_commands: - "[message] &cYou don't have the permission." ``` -------------------------------- ### Kit Availability and Permission Check for Item Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Configures an item that requires the player to have the 'essentials.kits.example' permission and checks if the 'example' kit is available using the '%essentials_kit_is_available_example%' placeholder. Executes kit redemption commands on left-click. ```yaml 'example': material: LIME_DYE slot: 11 priority: 1 update: true hide_attributes: true display_name: '&bExample Kit' lore: - '' - '&7Cooldown : &f3 Days' - '&7Left Click to Redeem' view_requirement: requirements: kit_requirement: type: string equals input: '%essentials_kit_is_available_example%' output: 'yes' kit_perm: type: has permission permission: essentials.kits.example left_click_commands: - '[player] kit example' - '[close]' ``` -------------------------------- ### API Endpoint - Get Specific Doc Source: https://github.com/kodariai/kodaridocs/blob/master/README.md GET request to retrieve the content and token count for a specific documentation ID. ```http GET /api/v1/docs/{docId} ``` -------------------------------- ### Getting Server Name in Java Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lands.md This snippet shows how to get the current server name using the APIHandler. It's a fundamental method for identifying the server instance. ```Java import me.angeschossen.lands.api.framework.handler.APIHandler; // Assuming 'apiHandler' is an instance of APIHandler String serverName = apiHandler.getServerName(); APIHandler instance = APIHandler.getInstance(); ``` -------------------------------- ### CommandContainer Class Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Represents a command container with configuration options like permissions, description, and executor. Includes a builder pattern for easy creation. ```java public class CommandContainer { public void setDisabled(boolean disabled) { // Implementation details... } public void setDescription(Function description) { // Implementation details... } public void setPermissions(List permissions) { // Implementation details... } public void setExecutor(CommandHandler executor) { // Implementation details... } public Function getDescription() { // Implementation details... } public Function getDisableCallback() { // Implementation details... } public void setSelectivePermissions(List permissions) { // Implementation details... } public int hashCode() { // Implementation details... } public void setHidden(boolean hidden) { // Implementation details... } public void setDisabledSupplier(Supplier supplier) { // Implementation details... } public static CommandContainerBuilder builder() { // Implementation details... } public boolean isDisabled() { // Implementation details... } public void setDisablePlaceholder(Supplier placeholder) { // Implementation details... } public Supplier getDisabledSupplier() { // Implementation details... } public void bakeExecutorType() { // Implementation details... } public Class getExecutorType() { // Implementation details... } public String getPrefix() { // Implementation details... } public void setDisableCallback(Function callback) { // Implementation details... } public Supplier getDisablePlaceholder() { // Implementation details... } public void setExecutorType(Class executorType) { // Implementation details... } public List getPermissions() { // Implementation details... } public CommandHandler getExecutor() { // Implementation details... } public boolean isHidden() { // Implementation details... } public List getSelectivePermissions() { // Implementation details... } public void setPrefix(String prefix) { // Implementation details... } public boolean equals(Object o) { // Implementation details... } public String toString() { // Implementation details... } public Component getDisableText(CommandSender sender) { // Implementation details... } } ``` -------------------------------- ### QuickShopProvider Interface Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Provides access to the QuickShopAPI instance and the plugin instance. ```APIDOC ## Class: com.ghostchu.quickshop.api.QuickShopProvider ### Description An interface to obtain instances of QuickShopAPI and the plugin. ### Methods - `QuickShopAPI getApiInstance()`: Gets the instance of QuickShopAPI. - `Plugin getInstance()`: Gets the instance of the plugin. ``` -------------------------------- ### Get FancyHolograms Plugin Instance (Static) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/fancyholograms.md Provides a static way to get the singleton instance of the FancyHologramsPlugin. This is useful for accessing plugin features from anywhere in the code. ```java static FancyHologramsPlugin get() ``` -------------------------------- ### RivalHarvesterHoesAPI Main Class Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalharvesterhoesapi.md This snippet outlines the various methods available in the Main class of the RivalHarvesterHoesAPI. These methods cover plugin setup, configuration, data management, and integration with other Bukkit plugins. ```java void setupBentoBox() CacheHandler getCacheHandler() LevelManager getLevelManager() ArrayList getAllEnchants() void setupShopGUIPlus() void setupAureliumSkills() void generateFiles() void registerPlugins() void openPage(String, Player) void versionDetector() String timeAsStringSmall(long) boolean is1_20Version() boolean isHoeMaterial(ItemStack) String getFormattedInt(int) void registerCommands() boolean getProtocolLibEnabled() void registerCrops() NewCropCaching getModernCropCache() void setupCyberLevels() boolean getUltimateSkillsEnabled() boolean getSuperiorSkyBlockHookCanBreak(Player, Location) ItemStack EssenceItem() boolean isAboveVersion(String, String) void setupJobs() void setupProtocolLib() String timeAsString(long) SQLManager getSQLManager() void delayedFullInventory(Player) void cacheZoneBlocks() boolean getSuperiorSkyBlockHookIsEnabled() void setupEcoSkills() ArrayList nbtProcEnchants() boolean isDouble(String) NMSManager setupNMS() String extractMinecraftVersion(String) void setupMCMMO() ArrayList enchantBooks() boolean isAHoe(ItemStack) void handleShop(Player, String, String) boolean isHoe(Player) boolean getFactionsEnabled() ItemStack addGlow(ItemStack, boolean) void onEnable() void setupCitizens() EssenceCaching getEssenceCache() void setupOptimalSkills() void onDisable() void registerListeners() EntityHider entityHider() boolean getOptimalSkillsEnabled() boolean getMcMMOHookIsEnabled() void setupGriefPrevention() boolean getEconomyShopGUI() String getFormattedLong(Long) ItemStack getPageItems(String, String, Player) void setupUltimateCoreSkills() boolean getSuperBoostersEnabled() void setupUltimateCoreCollections() boolean getBentoBoxEnabled() void loadEnchants() void debug(String) boolean isLong(String) EntityHider getEntityHider() void loadEnchantRewards() ProtocolLibHook getProtocolLibHook() NMSManager getNMSHandler() void setupEconomy() void setupEnchantPlugins() boolean isPerPlayerHoe() boolean getQuestsEnabled() EconomyManager getEconomy() ArrayList CapProcEnchants() boolean getUltimateCollectionsEnabled() void setupWorldGuard() boolean getWorldGuardEnabled() void setupEconomyHandler() void setupSuperiorSkyblock() EnchantLogic getEnchantLogic() CommentedConfiguration getConfig() FileConfiguration getConfig() boolean getGriefPreventionEnabled() LevelManager setupLevelManager() boolean getEcoSkills() boolean isPerPlayerHoeEnchants() void loadDropsPrice() boolean getAureliumEnabled() void setupFactionsBridge() void setupXLTournaments() boolean getShopGUIPlusHookIsEnabled() void setupSuperBoosters() void onLoad() void registerEconomy(EconomyManager) String longToDate(long) StandModelLib getStandModelLib() String getFormattedDouble(double) ``` -------------------------------- ### DatabaseHelper Interface Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md This interface defines various methods for interacting with the QuickShop database, including querying, updating, and creating shop-related data. It utilizes CompletableFuture for asynchronous operations and SQLException for potential database errors. ```Java public interface DatabaseHelper { SQLQuery selectTable(String tableName) throws SQLException; CompletableFuture updateShop(Shop shop); CompletableFuture cleanMessageForPlayer(UUID playerId); CompletableFuture cleanMessage(long messageId); CompletableFuture insertHistoryRecord(Object record); CompletableFuture locateShopDataId(long dataId); CompletableFuture saveOfflineTransactionMessage(UUID playerId, String message, long timestamp); CompletableFuture createShop(long shopId); CompletableFuture updateExternalInventoryProfileCache(long shopId, int slot, int amount); CompletableFuture createData(Shop shop); CompletableFuture removeShopMap(String worldName, int x, int y, int z); CompletableFuture removeShopTag(UUID playerId, Long shopId, String tag); CompletableFuture removeShopAllTag(UUID playerId, Long shopId); CompletableFuture tagShop(UUID playerId, Long shopId, String tag); CompletableFuture getDataRecord(long dataId); CompletableFuture removeShop(long shopId); SQLQuery selectAllMessages() throws SQLException; List listTags(UUID playerId); CompletableFuture queryInventoryCache(long shopId); List listShops(boolean includeOffline); List listShops(String worldName, boolean includeOffline); CompletableFuture removeTagFromShops(UUID playerId, String tag); CompletableFuture getPlayerName(UUID playerId); CompletableFuture updatePlayerProfile(UUID playerId, String name, String surname); CompletableFuture updatePlayerProfileInBatch(List profiles); CompletableFuture createShopMap(long shopId, Location location); CompletableFuture> selectPlayerMessages(UUID playerId); List listShopsTaggedBy(UUID playerId, String tag); CompletableFuture getPlayerLocale(UUID playerId); CompletableFuture getPlayerLocale(QUser user); void insertTransactionRecord(UUID playerId, UUID targetPlayerId, double amount, String currency, double tax, UUID shopId, String transactionType); CompletableFuture removeData(long dataId); CompletableFuture insertMetricRecord(ShopMetricRecord metricRecord); CompletableFuture locateShopId(String worldName, int x, int y, int z); CompletableFuture getPlayerUUID(String playerName); } ``` -------------------------------- ### DeluxeMenus: Open Requirement Example (Permission) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Example of how to configure DeluxeMenus to require a player to have a specific permission node to open a menu. If the permission is missing, a message is displayed. ```yaml menu_title: 'Menu that requires permission to open' open_command: testmenu size: 9 open_requirement: requirements: this_requirement_name: type: has permission permission: 'testmenu.open' deny_commands: - '[message] you do not have permission to open testmenu' ``` -------------------------------- ### Shop Control Panel Manager API Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Provides methods for managing the shop control panel, including enabling components, registering and unregistering shops and components, and opening the control panel for a player. ```APIDOC ## Interface: com.ghostchu.quickshop.api.shop.ShopControlPanelManager ### Description Manages the shop control panel, allowing for component registration, unregistration, and panel initialization. ### Methods - **enabledComponents**(): LinkedList - Retrieves a list of enabled control panel components. - **unregister**(Plugin plugin) - Unregisters a plugin's control panel components. - **unregister**(ShopControlPanel panel) - Unregisters a specific shop control panel. - **addComponent**(ControlComponent component) - Adds a control component to the panel. - **initialize**() - Initializes the shop control panel manager. - **controlComponents**(): LinkedHashMap - Retrieves a map of all registered control components. - **openControlPanel**(Player player, Shop shop) - Opens the control panel for a given player and shop. - **register**(ShopControlPanel panel) - Registers a shop control panel. ``` -------------------------------- ### Get Player Connection Information Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/simple-voice-chat.md Retrieves the voice chat connection object for a player. This can be used to check player status or get player-specific data. ```java import de.maxhenkel.voicechat.api.VoicechatConnection; import de.maxhenkel.voicechat.api.events.PlayerConnectedEvent; import de.maxhenkel.voicechat.api.events.PlayerStateChangedEvent; public class VoicechatEvents { public void onPlayerConnected(PlayerConnectedEvent event) { VoicechatConnection connection = event.getConnection(); // Use connection object } public void onPlayerStateChanged(PlayerStateChangedEvent event) { VoicechatConnection connection = event.getConnection(); UUID playerUuid = event.getPlayerUuid(); boolean isDisabled = event.isDisabled(); boolean isDisconnected = event.isDisconnected(); // Use connection and player state information } } ``` -------------------------------- ### Main Class: RivalFishingRodsAPI Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalfishingrodsapi.md This class, Main, extends JavaPlugin and is the entry point for the RivalFishingRods plugin. It contains methods for initialization, registration, and utility functions. ```java public class Main extends JavaPlugin { // ... other methods ... public void onEnable() { // Plugin startup logic generateFiles(); registerListeners(); registerCommands(); setupEconomy(); loadEnchantRewards(); } public void onDisable() { // Plugin shutdown logic } private void generateFiles() { // Implementation to generate configuration or data files. } private void registerListeners() { // Implementation to register event listeners. } private void registerCommands() { // Implementation to register plugin commands. } private void setupEconomy() { // Implementation to set up economy integration. } private void loadEnchantRewards() { // Implementation to load enchantment rewards. } // Utility methods for formatting and data handling public String timeAsStringSmall(long time) { // Formats time into a smaller string representation. return ""; } public String getFormattedInt(int value) { // Formats an integer for display. return ""; } public String getFormattedLong(Long value) { // Formats a long integer for display. return ""; } public String getFormattedDouble(double value) { // Formats a double for display. return ""; } public boolean isLong(String input) { // Checks if a string can be parsed as a long. return false; } public boolean isDouble(String input) { // Checks if a string can be parsed as a double. return false; } // Methods related to rod properties and enchants public ArrayList nbtEnchants() { // Returns a list of enchantments stored in NBT data. return new ArrayList(); } public ArrayList CapProcEnchants() { // Returns a list of capped enchantment processing. return new ArrayList(); } public ArrayList nbtProcEnchants() { // Returns a list of enchantments processed via NBT. return new ArrayList(); } public boolean isRod(Player player) { // Checks if the player is holding a valid fishing rod. return false; } public boolean isRodMaterial(ItemStack itemStack) { // Checks if the item stack is a valid fishing rod material. return false; } public ItemStack addGlow(ItemStack itemStack, boolean glow) { // Adds or removes a glowing effect to an item stack. return itemStack; } // Methods related to caching and managers public LevelManager getLevelManager() { // Returns the LevelManager instance. return null; } public EssenceCaching getEssenceCache() { // Returns the EssenceCaching instance. return null; } public FishesCaching getFishCache() { // Returns the FishesCaching instance. return null; } public EconomyManager getEconomy() { // Returns the EconomyManager instance. return null; } public SQLManager getSQLManager() { // Returns the SQLManager instance. return null; } public LevelManager setupLevelManager() { // Initializes and returns the LevelManager. return null; } public void setupEconomyHandler() { // Sets up the economy handler. } public void registerEconomy(EconomyManager economyManager) { // Registers a specific economy manager. } public void delayedFullInventory(Player player) { // Handles delayed actions for a full inventory. } // Methods related to per-player rod settings public boolean isPerPlayerRodEnchants() { // Checks if enchantments are per-player. return false; } public boolean isPerPlayerRod() { // Checks if rod functionality is per-player. return false; } public ArrayList testChance() { // Method for testing chances, likely for enchantments or drops. return new ArrayList(); } } ``` -------------------------------- ### DeluxeMenus Basics Menu Configuration (basics_menu.yml) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md An example configuration for a basic menu in DeluxeMenus. This file defines how a menu appears and behaves, including its opening command, size, title, and the items it contains. ```yaml # A DeluxeMenus basic configuration guide for beginners #========================================================= # # This note will help you understand the basic functions and configuring of DeluxeMenus: commands, requirements, items and others, and from then on you can start to work with more advanced stuff. You can delete this note or any note below at any time. But if you are still here anyway, then let's move down below # # Open Command # # This setting is the command that will be used to open this menu. Supports normal String or a String List # NOTE: Use "open_command: []" to create a menu with no commands needed # # open_command: # open_command: # - # - # open_command: basicsmenu # Size # # This allows you to set the size of the menu inventory. Range from 9-54. # If this option is not present in the menu configuration, it will default to 54. # size: 9 # Menu title # # This is the title of the menu. You can change it with your custom name # Color codes and placeholders are supported # menu_title: '&aBasics Menu' # Open requirement # # This setting section allows you to define requirements the menu viewer must meet # to be allowed to open this menu in game. # # Any menu you want to restrict access to based on permission # should have a basic "has permission" requirement # # This setting and requirements can be explained more in depth by checking out # the requirements_menu.yml file in your menus folder. # For full reference, check https://github.com/help-chat/DeluxeMenus/wiki/Requirements # open_requirement: requirements: permission: type: has permission permission: deluxemenus.admin den_commands: - '[message] &cYou don''t have permission to do that!' # Item section. This is where you can start add items into menu, and add functions into each items that you did. # For depth explanation on the functions, you can check on the note given from config.yml # For full reference, check https://github.com/help-chat/DeluxeMenus/wiki/Item # items: # Here you need to set the name ID of the item. This name however, does not display on the menu. Every item must have a unique name ID. # In this example, we will call this item name ID: "teststone" 'teststone': #We will start to create a STONE item, material: STONE # with a Block data set to 1, so that you can change stone type from STONE to GRANITE. More informations about the block data can be checked through each items from Minecraft Wikipedia data: 1 # Slots that you want to put the item. Starts from 0 slot: 0 # Here we will name this item. You can change this at anytime. PlaceholderAPI & Color codes supported display_name: "&aThis is a special stone" # This is the lore setting. Referrence of this same with display_name. # You can create multiple lines of lores like this lore: - "&aTest1" - "&cTest2" - "&eTest3" # ============================================================== # # Random tips, tricks, and useful info below # # ============================================================== # # PER ITEM PERMISSION AND PRIORITY INFO: # # Per item permissions and priorities are optional. # High priority = 1, Lowest priority = 2147483647. # This allows you to show different items for a specific menu slot depending on the highest priority # item permission a player has. This makes your menus very dynamic :) # # You CAN NOT specify a permission without a priority! # You CAN specify a priority without a permission. # You should always create a low priority item without a permission which will act as the no permission # item if a player does not have permission for any of the items that require permission, otherwise # no item will be set in the slot if a player does not have permission for any of the permission items. # # ============================================================== # # You specify the command which opens the menu. Make sure this command # does not conflict with any existing commands on your server! # A GUI menu without an open command specified will not be loaded! # # Menus configuration layout: # menu_title: '' # command: <command to open this menu goes here> # inventory_type: '<add this option if you want to create a menu of a different InventoryType aside from chest>' # open_requirement: # requirements: # <unique name for this requirement>: # type: <type for this requirement> # <unique options per requirement type would go here> # deny_commands: # - '[message] you do not meet requirements to open this menu' ``` -------------------------------- ### Handle NPC Start Looking Event (Java) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/fancynpcs.md Listen for when an NPC starts looking at a player. This event is part of the FancyNPCs API and extends Bukkit's Event class. ```Java import de.oliver.fancynpcs.api.events.NpcStartLookingEvent; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; public class NpcListener implements Listener { @EventHandler public void onNpcStartLooking(NpcStartLookingEvent event) { Player player = event.getPlayer(); Npc npc = event.getNpc(); // Handle the event, e.g., send a message to the player player.sendMessage("The NPC " + npc.getName() + " started looking at you."); } } ``` -------------------------------- ### CurrencyHook Interface Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/virtualspawner.md An interface for integrating with different currency plugins. It defines methods for getting the plugin name, initializing the hook, and managing player balances (get, withdraw, deposit). ```Java interface CurrencyHook { String getName(); void init(); double getBalance(Player player); void withdraw(Player player, double amount); void deposit(Player player, double amount); } ``` -------------------------------- ### ProviderIsEmptyException Class Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Exception thrown when a permission provider is empty. ```APIDOC ## ProviderIsEmptyException Class ### Description Exception thrown when a permission provider is empty. ### Methods - `String getProviderName()`: Gets the name of the empty provider. ``` -------------------------------- ### Vignette: Get Resource Location and Opacity Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lunarclient-apollo.md Represents a visual vignette effect, providing methods to get the resource location and opacity. Includes a builder for creating vignette instances. ```java float getOpacity() String getResourceLocation() static Vignette$VignetteBuilder builder() ``` -------------------------------- ### WarDeclaration Interface Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lands.md Provides methods for managing tribute and the start status of a war declaration. Includes setting and retrieving tribute amounts and checking if a war is starting soon. Requires a WarTeam object for certain operations. ```Java void setTribute(double tribute); double getTribute(); CompletableFuture start(); boolean startsSoon(); double getMaxTribute(WarTeam warTeam); ``` -------------------------------- ### ShopBenefitAddEvent API Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Provides methods for handling the addition of shop benefits, including pre, post, retrieve, and main operations with different parameter sets. ```APIDOC ## Class: com.ghostchu.quickshop.api.event.settings.type.benefit.ShopBenefitAddEvent ### Description Handles events related to adding benefits to a shop. ### Methods - `PRE(Shop, QUser, Double)`: Pre-event hook for adding a benefit. - `PRE(Shop, QUser, Double, Double)`: Pre-event hook with additional parameters. - `POST(Shop, QUser, Double)`: Post-event hook for adding a benefit. - `POST(Shop, QUser, Double, Double)`: Post-event hook with additional parameters. - `RETRIEVE(Shop, QUser, Double)`: Retrieve operation for shop benefits. - `RETRIEVE(Shop, QUser, Double, Double)`: Retrieve operation with additional parameters. - `MAIN(Shop, QUser, Double)`: Main operation for adding shop benefits. - `MAIN(Shop, QUser, Double, Double)`: Main operation with additional parameters. - `getUser()`: Retrieves the associated user. - `clone(Phase)`: Clones the event for a specific phase. - `clone(Phase, Double, Double)`: Clones the event with additional parameters. ``` -------------------------------- ### Get Skin Variant Enum Values (Java) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/fancynpcs.md Demonstrates how to retrieve all available SkinVariant enum values and how to use the valueOf method to get a specific variant. This is part of the FancyNPCs skin API. ```Java import de.oliver.fancynpcs.api.skins.SkinData.SkinVariant; public class SkinVariantExample { public void showSkinVariants() { // Get all available variants SkinVariant[] variants = SkinVariant.values(); System.out.println("Available Skin Variants:"); for (SkinVariant variant : variants) { System.out.println("- " + variant.name()); } // Get a specific variant by name SkinVariant classicVariant = SkinVariant.valueOf("CLASSIC"); System.out.println("Specific Variant: " + classicVariant); } } ``` -------------------------------- ### Kodari Command Arguments Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Demonstrates how to pass arguments to the openguimenu action and how these arguments are processed and displayed using placeholders. It also shows how to define argument usage messages for invalid input. ```yaml /COMMAND FirstArg SecondArg And the rest args: - first - second - last {first} returns FirstArg {second} returns SecondArg {last} returns And the rest args_usage_message: "TEXT" ``` -------------------------------- ### ShopManager Singleton and Getters (Java) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/donutorder.md Implements the ShopManager as a singleton for handling shop plugin integrations. Provides methods to get the singleton instance, retrieve registered shops, and get the currently active shop. ```Java public static ShopManager getInstance() public Map<String, ShopHook> getRegisteredShops() public ShopHook getActiveShop() ``` -------------------------------- ### ShopCurrencyEvent Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Handles events related to the shop's currency setting. It includes methods for creating pre-event, post-event, retrieve, and main execution states with different parameter overloads. It extends ShopSettingEvent. ```java public ShopCurrencyEvent PRE(Shop, String) public ShopCurrencyEvent PRE(Shop, String, String) public ShopCurrencyEvent POST(Shop, String) public ShopCurrencyEvent POST(Shop, String, String) public ShopCurrencyEvent RETRIEVE(Shop, String) public ShopCurrencyEvent RETRIEVE(Shop, String, String) public ShopCurrencyEvent clone(Phase) public ShopCurrencyEvent clone(Phase, String, String) public ShopSettingEvent clone(Phase, Object, Object) public PhasedEvent clone(Phase) public ShopCurrencyEvent MAIN(Shop, String) public ShopCurrencyEvent MAIN(Shop, String, String) ``` -------------------------------- ### NexoFurnitureBreakEvent Getters and Setters (Java) Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/nexo.md Provides methods to get the base entity, check cancellation status, retrieve the player, set the drop, get the drop, and retrieve the furniture mechanic. This event implements Cancellable. ```Java ItemDisplay getBaseEntity() boolean isCancelled() Player getPlayer() void setCancelled(boolean) void setDrop(Drop) Drop getDrop() FurnitureMechanic getMechanic() ``` -------------------------------- ### Connect to a Server using Commands Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/configs/deluxemenus.md Demonstrates the commands used to interact with GUI menu items for server selection. It includes closing the menu, sending a message to the player, and connecting them to a specified server. ```plaintext [close] [message] Connecting to vanilla server... [connect] vanilla ``` -------------------------------- ### PlaceholderAPIEconomy Implementation API Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalmobswordsapi.md Details the PlaceholderAPIEconomy class, an implementation of EconomyManager using PlaceholderAPI. ```APIDOC ## Class: me.rivaldev.mobsword.rivalmobswords.ecomanager.PlaceholderAPIEconomy ### Description Implementation of the EconomyManager interface that integrates with PlaceholderAPI to manage economy. ### Implements me.rivaldev.mobsword.rivalmobswords.ecomanager.EconomyManager ### Methods - **getEconomyCommand()**: Returns the command name for PlaceholderAPI economy. - **getEconomyName()**: Returns the name of the PlaceholderAPI economy. - **getEconomyAmount(OfflinePlayer player)**: Retrieves the economy balance using PlaceholderAPI. - **giveEconomyAmount(OfflinePlayer player, double amount)**: Gives currency using PlaceholderAPI. - **removeEconomyAmount(OfflinePlayer player, double amount)**: Removes currency using PlaceholderAPI. ``` -------------------------------- ### CommandParser Class Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Parses command arguments and provides access to them. Includes methods for retrieving arguments and raw command strings. ```java public class CommandParser { public Map getColonArgs() { // Implementation details... } public String getRaw() { // Implementation details... } public List getArgs() { // Implementation details... } } ``` -------------------------------- ### WarStartEvent API Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lands.md Event triggered when a war starts. ```APIDOC ## Class: me.angeschossen.lands.api.events.war.WarStartEvent ### Description Event triggered when a war starts. ### Method - No specific methods beyond those inherited from WarEvent. ``` -------------------------------- ### me.angeschossen.lands.api.framework.blockutil.BlockKey Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/lands.md Interface defining a key for a block, providing methods to get its coordinates. ```APIDOC ## Interface: me.angeschossen.lands.api.framework.blockutil.BlockKey ### Description Interface that defines a key for a block, typically used for identification and lookups. ### Methods - **getX()**: Returns the X-coordinate of the block. - **getY()**: Returns the Y-coordinate of the block. - **getZ()**: Returns the Z-coordinate of the block. - **getChunkZ()**: Returns the Z-coordinate of the chunk the block belongs to. - **getChunkX()**: Returns the X-coordinate of the chunk the block belongs to. ``` -------------------------------- ### General Event Methods Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Outlines methods for general events within the QuickShop API. These cover various interactions like control panel access, history viewing, and shop sign updates. ```Java public ProtectionCheckStatus valueOf(String name) public ProtectionCheckStatus[] values() ``` ```Java public Component getCancelReason() public boolean isCancelled() public void setCancelled(boolean cancelled, Component cancelReason) public Shop getShop() public CommandSender getSender() ``` ```Java public Player getPlayer() public List getShops() public Inventory getInventory() ``` ```Java public Component getCancelReason() public boolean isCancelled() public Player getPlayer() public void setCancelled(boolean cancelled, Component cancelReason) public Shop getShop() public UUID getPurchaser() ``` ```Java public ItemStack original() public ItemStack comparison() public boolean matches() public void matches(boolean match) ``` ```Java public Component getCancelReason() public boolean isCancelled() public QUser getPlayer() public void setCancelled(boolean cancelled, Component cancelReason) public void setCost(double cost) public Shop getShop() public double getCost() ``` ```Java public Event getEvent() public QUser getPlayer() public Location getLocation() public ProtectionCheckStatus getStatus() ``` ```Java public Sign getSign() public Shop getShop() ``` -------------------------------- ### CommandParser Class Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Parses command arguments and provides structured access. ```APIDOC ## Class: com.ghostchu.quickshop.api.command.CommandParser ### Description Parses raw command input into structured arguments. ### Methods - `Map getColonArgs()`: Gets arguments provided in the format 'key:value'. - `String getRaw()`: Gets the raw command string. - `List getArgs()`: Gets the list of parsed arguments. ``` -------------------------------- ### Main - Get Credits Cache Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/rivalcreditsapi.md Retrieves the CreditsCache instance. ```APIDOC ## GET /api/main/credits/cache ### Description Provides access to the CreditsCache object, allowing management of cached credit data. ### Method GET ### Endpoint /api/main/credits/cache ### Response #### Success Response (200) - **creditsCache** (CreditsCache) - The instance of the CreditsCache. ``` -------------------------------- ### CommandProcesser Interface Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md A specific implementation of CommandHandler. ```APIDOC ## Class: com.ghostchu.quickshop.api.command.CommandProcesser ### Description Implements the CommandHandler interface for processing commands. ### Methods - `void onCommand(CommandSender sender, String commandLabel, String[] args)`: Processes a command. - `List onTabComplete(CommandSender sender, String alias, String[] args)`: Provides tab completion suggestions. ``` -------------------------------- ### ShopControlPanel Interface API Source: https://github.com/kodariai/kodaridocs/blob/master/src/main/resources/docs/minecraft/plugins/quickshop.md Allows for the generation of shop control panels for players. ```APIDOC ## Interface: com.ghostchu.quickshop.api.shop.ShopControlPanel ### Description Provides functionality to generate and manage shop control panels for players. ### Methods - **Plugin getPlugin()**: Gets the plugin associated with the control panel. - **ShopControlPanelPriority getPriority()**: Gets the priority of the control panel. - **int getInternalPriority()**: Gets the internal priority level. - **LinkedList generate(Player, Shop)**: Generates the control panel for a player and shop. ```