### Install and Run Retype Locally Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/README.md Installs Retype globally and starts the local development server. Ensure Node.js and npm are installed. ```bash npm install retypeapp --global retype start ``` -------------------------------- ### Create a Custom Placeholder Provider Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/placeholders.md Implement the PlaceholderProvider interface to create custom placeholders. This example shows how to create a placeholder for a player's rank. ```java public class PlayerRankPlaceholder implements PlaceholderProvider { @Override public String getName() { return "Player Rank Placeholder"; } @Override public String getIdentifier() { return "player_rank"; } @Override public String parse(FancyPlayer player, String input) { return player.getRank().getName(); } } ``` -------------------------------- ### Example Monorepo Commit Message Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/development-guidelines/monorepo.md An example commit message demonstrating the specified format, indicating a fix for the 'fancynpcs' component. ```text fancynpcs: Fix NPE in teleport command ``` -------------------------------- ### Create an NPC Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/api/getting-started.md This snippet demonstrates the process of creating a new NPC. It involves creating NPC data, applying it to an adapter to get an NPC object, and then registering the NPC with the manager. ```APIDOC ## Create an NPC ### Description This section outlines the steps to create and register a new NPC using the FancyNPCs API. ### Steps 1. **Create NPC Data**: Instantiate `NpcData` with a name, creator UUID, and location. 2. **Create NPC Object**: Use the `NpcAdapter` to create an NPC instance from `NpcData`. 3. **Register NPC**: Register the created NPC with the `NpcManager` to enable FancyNPCs to handle it. 4. **Spawn NPC**: Make the NPC visible to players. ### Code Example ```java // 1. Create NPC Data NpcData data = new NpcData("myNpc", creatorUUID, location); data.setSkin("OliverHD"); // Optional: set skin data.setDisplayName("cool displayname"); // Optional: set display name // 2. Create NPC Object Npc npc = FancyNpcsPlugin.get().getNpcAdapter().apply(data); // 3. Register NPC FancyNpcsPlugin.get().getNpcManager().registerNpc(npc); // 4. Initially spawn the NPC for all players npc.create(); npc.spawnForAll(); ``` ### Notes - Ensure you wait at least 10 seconds after server start before registering NPCs, or listen for `NpcsLoadedEvent`. - To prevent NPC persistence, use `npc.setSaveToFile(false);`. ``` -------------------------------- ### Creating a new hologram Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/api/getting-started.md This section details the process of creating a new hologram, starting with defining its data and then instantiating and registering it with the HologramManager. ```APIDOC ## Create a new hologram ### 1. Create the hologram data The `TextHologramData` class is used to store all the information about a hologram. You can create a new instance of `TextHologramData` by providing a name, and the location where the hologram should be spawned. ```java TextHologramData hologramData = new TextHologramData("hologram_name", location); // Adjust the Hologram Data hologramData.setBackground(TextColor.color(100, 255, 79)); hologramData.setBillboard(Display.Billboard.FIXED); ``` !!! You can also use `ItemHologramData` or `ItemHologramData` to create holograms with other types. !!! ### 2. Create the hologram You can use the `TextHologramData` object to create a new hologram. Because the implementation of the hologram differs for every Minecraft version, FancyHolograms provides a factory to create the hologram. ```java HologramManager manager = FancyHologramsPlugin.get().getHologramManager(); Hologram hologram = manager.create(data); ``` ### 3. Register the hologram To let FancyHolograms handle the hologram, you need to register it. FancyHolograms will take care of spawning, despawning, saving the hologram, and more. ```java HologramManager manager = FancyHologramsPlugin.get().getHologramManager(); manager.addHologram(hologram); ``` !!! If you don't want to persist the hologram, you can do the following: `hologram.setPersistent(false);` !!! ``` -------------------------------- ### Punishment Service Operations Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/punishments.md Examples of how to use the Punishment Service to issue various player punishments and retrieve existing ones. ```APIDOC ## Punishment Service This service allows for managing player punishments. ### Methods - **warnPlayer(player, staff, reason, duration)**: Issues a warning to a player. - **mutePlayer(player, staff, reason)**: Issues a permanent mute to a player. - **mutePlayer(player, staff, reason, duration)**: Issues a temporary mute to a player for a specified duration. - **kickPlayer(player, staff, reason)**: Kicks a player from the server. - **banPlayer(player, staff, reason, duration)**: Issues a permanent ban to a player. - **banPlayer(player, staff, reason, duration)**: Issues a temporary ban to a player for a specified duration. - **getPunishmentsForPlayer(player)**: Retrieves a list of all punishments for a given player. - **reportPlayer(player, staff, reason)**: Submits a player report. ``` -------------------------------- ### Example FancyDialogs JSON Schema Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/tutorials/json-schema.md This is a basic example of a dialog defined using the FancyDialogs JSON schema. It includes a title, body text, a text input field, and buttons with actions. ```json { "id": "my_dialog", "title": "My Fancy Dialog", "canCloseWithEscape": true, "body": [ { "text": "This is my first dialog created with FancyDialogs!" } ], "inputs": { "textFields": [ { "key": "fav_color", "order": 1, "label": "What is your favorite color?", "placeholder": "gold", "maxLength": 50, "maxLines": 1, "requirements": { "type": "" }, "width": 200 } ] }, "buttons": [ { "label": "Show favorite color", "tooltip": "Click to show your favorite color", "actions": [ { "name": "message", "data": "Your favorite color is: {fav_color}" } ], "requirements": { "type": "" }, "width": 100 } ], "exitAction": { "label": "Close", "actions": [] }, "columns": 2 } ``` -------------------------------- ### Register NPC Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/api/getting-started.md Register the created NPC with the NpcManager to enable FancyNPCs to handle its lifecycle. Avoid registering immediately after server start; wait for NpcsLoadedEvent or at least 10 seconds. ```java FancyNpcsPlugin.get().getNpcManager().registerNpc(npc); ``` -------------------------------- ### Initialize ApiClient Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/java-sdk.md Create an instance of the ApiClient by providing the API endpoint, an empty string for authentication, and your API token. ```java ApiClient fancyAnalytics = new ApiClient("https://api.fancyanalytics.net", "", "YOUR API TOKEN"); ``` -------------------------------- ### Show a Notice Dialog Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/api/getting-started.md Demonstrates how to display a simple notice dialog to a player. You can use either the constructor with title and message, or a static show method. ```APIDOC ## Show a Notice Dialog ### Description Displays a simple notice dialog to the player. ### Usage ```java // Using constructor new NoticeDialog("title", "message").show(player); // Using static method NoticeDialog.show(player, "message"); ``` ``` -------------------------------- ### Generate E2E Environment via Command Line Source: https://github.com/fancyinnovations/fancyplugins/blob/main/tools/quick-e2e/README.md Use this command to generate a new E2E environment with specified server type, version, build, plugins, EULA, and operator. ```bash java -jar quick-e2e.jar -- --server-type paper --server-version 1.21.4 --server-build latest --pre-installed-plugins "viaversion,luckperms,worldedit" --custom-plugin-providers "monorepo" --eula true --op "OliverHD" ``` -------------------------------- ### Added pagination for /hologram list Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/changelog/v2.md The '/hologram list' command now supports pagination for better management of numerous holograms. ```java - Added pagination for /hologram list ``` -------------------------------- ### Get NPC by Name Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/api/getting-started.md Retrieve an NPC object from the NpcManager using its unique name. Alternatively, use the NPC's ID. ```java Npc npc = FancyNpcsPlugin.get().getNpcManager().getNpc("myNpc"); NpcData data = npc.getData(); ``` -------------------------------- ### Generate E2E Environment using Config File Source: https://github.com/fancyinnovations/fancyplugins/blob/main/tools/quick-e2e/README.md Execute the E2E environment generation process by referencing a configuration file. ```bash java -jar quick-e2e.jar --generate --config-file config.json ``` -------------------------------- ### Get Hologram by Name Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/api/getting-started.md Retrieve a hologram instance using its unique name. The result is an Optional, so handle the case where the hologram might not be found. ```java HologramManager manager = FancyHologramsPlugin.get().getHologramManager(); Hologram hologram = manager.getHologram("hologram_name").orElse(null); if (hologram == null) { // hologram not found return; } ``` -------------------------------- ### Initialize FancyAnalytics API Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/minecraft-plugins.md Initialize the FancyAnalytics API with your project ID and API token, then register and initialize Minecraft plugin metrics. ```java FancyAnalyticsAPI fancyAnalytics = new FancyAnalyticsAPI("project-id", "api-token"); fancyAnalytics.registerMinecraftPluginMetrics(); fancyAnalytics.initialize(); ``` -------------------------------- ### Create and Register Custom Placeholder Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/placeholders.md This section explains how to create a custom placeholder by implementing the PlaceholderProvider interface and registering it with the PlaceholderService. ```APIDOC ## Creating a custom placeholder To create a custom placeholder, implement the `PlaceholderProvider` interface and register it with the `PlaceholderService`. ### Example Implementation ```java public class PlayerRankPlaceholder implements PlaceholderProvider { @Override public String getName() { return "Player Rank Placeholder"; } @Override public String getIdentifier() { return "player_rank"; } @Override public String parse(FancyPlayer player, String input) { return player.getRank().getName(); } } ``` ### Registration ```java PlaceholderService placeholderService = PlaceholderService.get(); placeholderService.registerPlaceholderProvider(new PlayerRankPlaceholder()); ``` ### PlaceholderProvider Interface - **getName()**: Returns the display name of the placeholder provider. - **getIdentifier()**: Returns the unique identifier for the placeholder (e.g., `player_rank`). - **parse(FancyPlayer player, String input)**: Parses the placeholder for the given player and input string. ``` -------------------------------- ### Show a Confirmation Dialog Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/api/getting-started.md Illustrates how to present a confirmation dialog to the player, allowing them to confirm or cancel an action. Callbacks can be provided for both actions. ```APIDOC ## Show a Confirmation Dialog ### Description Asks the player for confirmation on a specific action. ### Usage ```java new ConfirmationDialog("Are you sure you want to reload the configuration?") .withTitle("Confirm reload") .withOnConfirm(() -> player.sendMessage("Reloading configuration...")) .withOnCancel(() -> player.sendMessage("Reload cancelled.")) .ask(player); ``` ``` -------------------------------- ### Show a Notice Dialog Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/api/getting-started.md Display a simple notice dialog to a player. This can be done with a title and message, or just a message. ```java new NoticeDialog("title", "message").show(player); // or NoticeDialog.show(player, "message"); ``` -------------------------------- ### Configure FancyAnalytics Plugin Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/minecraft-servers.md Place your project ID and API key in the `config.yml` file to enable data transmission to FancyAnalytics. Ensure `enable_default_events` is set according to your tracking needs. ```yaml project_id: "your project id" api_key: "your api key", enable_default_events: false ``` -------------------------------- ### Registering an Event Listener Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/events.md Demonstrates how to register a listener for a specific event, such as PlayerReportedEvent, using the EventService. ```APIDOC ## Registering an Event Listener Example for registering a listener for the `PlayerReportedEvent`: ```java EventService eventService = EventService.get(); eventService.registerListener(PlayerReportedEvent.class, (event) -> { System.out.println("PlayerReportedEvent fired with report id: " + event.getReport().id()); }); ``` ``` -------------------------------- ### Create NPC Data Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/api/getting-started.md Instantiate NpcData with a name, creator UUID, and location. Optionally set a custom skin and display name. ```java NpcData data = new NpcData("myNpc", creatorUUID, location); data.setSkin("OliverHD"); // use skin of the player OliverHD data.setDisplayName("cool displayname"); ``` -------------------------------- ### New Skin System Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Introduced a new skin system allowing local image files as skins, support for slim skins, improved caching, a generation queue, and MineSkin API key integration. ```java New skin system - You can now use local image files as skin - Skins set by URL or file can be made slim - The skin cache system is improved - A skin generation queue is added - Skins should load more reliably - You can set a MineSkin API key to speed up loading skins When starting the server for the first time, it might take some time (depending on how many npcs with skins you have) to load all skins. The API for setting skins also changed. Forget the SkinFetcher, now you only need to do the following: ```java npc.getData(). setSkin("username / uuid / url / filename"); ``` The old SkinFetcher API won't work in this version. **Other changes** - Added configurable missing permissions message for the `need_permission` action - Added feature flag to use native threads instead of virtual threads (enable it when you have problems with virtual threads) ``` -------------------------------- ### Add FancyAnalytics Java SDK Repository (Maven) Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/java-sdk.md Configure your Maven project to use the FancyInnovations Maven repository for releases. ```xml fancyplugins-releases FancyPlugins Repository https://repo.fancyinnovations.com/releases ``` -------------------------------- ### Create Item and Block Holograms Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/changelog/v2.md Introduces new hologram types for items and blocks. Use the modified create command to specify the hologram type. ```java /hologram create (text|block|item) (hologram name) ``` -------------------------------- ### Added "/fholo" as alias Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/changelog/v2.md Introduces '/fholo' as a shorthand alias for the '/hologram' command. ```java - Added "/fholo" as alias for "/hologram" ``` -------------------------------- ### Add FancyLib Dependency with Gradle Source: https://github.com/fancyinnovations/fancyplugins/blob/main/libraries/common/README.md Configure your Gradle build script to include the FancyLib repository and dependency. Replace `` with the desired library version. ```kotlin repositories { maven("https://repo.fancyinnovations.com/releases/") // or maven("https://repo.fancyinnovations.com/snapshots/") } dependencies { implementation("de.oliver:FancyLib:") } ``` -------------------------------- ### Add FancyCore Repository to Gradle Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/getting-started.md Configure your Gradle project to use the FancyInnovations releases repository. ```kotlin repositories { maven("https://repo.fancyinnovations.com/releases") } ``` -------------------------------- ### Command Completions Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/changelog/v2.md Command suggestions are now more intelligent, offering only relevant options to the user. ```java Command Completions - Intelligently suggests only relevant options ``` -------------------------------- ### Add Play Sound Action Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md New action that allows NPCs to play sounds. ```java play_sound action ``` -------------------------------- ### Spawn NPC Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/api/getting-started.md Make the NPC visible to all players by calling create() and spawnForAll(). ```java npc.create(); pc.spawnForAll(); ``` -------------------------------- ### E2E Environment Configuration File Source: https://github.com/fancyinnovations/fancyplugins/blob/main/tools/quick-e2e/README.md Define E2E environment settings in a JSON file for use with the --config-file argument. ```json { "serverType": "paper", "serverVersion": "1.21.4", "serverBuild": "latest", "preInstalledPlugins": ["viaversion", "luckperms", "worldedit"], "customPluginProviders": ["monorepo"], "eula": true, "op": "OliverHD" } ``` -------------------------------- ### Add FancyCore Repository to Maven Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/getting-started.md Configure your Maven project to use the FancyInnovations releases repository. ```xml fancyinnovations-releases FancyInnovations Repository https://repo.fancyinnovations.com/releases ``` -------------------------------- ### Parse Placeholders Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/placeholders.md This method demonstrates how to parse placeholders within a given string using the PlaceholderService. ```APIDOC ## Parse placeholders This operation allows you to parse custom placeholders within a string. ### Method ```java PlaceholderService.get().parse(player, "Hello, {player_name}! Your rank is {player_rank}."); ``` ### Parameters #### Path Parameters - **player** (FancyPlayer) - Required - The player object for whom to parse placeholders. - **input** (String) - Required - The string containing placeholders to be parsed. ``` -------------------------------- ### Add FancyAnalytics Java SDK Dependency (Gradle) Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/java-sdk.md Include the Java SDK as a dependency in your Gradle project. Replace VERSION with the desired SDK version. ```kotlin dependencies { implementation("de.oliver.fancyanalytics:java-sdk:VERSION") } ``` -------------------------------- ### Add NpcManager IsLoaded Method Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md A new method to check if the NpcManager has finished loading all NPCs. ```java NpcManager#isLoaded method ``` -------------------------------- ### Create and Register a Hologram Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/api/getting-started.md Use the HologramManager to create a hologram from its data and then register it. Registration ensures FancyHolograms manages the hologram's lifecycle. ```java HologramManager manager = FancyHologramsPlugin.get().getHologramManager(); Hologram hologram = manager.create(data); manager.addHologram(hologram); ``` -------------------------------- ### Add Permissions for Each Action Type Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Introduces individual permissions for each action type, enhancing control over NPC interactions. ```java permissions for each action type ``` -------------------------------- ### Show a Confirmation Dialog Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/api/getting-started.md Present a confirmation dialog to the player with custom title, confirmation, and cancellation actions. ```java new ConfirmationDialog("Are you sure you want to reload the configuration?") .withTitle("Confirm reload") .withOnConfirm(() -> player.sendMessage("Reloading configuration...")) .withOnCancel(() -> player.sendMessage("Reload cancelled.")) .ask(player); ``` -------------------------------- ### Add FancyAnalytics Java SDK Dependency (Maven) Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/java-sdk.md Include the Java SDK as a dependency in your Maven project. Replace VERSION with the desired SDK version. ```xml de.oliver.FancyAnalytics java-sdk VERSION ``` -------------------------------- ### Register a Custom Placeholder Provider Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancycore/api/placeholders.md Register your custom placeholder provider with the PlaceholderService to make it available for parsing. ```java PlaceholderService placeholderService = PlaceholderService.get(); placeholderService.registerPlaceholderProvider(new PlayerRankPlaceholder()); ``` -------------------------------- ### Add Random and Sequential Actions Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/tutorials/action-system.md Demonstrates adding multiple actions, including a random action selection and sequential messages. The NPC will always send the first message, then randomly pick one of the subsequent messages. ```minecraft-commands /npc action (npc) (trigger) add message Hello! ``` ```minecraft-commands /npc action (npc) (trigger) add execute_random_action ``` ```minecraft-commands /npc action (npc) (trigger) add message Message one ``` ```minecraft-commands /npc action (npc) (trigger) add message Message two ``` ```minecraft-commands /npc action (npc) (trigger) add message Message three ``` -------------------------------- ### FancyNpcs Version Command Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/commands/fancynpcs.md Displays the current version of the FancyNpcs plugin. ```APIDOC ## FancyNpcs Version Command ### Description Retrieves the current version of the FancyNpcs plugin. ### Syntax `/fancynpcs version` ### Permissions `fancynpcs.command.fancynpcs.version` ``` -------------------------------- ### Parse Placeholder for Skin Validation Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/faq.md Validate if a placeholder can be used as an NPC skin by parsing it with the '/papi parse --null' command. The placeholder must resolve to a valid username, UUID, URL, or file path without player context. ```minecraft-commands /papi parse --null %YOUR-PLACEHOLDER% ``` -------------------------------- ### Open dialog Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/commands/dialog.md Opens a specified dialog for a player by its ID. ```APIDOC ## Open dialog ### Description Opens a dialog (for a player) by its ID. ### Syntax `/dialog open [player]` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the dialog to open. - **player** (string) - Optional - The name of the player to open the dialog for. Defaults to the command sender. ### Permissions `fancydialogs.commands.dialog.open` ``` -------------------------------- ### Create NPC Instance Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/api/getting-started.md Generate an NPC object using the NpcData and the FancyNpcs API's adapter factory. ```java Npc npc = FancyNpcsPlugin.get().getNpcAdapter().apply(data); ``` -------------------------------- ### Define a Metric Configuration Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/blog/fa-dev-log-2.md Configure a metric with options for sender type, aggregation, and pull settings. Use this to define how FancyAnalytics should handle incoming metric data. ```json { "project_id": "FancyNpcs", "metric_id": "npc_count", "name": "NPC Count", "multi_sender": true, "aggregation_interval": 300, "apply_extra_aggregation": true, "pull_metric": false, "pull_interval": 0, "pull_url": "" } ``` -------------------------------- ### Add TurnToPlayerDistance Command Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Introduces a command to configure the distance at which an NPC turns to face the player. ```java turn_to_player_distance command ``` -------------------------------- ### Added rotatepitch subcommand Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyholograms/changelog/v2.md Introduces the 'rotatepitch' subcommand for adjusting hologram pitch. ```java - Added rotatepitch subcommand ``` -------------------------------- ### Add Open Dialog NPC Action Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancydialogs/tutorials/open-dialog-npc-action.md Use this command to add the 'open_dialog' action to an NPC. This action will trigger the specified dialog when the NPC is interacted with. ```bash /npc action (npc) ANY_CLICK add open_dialog (dialogId) ``` -------------------------------- ### Add Center Command Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md A new command to center an NPC. ```java center command ``` -------------------------------- ### Add Support for 1.21.7 & 1.21.8 Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Added official support for Minecraft versions 1.21.7 and 1.21.8. ```java Added support for 1.21.7 & 1.21.8 ``` -------------------------------- ### Add Collar Color Attribute Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Enables setting the 'collar_color' attribute for wolf and cat NPCs. ```java collar_color attribute for wolves and cats ``` -------------------------------- ### Add Support for 1.21.9 and 1.21.10 Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Added official support for Minecraft versions 1.21.9 and 1.21.10. ```java Added support for 1.21.9 and 1.21.10 ``` -------------------------------- ### Add Text Shadow Color Support Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Support for text shadow color has been added, updating the ChatColorHandler. ```java text shadow color ``` -------------------------------- ### Add FancyAnalytics API Dependency (Maven) Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/minecraft-plugins.md Add the FancyAnalytics API to your Maven project by configuring the repository and dependency. Replace VERSION with the latest release. ```xml fancyplugins-releases FancyPlugins Repository https://repo.fancyinnovations.com/releases ``` ```xml de.oliver.FancyAnalytics mc-api VERSION ``` -------------------------------- ### Add FancyAnalytics API Dependency (Gradle) Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/minecraft-plugins.md Include the FancyAnalytics API in your Gradle project by adding the repository and dependency. Replace VERSION with the latest release. ```kotlin repositories { maven("https://repo.fancyinnovations.com/releases") } ``` ```kotlin dependencies { implementation("de.oliver.fancyanalytics:mc-api:VERSION") } ``` -------------------------------- ### Register Custom String Metric Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancyanalytics/getting-started/minecraft-plugins.md Track the current language by registering a string metric. The metric name must match the one defined on the website. ```java // Register a string metric to track the used language fancyAnalytics.registerStringMetric(new MetricSupplier<>("language", () -> languageManager.getLanguage())); ``` -------------------------------- ### Set NPC Skin using New API Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Use this method to set an NPC's skin by providing a username, UUID, URL, or filename. The old SkinFetcher API is no longer supported. ```java npc.getData(). setSkin("username / uuid / url / filename"); ``` -------------------------------- ### Add Support for 1.21.11 Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Added official support for Minecraft version 1.21.11. ```java Added support for 1.21.11 ``` -------------------------------- ### Add Configurable NPC Update Visibility Interval Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md A configuration option to set the interval at which NPC visibility is updated. ```java configurable npc update visibility interval ``` -------------------------------- ### Add Support for 1.21.6 Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Added official support for Minecraft version 1.21.6. ```java Added support for 1.21.6 ``` -------------------------------- ### Add Support for Minecraft 1.21.5 Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/changelog/v2.md Added official support for Minecraft version 1.21.5. ```java Added support for Minecraft 1.21.5 ``` -------------------------------- ### FancyNpcs Save Command Source: https://github.com/fancyinnovations/fancyplugins/blob/main/docs/src/fancynpcs/commands/fancynpcs.md Saves the current state and configuration of the FancyNpcs plugin. ```APIDOC ## FancyNpcs Save Command ### Description Manually saves the current state and configuration of the FancyNpcs plugin to disk. This is useful for ensuring data persistence. ### Syntax `/fancynpcs save` ### Permissions `fancynpcs.command.fancynpcs.save` ```