### Verify WiFlowPlaceholderAPI Installation Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/getting-started Command to verify the installation of WiFlowPlaceholderAPI and view registered expansions. It shows example output of built-in player and server expansions. ```bash /wpapi list ``` -------------------------------- ### Install WiFlowPlaceholderAPI JAR Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/getting-started Instructions for installing the WiFlowPlaceholderAPI plugin by placing the JAR file into the Hytale server's mods directory. ```bash Hytale/ └── mods/ └── WiFlowPlaceholderAPI-1.0.0.jar ``` -------------------------------- ### Example: VIP Build Access Condition Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/configuration An example configuration showing how to allow VIP players to build anywhere by using a flag condition based on their rank. ```json { "flagConditions": { "build": { "allowIf": "{luckperms_in_group_vip}" } } } ``` -------------------------------- ### Install WiFlow PlaceholderAPI Expansion Manually Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/expansions This snippet shows the manual installation process for WiFlow PlaceholderAPI expansions. It involves downloading the expansion JAR file and placing it in the specified directory within the server's mod folder, followed by a reload command. ```bash 1. Download the expansion JAR 2. Place it in `mods/WiFlowPlaceholderAPI/expansions/` 3. Run `/wpapi reload` or restart the server ``` -------------------------------- ### Minimal WiFlowPlaceholderAPI Configuration Example Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/configuration An example configuration for WiFlowPlaceholderAPI that disables the server expansion, enabling only player-related placeholders. ```json { "debug": false, "hotReloadEnabled": true, "builtinExpansions": { "player": true, "server": false } } ``` -------------------------------- ### Native Hytale Permissions Fallback (Command) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/tutorials/permissions Example of using Hytale's native permission system for group membership when LuckPerms is not installed. This command adds a player to a group recognized by the native system. ```bash # Still works without LuckPerms /rg addmember spawn g:staff ``` -------------------------------- ### Install OrbisGuard and Hyxin Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/hyxin Instructions for installing OrbisGuard and Hyxin plugins within the Hytale server environment. This involves placing the necessary JAR files in the correct directories to enable the mixin-based protection. ```text Hytale/ ├── earlyplugins/ │ ├── Hyxin-x.x.x.jar <- Get from Hyxin releases │ └── OrbisGuard-Mixins-0.6.0.jar <- Extended protection └── mods/ └── OrbisGuard-0.6.0.jar <- Main plugin ``` -------------------------------- ### Economy and Faction Placeholder Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/placeholders Shows how to integrate economy balance and faction details into the scoreboard. This example requires both the Economy and Hyfaction plugins to be installed. ```json { "content": [ "[#00ff00]Balance: [#ffffff]{balance}", "", "[#ffaa00]Faction: [#ffffff]{faction}", "[#aaaaaa]Members: [#ffffff]{faction_members}", "[#aaaaaa]Level: [#ffffff]{faction_level}" ] } ``` -------------------------------- ### Hytale Server Plugin Installation Directory Structure Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/getting-started This snippet shows the expected directory structure after placing the WiFlowScoreboard.jar file into the server's mods folder and starting the server. It illustrates the automatically generated configuration and data folders. ```tree Hytale/ └── mods/ └── WiFlowScoreboard-1.0.0.jar mods/WiFlowScoreboard/ ├── config.json ├── playtime.json ├── scoreboards/ │ └── default.json └── animations/ ``` -------------------------------- ### Development/Debug WiFlowPlaceholderAPI Configuration Example Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/configuration An example configuration for WiFlowPlaceholderAPI designed for development and debugging, with all debugging options enabled. ```json { "debug": true, "hotReloadEnabled": true, "builtinExpansions": { "player": true, "server": true } } ``` -------------------------------- ### Test WiFlowPlaceholderAPI Placeholders Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/getting-started Example command to parse and test placeholders directly in-game, demonstrating how to display player information like name and coordinates. ```bash /wpapi parse {player_name} is at {player_x}, {player_y}, {player_z} ``` -------------------------------- ### OrbisGuard API Region Query Example Source: https://docs.wiflow.dev/hytale-plugins/orbismines/architecture Demonstrates how to interact with the OrbisGuard API to retrieve region information. It shows how to get the region manager, obtain a specific region, retrieve its bounds (min/max points), check if a block is contained within the region, and get the total volume of the region. ```java OrbisGuardAPI api = OrbisGuardAPI.getInstance(); IRegionManager manager = api.getRegionContainer().getRegionManager(worldName); IRegion region = manager.getRegion(regionId); // Get region bounds BlockVector3 min = region.getMinimumPoint(); BlockVector3 max = region.getMaximumPoint(); // Check containment boolean inside = region.contains(x, y, z); // Get volume int totalBlocks = region.getVolume(); ``` -------------------------------- ### Example Usage in WiFlow Scoreboard Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi Illustrates how to use WiFlowPlaceholderAPI placeholders within a plugin configuration, specifically shown in a WiFlow Scoreboard example. This demonstrates embedding dynamic data into plugin outputs. ```json { "lines": [ "&6Player: &f{player_name}", "&6World: &f{player_world}", "&6Balance: &a${economy_balance}", "&6Region: &e{orbisguard_region}" ] } ``` -------------------------------- ### Production WiFlowPlaceholderAPI Configuration Example Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/configuration An example configuration for WiFlowPlaceholderAPI suitable for production environments, disabling hot reload for increased stability. ```json { "debug": false, "hotReloadEnabled": false, "builtinExpansions": { "player": true, "server": true } } ``` -------------------------------- ### Placeholder Syntax Examples Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi Demonstrates the unified placeholder syntax used by WiFlowPlaceholderAPI. Placeholders follow the format {identifier_params} and can retrieve dynamic information from various integrated plugins. ```plaintext {player_name} -> Player's username {player_world} -> Current world name {server_ram_used} -> Used RAM in MB {economy_balance} -> Player's balance (requires expansion) {orbisguard_region} -> Current region (requires expansion) ``` -------------------------------- ### Complete Example: RegionLogger Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/api/events A complete example demonstrating how to use the OrbisGuard API to log various region-related events. ```APIDOC ## Complete Example: RegionLogger This example plugin demonstrates how to utilize the OrbisGuard API to log region creation, deletion, redefinition, flag changes, and membership changes. ### Method `setup()` method within a `JavaPlugin` that registers listeners for various `OrbisGuardEvent` subclasses. ### Endpoint N/A (This is a client-side plugin example, not a server API endpoint) ### Request Body N/A ### Response N/A ### Request Example ```java import com.orbisguard.api.OrbisGuardAPI; import com.orbisguard.api.events.*; public class RegionLogger extends JavaPlugin { @Override protected void setup() { super.setup(); OrbisGuardAPI api = OrbisGuardAPI.getInstance(); if (api == null) { getLogger().warning("OrbisGuard not found - region logging disabled"); return; } OrbisGuardEventBus bus = api.getEventBus(); // Log all region changes bus.register(RegionCreatedEvent.class, e -> { log("CREATED", e.getRegion().getId(), "in " + e.getRegion().getWorldName()); }); bus.register(RegionDeletedEvent.class, e -> { log("DELETED", e.getRegion().getId(), "had " + e.getRegion().getOwners().size() + " owners"); }); bus.register(RegionRedefinedEvent.class, e -> { log("RESIZED", e.getRegion().getId(), e.getOldVolume() + " -> " + e.getRegion().getVolume() + " blocks"); }); bus.register(FlagChangedEvent.class, e -> { String action = e.wasCleared() ? "CLEARED" : "SET"; log(action, e.getRegion().getId(), e.getFlag().getName() + " = " + e.getNewValue()); }); bus.register(MembershipChangedEvent.class, e -> { log(e.getChangeType().name(), e.getRegion().getId(), "player " + e.getPlayer()); }); getLogger().info("Region logging enabled!"); } private void log(String action, String regionId, String details) { getLogger().info("[" + action + "] " + regionId + ": " + details); } } ``` ### Response Example Console output from the plugin: ``` [CREATED] region-123: in world_nether [DELETED] region-456: had 5 owners [RESIZED] region-789: 1000 -> 1500 blocks [SET] region-abc: pvp = true [ADD] region-def: player Steve ``` ``` -------------------------------- ### Download Expansion from WiFlow Marketplace Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions Command to download and install an expansion directly from the WiFlow Marketplace. This requires the expansion to have been previously approved and published. ```plaintext /wpapi marketplace download myexpansion ``` -------------------------------- ### Manual PlaceholderAPI Expansion Installation Source: https://docs.wiflow.dev/hytale-plugins/orbismines/api This instruction details the manual method for installing the OrbisMines expansion for WiFlow's PlaceholderAPI. It involves placing the expansion JAR file into the correct directory within the PlaceholderAPI plugin's structure. ```bash Or manually place `orbismines-1.0.1.jar` in `mods/WiFlowPlaceholderAPI/expansions/`. ``` -------------------------------- ### Basic Scoreboard Content Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/placeholders Demonstrates the basic structure for defining scoreboard content using player-specific and server-wide placeholders. This example shows how to display player names and server status. ```json { "content": [ "Player: {player}", "Online: {online}/{max_players}" ] } ``` -------------------------------- ### LuckPerms Prefix Color Code Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/faq Illustrates the correct way to set a prefix with color codes using LuckPerms commands. The example shows using `&c` for red color, emphasizing the need for color codes to display properly. ```bash /lp group admin meta setprefix "&c[Admin] " ``` -------------------------------- ### Complete OrbisGuard Plugin Example Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/api A comprehensive example of a Hytale plugin using the OrbisGuard API to create a protected shop region, set flags, and listen for region-related events. It includes necessary imports and basic plugin structure. ```java import com.orbisguard.api.OrbisGuardAPI; import com.orbisguard.api.BlockVector3; import com.orbisguard.api.region.*; import com.orbisguard.api.flags.*; import com.orbisguard.api.events.*; public class MyPlugin extends JavaPlugin { @Override protected void setup() { super.setup(); OrbisGuardAPI api = OrbisGuardAPI.getInstance(); if (api == null) { getLogger().warning("OrbisGuard not found!"); return; } // Create a shop region IRegionManager manager = api.getRegionContainer() .getRegionManager("world"); BlockVector3 min = BlockVector3.at(100, 0, 100); BlockVector3 max = BlockVector3.at(200, 256, 200); if (!manager.hasRegion("shop")) { IRegion shop = manager.createRegion("shop", min, max); // Set up protection IFlagRegistry flags = api.getFlagRegistry(); manager.setFlag("shop", flags.getFlag("build"), "DENY"); manager.setFlag("shop", flags.getFlag("chest-access"), "ALLOW"); manager.setFlag("shop", flags.getFlag("greet-title"), "Welcome to the Shop!"); manager.setPriority("shop", 50); manager.save(); getLogger().info("Created shop region!"); } // Listen for region events api.getEventBus().register(RegionCreatedEvent.class, event -> { getLogger().info("Region created: " + event.getRegion().getId()); }); api.getEventBus().register(FlagChangedEvent.class, event -> { if (event.wasCleared()) { getLogger().info("Flag " + event.getFlag().getName() + " cleared"); } else { getLogger().info("Flag " + event.getFlag().getName() + " set to " + event.getNewValue()); } }); } } ``` -------------------------------- ### Example: Combat Tag Protection Condition Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/configuration An example configuration demonstrating how to use flag conditions to deny entry into safe zones for players who are combat-tagged. ```json { "flagConditions": { "entry": { "denyIf": "{combatlog_active}" } } } ``` -------------------------------- ### Install OrbisMines PlaceholderAPI Expansion Source: https://docs.wiflow.dev/hytale-plugins/orbismines/api These commands are used to install the OrbisMines expansion for WiFlow's PlaceholderAPI. The first command downloads the expansion from the marketplace, and the second reloads the API to recognize the new expansion. ```bash /wpapi marketplace download orbismines /wpapi reload ``` -------------------------------- ### Combat and Killstreak Placeholder Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/placeholders An example demonstrating the use of placeholders for killstreaks and combat status, requiring KillingSpree and CombatLog plugins. It includes conditional display for combat status. ```json { "content": [ "[#ff0000]PvP Stats", "", "[anim:pulse:#ff0000:#ff8800]Streak: {killstreak}", "[#ffd700]Title: {killstreak_name}", "", { "condition": "{in_combat}", "equals": "true", "then": "[anim:strobe:#ff0000:#ffffff]IN COMBAT!", "else": "[#00ff00]Safe" } ] } ``` -------------------------------- ### Formatting Code Examples Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/configuration Illustrates the usage of various formatting codes, including bold, gold color, reset, hex colors, and multiple color combinations in messages. ```javascript // Bold gold with reset "&l&goldRegion bypass &greenenabled&gold." // Hex color with formatting "&#FF5500&lWARNING: &rThis area is protected." // Multiple colors "&greenFlag '&aqua%s&green' set to '&white%s&green'." ``` -------------------------------- ### OrbisGuard Ban System Integration Example (Java) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/api An example of integrating a ban system with OrbisGuard's Protection Hook API in Java. This snippet registers a hook that denies entry to players banned from specific regions, demonstrating custom deny logic based on player UUID and region. ```java api.getProtectionHookRegistry().register("BanPlugin", (action, playerUuid, worldName, x, y, z, regions, wouldDeny) -> { // Block banned players from entering protected regions if (action == ProtectionAction.ENTRY) { for (IRegion region : regions) { if (isPlayerBannedFromRegion(playerUuid, region.getId())) { return ProtectionCheckResult.DENY; } } } return ProtectionCheckResult.ABSTAIN; }); ``` -------------------------------- ### Query Placeholder Expansions (Java) Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/api This Java code provides methods to query information about registered placeholder expansions. You can retrieve a specific expansion by identifier, get all registered expansions, list their identifiers, check if an expansion is registered, or get the total count. ```java // Get specific expansion PlaceholderExpansion exp = WiFlowPlaceholderAPI.getExpansion("player"); // Get all expansions List all = WiFlowPlaceholderAPI.getExpansions(); // Get registered identifiers Set identifiers = WiFlowPlaceholderAPI.getRegisteredIdentifiers(); // Check if registered boolean registered = WiFlowPlaceholderAPI.isRegistered("economy"); // Count expansions int count = WiFlowPlaceholderAPI.getExpansionCount(); ``` -------------------------------- ### Message Formatting Examples (JavaScript) Source: https://docs.wiflow.dev/hytale-plugins/orbismines/configuration These JavaScript comments illustrate various ways to use color and formatting codes within message strings. Examples include bolding, using named colors, hex colors, and combining multiple formatting options for dynamic in-game messages. ```javascript // Bold gold header with colored content "&l&gold[Mine] &greenReset complete!" // Hex color warning "&#FF0000&lWARNING: &rMine resetting soon!" // Multiple colors "&6[Mine] &e{mine} &7reset: &a{blocks} blocks" ``` -------------------------------- ### World Whitelist Management (Commands) Source: https://docs.wiflow.dev/hytale-plugins/wiflowsclaims/configuration Provides in-game commands to manage the list of worlds where players are allowed to claim land. This helps restrict claiming to specific game environments. ```bash # View current whitelist /claims admin worlds # Add a world /claims admin worlds add myworld # Remove a world /claims admin worlds remove myworld ``` -------------------------------- ### Placeholder Performance Best Practices (Java) Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/api This Java code illustrates performance best practices for registering scoreboard placeholders. It shows a 'good' example using a cached value and a 'bad' example that performs a slow database query on every placeholder resolution, emphasizing the need for fast placeholder resolution. ```java // Good: Use cached value WiFlowsScoreboardAPI.registerPlaceholder("cached_stat", context -> { return cachedStats.getOrDefault(context.getPlayerUuid(), "0"); }); // Bad: Database query on every call WiFlowsScoreboardAPI.registerPlaceholder("slow_stat", context -> { return database.query("SELECT stat FROM players WHERE uuid = ?", context.getPlayerUuid()); }); ``` -------------------------------- ### Use WiFlowPlaceholderAPI in Plugin Configuration (JSON) Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/getting-started Example JSON configuration snippet demonstrating how to use WiFlowPlaceholderAPI placeholders within a plugin, such as a scoreboard configuration. ```json { "title": "Server Info", "lines": [ "&6Player: &f{player_name}", "&6World: &f{player_world}", "&6RAM: &f{server_ram_used}MB / {server_ram_max}MB" ] } ``` -------------------------------- ### Minimal Scoreboard Configuration Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/configuration A basic example of a scoreboard configuration, showing how to set a title and a single line of content that displays the number of online players. ```json { "title": { "show": true, "text": "Server" }, "lines": { "content": [ "Online: {online}" ] } } ``` -------------------------------- ### Manage WiFlowPlaceholderAPI Expansions from Marketplace Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/getting-started Commands to interact with the WiFlowPlaceholderAPI marketplace, including listing available expansions, downloading them, and reloading the plugin to activate new expansions. ```bash # List available expansions /wpapi marketplace list # Download an expansion /wpapi marketplace download orbisguard # Reload to activate /wpapi reload ``` -------------------------------- ### Get OrbisMines API Instance (Java) Source: https://docs.wiflow.dev/hytale-plugins/orbismines/api This Java code snippet shows how to obtain the singleton instance of the OrbisMinesAPI. It includes essential null-checking to handle cases where OrbisMines might not be installed on the server. ```java import com.wiflow.orbismines.OrbisMinesAPI; OrbisMinesAPI api = OrbisMinesAPI.getInstance(); if (api == null) { // OrbisMines is not installed getLogger().warning("OrbisMines not found!"); return; } ``` -------------------------------- ### Get OrbisGuard API Instance (Java) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/api This Java code retrieves the singleton instance of the OrbisGuardAPI. It includes a crucial null check to handle cases where OrbisGuard might not be installed on the server, preventing potential errors. ```java import com.orbisguard.api.OrbisGuardAPI; OrbisGuardAPI api = OrbisGuardAPI.getInstance(); if (api == null) { // OrbisGuard is not installed getLogger().warning("OrbisGuard not found!"); return; } ``` -------------------------------- ### Scoreboard Title and Line Animation Examples (JSON) Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/getting-started These JSON snippets demonstrate how to add animations to the scoreboard title and content lines. The 'anim:rainbow' tag creates a rainbow effect for the title, while 'anim:pulse:#ff0000:#0000ff' applies a pulsing color transition to a line. ```json { "title": { "show": true, "text": "[anim:rainbow]My Server", "color": "#ffffff", "bold": true, "fontSize": 16 } } ``` ```json { "content": [ "[anim:pulse:#ff0000:#0000ff]Welcome!", "[#ffaa00]Player: [#ffffff]{player}" ] } ``` -------------------------------- ### Deploy Expansion JAR to WiFlow Server Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions Instructions for deploying the built expansion JAR file. The JAR should be placed within the `expansions` folder of the WiFlow PlaceholderAPI plugin directory. ```plaintext Hytale/ └── mods/ └── WiFlowPlaceholderAPI/ └── expansions/ └── myexpansion-1.0.0.jar ``` -------------------------------- ### Verify Expansion Status and Placeholders Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions Commands to verify the status of loaded expansions and inspect their available placeholders within the game. ```plaintext /wpapi list /wpapi info myexpansion /wpapi parse {myexpansion_time} ``` -------------------------------- ### Build Expansion JAR using Gradle Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions Command to build the expansion JAR file using Gradle. The output JAR is typically located in the `build/libs/` directory and is essential for deployment. ```bash gradle build ``` -------------------------------- ### Marketplace Commands Overview Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/marketplace Overview of the primary commands for interacting with the WiFlow PlaceholderAPI Marketplace. ```APIDOC ## Marketplace Commands Overview This section outlines the core commands for managing expansions via the WiFlow PlaceholderAPI. ### Browse Expansions Use the following command to view available expansions: ``` /wpapi marketplace list ``` ### Download Expansions To download a specific expansion or all available expansions: ``` /wpapi marketplace download /wpapi marketplace download all ``` ### Update Expansions To update an installed expansion or all installed expansions: ``` /wpapi marketplace update /wpapi marketplace update all ``` ### Search Expansions Search for expansions by name, description, or placeholder: ``` /wpapi marketplace search ``` ### View Expansion Details Get detailed information about a specific expansion: ``` /wpapi marketplace info ``` ### View Marketplace Status Check the connection status and statistics of the marketplace: ``` /wpapi marketplace status ``` ### Refresh Marketplace Cache Force a refresh of the expansion list from the marketplace: ``` /wpapi marketplace refresh ``` ### Reload Plugins After downloading or updating expansions, reload them to activate: ``` /wpapi reload ``` ### Verify Installation Test a downloaded expansion by parsing one of its placeholders: ``` /wpapi parse {expansion_placeholder} ``` ``` -------------------------------- ### Install WiFlowsClaims Plugin Source: https://docs.wiflow.dev/hytale-plugins/wiflowsclaims/getting-started Instructions for installing the WiFlowsClaims plugin and its dependency, OrbisGuard, into your Hytale server's mods folder. ```text Hytale/ └── mods/ ├── OrbisGuard-x.x.x.jar <- Required dependency └── WiFlowsClaims-1.0.0.jar <- This plugin ``` -------------------------------- ### Create a Shop District Region (OrbisGuard) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/tutorials Explains how to set up a shop district where players can interact with chests and use objects, but building is restricted. It also covers granting build permissions to a specific group. ```plaintext /rg wand # Select shop area /rg define shops /rg flag shops build deny /rg flag shops chest-access allow # Public shop chests /rg flag shops use allow # Doors, buttons work /rg addmember shops g:shopkeepers # Shopkeepers can build ``` -------------------------------- ### Using MethodHandles for Performance Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions Illustrates how to use MethodHandles for efficient method invocation within Hytale plugins. It covers caching MethodHandles in onLoad() for repeated calls, including getting API instances and specific methods. ```java private Object api; private MethodHandle getBalance; private MethodHandle getFormattedBalance; @Override public void onLoad() { try { ClassLoader cl = getBridgeClassLoader(); if (cl == null) cl = getClass().getClassLoader(); MethodHandles.Lookup lookup = MethodHandles.lookup(); // Load API class Class apiClass = Class.forName("com.economy.EconomyAPI", true, cl); // Get instance MethodHandle getInstance = lookup.findStatic( apiClass, "getInstance", MethodType.methodType(apiClass)); api = getInstance.invoke(); // Cache method handles getBalance = lookup.findVirtual(apiClass, "getBalance", MethodType.methodType(double.class, java.util.UUID.class)); getFormattedBalance = lookup.findVirtual(apiClass, "getFormattedBalance", MethodType.methodType(String.class, java.util.UUID.class)); } catch (Throwable e) { System.err.println("[MyExpansion] Failed to load: " + e.getMessage()); api = null; } } @Override public String onPlaceholderRequest(PlaceholderContext context, String params) { if (api == null) return null; try { return switch (params) { case "balance" -> String.valueOf(getBalance.invoke(api, context.getPlayerUuid())); case "balance_formatted" -> (String) getFormattedBalance.invoke(api, context.getPlayerUuid()); default -> null; }; } catch (Throwable e) { return null; } } ``` -------------------------------- ### Set Permissions via Commands (Console/Chat) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/tutorials/permissions Demonstrates how to grant or revoke permissions for players and groups using in-game commands. Supports specific permissions and wildcard permissions. ```bash # Give permission to a player /lp user PlayerName permission set orbisguard.region.define # Give permission to a group /lp group vip permission set orbisguard.region.flag.flags.minimap-color # Give wildcard permission /lp group admin permission set orbisguard.region.* ``` -------------------------------- ### Hyfaction Faction Scoreboard Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/integrations An example configuration for WiFlow's Scoreboard utilizing Hyfaction placeholders to display faction name, member count, and level. ```json { "lines": { "content": [ "[#ffaa00]Faction: [#ffffff]{faction}", "[#aaaaaa]Members: [#ffffff]{faction_members}", "[#aaaaaa]Level: [#ffd700]{faction_level}" ] } } ``` -------------------------------- ### Create PlaceholderContext (Java) Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/api This Java code illustrates how to create a `PlaceholderContext` object, which holds player and location data for placeholder resolution. It shows methods for creating context for online players with full data, offline players with minimal data, and using a builder pattern for flexible configuration. ```java import com.wiflow.placeholderapi.context.PlaceholderContext; // Online player with full data PlaceholderContext context = PlaceholderContext.of( player, // Player object (nullable) UUID.fromString("..."), // Player UUID "Steve", // Player name "world", // World name 100, 64, 200 // X, Y, Z coordinates ); // Offline player (minimal data) PlaceholderContext offline = PlaceholderContext.offline( UUID.fromString("..."), "Steve" ); // Builder pattern PlaceholderContext context = PlaceholderContext.builder() .player(player) .playerUuid(uuid) .playerName("Steve") .worldName("world") .position(100, 64, 200) .build(); ``` -------------------------------- ### OrbisGuard Protected Area Scoreboard Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/integrations An example configuration showing conditional display based on OrbisGuard flags, specifically for PvP status within a protected region. ```json { "lines": { "content": [ "[#88ffff]Region: [#ffffff]{orbisguard_region}", "[#aaaaaa]Owners: [#ffffff]{orbisguard_region_owners}", "[#aaaaaa]Members: [#ffffff]{orbisguard_region_members}", "", { "condition": "{orbisguard_flag_pvp}", "equals": "allow", "then": "[#ff5555]PvP Enabled", "else": "[#55ff55]PvP Disabled" } ] } } ``` -------------------------------- ### LuckPerms Example Scoreboard Configuration Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/integrations An example JSON configuration for WiFlow's Scoreboard demonstrating the use of LuckPerms placeholders like prefix, suffix, group, and weight. ```json { "lines": { "content": [ "{prefix}{player}{suffix}", "", "[#aaaaaa]Rank: [#ffffff]{group}", "[#aaaaaa]All Groups: [#ffffff]{luckperms_groups}", "[#aaaaaa]Weight: [#ffffff]{luckperms_weight}" ] } } ``` -------------------------------- ### Example Flag Setting Command Source: https://docs.wiflow.dev/hytale-plugins/orbismines/flags Demonstrates how to set the 'fillmode' flag to 'true' using a command. This command is an example of how to interact with the OrbisMines plugin to modify mine configurations. ```plaintext /mine flag coal fillmode true ``` -------------------------------- ### WiFlowPlaceholderAPI Marketplace Commands Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/commands Commands for interacting with the in-game marketplace to browse, download, and manage expansions. ```APIDOC ## Marketplace Commands The marketplace allows you to browse and download expansions directly in-game. ### List Available ``` /wpapi marketplace list [page] ``` Lists all expansions available on Marketplace. Results are paginated (8 per page). **Example:** ``` /wpapi marketplace list /wpapi marketplace list 2 ``` **Output:** ``` === Marketplace Expansions (Page 1/2) === [INSTALLED] orbisguard v1.1.0 - OrbisGuard region placeholders [INSTALLED] luckperms v1.1.0 - LuckPerms prefix/suffix/group [UPDATE] economy v1.0.1 - Economy balance (installed: 1.0.0) hyfaction v1.0.0 - HyFaction placeholders killingspree v1.0.0 - Kill streaks and K/D ratio ... ``` ### Expansion Info ``` /wpapi marketplace info ``` Shows detailed information about an Marketplace expansion including all placeholders. **Example:** ``` /wpapi marketplace info orbisguard ``` **Output:** ``` === orbisguard === Name: OrbisGuard Expansion Author: wiflow Version: 1.1.0 Downloads: 1,234 Last Updated: 2026-01-15 Required Plugin: OrbisGuard Placeholders: {orbisguard_region} - Current region name {orbisguard_region_owners} - Region owner UUIDs {orbisguard_region_members} - Region member UUIDs {orbisguard_flag_} - Flag value by name ``` ### Download Expansion ``` /wpapi marketplace download /wpapi marketplace download all ``` Downloads an expansion from Marketplace. Use `all` to download all available expansions. **Example:** ``` /wpapi marketplace download orbisguard ``` **Output:** ``` Downloading orbisguard v1.1.0... Successfully installed orbisguard-1.1.0.jar Run /wpapi reload to activate the expansion. ``` After downloading, you must run `/wpapi reload` to load the new expansion. ### Update Expansion ``` /wpapi marketplace update /wpapi marketplace update all ``` Updates an installed expansion to the latest version. Use `all` to update all expansions with available updates. **Example:** ``` /wpapi marketplace update economy ``` ### Search ``` /wpapi marketplace search ``` Searches for expansions by name, description, or placeholders. **Example:** ``` /wpapi marketplace search balance ``` **Output:** ``` === Search Results for "balance" === economy v1.0.0 - Economy balance placeholders ``` ### Status ``` /wpapi marketplace status ``` Shows marketplace connection status and statistics. **Output:** ``` === Marketplace Status === Connected: Yes Available Expansions: 12 Installed: 4 Updates Available: 1 Cache Age: 2m 30s ``` ### Refresh ``` /wpapi marketplace refresh ``` Refreshes the expansion list from Marketplace. The cache automatically expires after 5 minutes, but you can force a refresh with this command. ``` -------------------------------- ### Advanced Scoreboard Content Example Source: https://docs.wiflow.dev/hytale-plugins/wiflows-scoreboard/placeholders An example showcasing advanced formatting and a wider range of built-in placeholders for a comprehensive scoreboard display. It includes player name, server info, playtime, and TPS. ```json { "content": [ "[#ffaa00]Welcome, [#ffffff]{player}!", "", "[#aaaaaa]Server: [#ffffff]{server}", "[#aaaaaa]World: [#ffffff]{world}", "[#aaaaaa]Online: [#ffffff]{online}/{max_players}", "", "[#aaaaaa]Session: [#ffffff]{playtime}", "[#aaaaaa]Total: [#ffffff]{playtime_total}", "", "[#aaaaaa]TPS: [#ffffff]{tps}" ] } ``` -------------------------------- ### Create World Spawn Protection (OrbisGuard) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/tutorials Demonstrates how to create a global wilderness protection region with a low priority, ensuring that more specific regions like spawn override it. ```plaintext # Create a global wilderness region (low priority) /rg wand # Select entire world or large area /rg define wilderness /rg setpriority wilderness 0 # Lowest priority # Now spawn region overrides wilderness /rg setpriority spawn 100 ``` -------------------------------- ### Mixin Hook Architecture Example (Java) Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/hyxin Illustrates the technical implementation of mixin hooks using Java. It shows how OrbisGuard registers hooks and how mixins retrieve and invoke them via reflection using System Properties. ```java // OrbisGuard registers hooks on startup System.getProperties().put("orbisguard.pickup.hook", new PickupHook()); // Mixin retrieves and invokes via reflection Object hook = System.getProperties().get("orbisguard.pickup.hook"); Method m = hook.getClass().getMethod("check", UUID.class, String.class, ...); Boolean allowed = (Boolean) m.invoke(hook, playerUuid, worldName, x, y, z); ``` -------------------------------- ### WiFlowPlaceholderAPI Plugin Integration (Java) Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/api This Java code snippet shows how to integrate the WiFlowPlaceholderAPI into a Hytale plugin. It includes checking for API initialization, parsing placeholders for a player, and sending formatted messages. Dependencies include the WiFlowPlaceholderAPI library. ```java import com.wiflow.placeholderapi.WiFlowPlaceholderAPI; import com.wiflow.placeholderapi.WiFlowPlaceholderAPIPlugin; import com.wiflow.placeholderapi.context.PlaceholderContext; import org.bukkit.entity.Player; public class MyPlugin extends JavaPlugin { @Override protected void setup() { super.setup(); // Check if WiFlowPlaceholderAPI is available if (!WiFlowPlaceholderAPI.isInitialized()) { getLogger().warning("WiFlowPlaceholderAPI not found!"); return; } getLogger().info("WiFlowPlaceholderAPI integration enabled!"); } /** * Parse placeholders for a player. * Use this method throughout your plugin where you need placeholder support. */ public String parsePlaceholders(Player player, String text) { if (!WiFlowPlaceholderAPI.isInitialized()) { return text; // Return original if API not available } if (!WiFlowPlaceholderAPI.containsPlaceholders(text)) { return text; // No placeholders, skip parsing } // Get plugin instance for helper methods WiFlowPlaceholderAPIPlugin papi = WiFlowPlaceholderAPIPlugin.getInstance(); // Build context with player data PlaceholderContext context = PlaceholderContext.of( player, papi.getPlayerUuid(player), papi.getPlayerName(player), papi.getPlayerWorld(player), papi.getPlayerX(player), papi.getPlayerY(player), papi.getPlayerZ(player) ); return WiFlowPlaceholderAPI.setPlaceholders(context, text); } /** * Example: Display a message with placeholders */ public void sendFormattedMessage(Player player, String template) { String parsed = parsePlaceholders(player, template); player.sendMessage(Message.of(parsed)); } } ``` -------------------------------- ### Configure Build, Break, and Place Flags Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/faq This example shows how to configure granular block modification permissions within a region. It denies all building initially, then specifically allows block breaking while still denying block placing. ```hytale-commands # Allow breaking but not placing /rg flag myregion build deny /rg flag myregion block-break allow ``` -------------------------------- ### GET /api/marketplace/expansions/orbisguard Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/marketplace Retrieves details for a specific expansion from the marketplace. ```APIDOC ## GET /api/marketplace/expansions/{id} ### Description Retrieves detailed information about a specific expansion available in the marketplace. ### Method GET ### Endpoint `/api/marketplace/expansions/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the expansion to retrieve. ### Request Example ``` GET /api/marketplace/expansions/orbisguard ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the expansion. - **name** (string) - The display name of the expansion. - **author** (string) - The author or creator of the expansion. - **version** (string) - The version number of the expansion. - **description** (string) - A brief description of what the expansion does. - **placeholders** (array) - A list of placeholders provided by the expansion. - **name** (string) - The name of the placeholder. - **description** (string) - A description of the placeholder's function. - **requiredPlugin** (string) - The name of the plugin required for this expansion to function. - **file** (string) - The filename of the expansion JAR. - **size** (integer) - The size of the expansion file in bytes. - **downloads** (integer) - The number of times the expansion has been downloaded. - **lastUpdated** (string) - The timestamp when the expansion was last updated (ISO 8601 format). #### Response Example ```json { "id": "orbisguard", "name": "OrbisGuard Expansion", "author": "wiflow", "version": "1.1.0", "description": "Region protection placeholders", "placeholders": [ { "name": "region", "description": "Current region name" }, { "name": "region_owners", "description": "Region owner UUIDs" }, { "name": "region_members", "description": "Region member UUIDs" }, { "name": "flag_", "description": "Flag value by name" } ], "requiredPlugin": "OrbisGuard", "file": "orbisguard-1.1.0.jar", "size": 12800, "downloads": 1234, "lastUpdated": "2026-01-15T00:00:00Z" } ``` ``` -------------------------------- ### Create Integrated Placeholder Expansion (Java) Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions This Java code defines a PlaceholderAPI expansion that integrates with another plugin. It uses `MethodHandle` and `MethodHandles.Lookup` to dynamically access methods from the target plugin's API, allowing it to retrieve and display data from that plugin. It requires the target plugin to be present. ```java package com.example; import com.wiflow.placeholderapi.context.PlaceholderContext; import com.wiflow.placeholderapi.expansion.PlaceholderExpansion; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; public class OtherPluginExpansion extends PlaceholderExpansion { private Object pluginApi; private MethodHandle getDataMethod; @Override public String getIdentifier() { return "otherplugin"; } @Override public String getAuthor() { return "yourname"; } @Override public String getVersion() { return "1.0.0"; } @Override public String getRequiredPlugin() { // Return the ACTUAL class name from the target plugin return "com.otherplugin.api.OtherPluginAPI"; } @Override public void onLoad() { try { // CRITICAL: Use getBridgeClassLoader() for cross-plugin access ClassLoader cl = getBridgeClassLoader(); if (cl == null) cl = getClass().getClassLoader(); MethodHandles.Lookup lookup = MethodHandles.lookup(); // Load the API class Class apiClass = Class.forName( "com.otherplugin.api.OtherPluginAPI", true, cl); // Get singleton instance MethodHandle getInstance = lookup.findStatic( apiClass, "getInstance", MethodType.methodType(apiClass)); pluginApi = getInstance.invoke(); // Cache method handles for placeholder data getDataMethod = lookup.findVirtual( apiClass, "getPlayerData", MethodType.methodType(String.class, java.util.UUID.class)); System.out.println("[OtherPluginExpansion] Loaded!"); } catch (Throwable e) { System.err.println("[OtherPluginExpansion] Failed: " + e.getMessage()); pluginApi = null; } } @Override public String onPlaceholderRequest(PlaceholderContext context, String params) { if (pluginApi == null || context.getPlayerUuid() == null) { return null; } try { return switch (params.toLowerCase()) { case "data" -> (String) getDataMethod.invoke( pluginApi, context.getPlayerUuid()); default -> null; }; } catch (Throwable e) { return null; } } } ``` -------------------------------- ### Region JSON Schema Example Source: https://docs.wiflow.dev/hytale-plugins/orbisguard/architecture Provides an example of the JSON structure used to define region properties, including ID, world, type, priority, coordinates, owners, members, and flags. This schema is fundamental for region data persistence. ```json { "id": "spawn", "world": "world", "type": "CUBOID", "priority": 100, "min": {"x": 0, "y": 0, "z": 0}, "max": {"x": 100, "y": 256, "z": 100}, "owners": ["uuid-1"], "ownerGroups": ["g:admin"], "members": ["uuid-2"], "memberGroups": ["g:vip"], "parent": null, "flags": { "build": "DENY", "greet-title": "Welcome!" } } ``` -------------------------------- ### Gradle Build Configuration for WiFlow Placeholder Expansion (Java) Source: https://docs.wiflow.dev/hytale-plugins/wiflow-placeholderapi/creating-expansions Configures a Gradle project to build a WiFlowPlaceholderAPI expansion. It specifies Java version, repositories, and includes necessary dependencies like the WiFlowPlaceholderAPI JAR and Hytale Server JAR for compilation. ```gradle plugins { id 'java-library' } group = 'com.example' version = '1.0.0' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } repositories { mavenCentral() } dependencies { // WiFlowPlaceholderAPI (required) compileOnly files('libs/WiFlowPlaceholderAPI-1.0.0.jar') // Hytale Server (for Player class, etc.) compileOnly files(System.getProperty("user.home") + "/AppData/Roaming/Hytale/install/release/package/game/latest/Server/HytaleServer.jar") } jar { archiveBaseName = 'myexpansion' archiveVersion = project.version } ```