### Create Hologram with Lines Example Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Example showing how to initialize a hologram with specific text lines. ```java List lines = Arrays.asList("Welcome", "To our Server", "&6Gold Text"); DHAPI.createHologram("welcome", loc, lines); ``` -------------------------------- ### Create Hologram Example Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Basic usage example for creating a hologram at a specific Bukkit location. ```java Location loc = new Location(Bukkit.getWorld("world"), 100, 64, 200); Hologram holo = DHAPI.createHologram("myholo", loc); ``` -------------------------------- ### Use LocationUtils Example Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Examples of parsing location strings with and without rotation values. ```java Location loc = LocationUtils.asLocationE("world:100:64:200"); Location locWithRotation = LocationUtils.asLocationE("world:100:64:200:45:0"); ``` -------------------------------- ### Get Plugin Instance Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve the main plugin instance. ```java public DecentHolograms getPlugin() ``` -------------------------------- ### Custom Platform Integration Example Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Demonstrates how to access the platform adapter and verify server capabilities or platform types. ```java public class MyCustomPlatformIntegration { public static void setup() { PlatformAdapter adapter = DecentHologramsAPI.get() .getPlatformAdapter(); // Check server type if (PlatformCapabilities.getServerPlatformType() == ServerPlatformType.PAPER) { System.out.println("Running on Paper!"); } // Check feature availability boolean hasTextDisplay = PlatformCapabilities .supportsFeature(MinecraftFeature.TEXT_DISPLAY); if (hasTextDisplay) { System.out.println("Text displays supported!"); } } } ``` -------------------------------- ### Configure Simple Welcome Hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md A basic hologram setup with a single page and a click action. ```yaml location: "world:100:64:200" enabled: true display-range: 50 update-interval: 20 pages: - lines: - content: "&c&lWelcome!" height: 0.5 - content: "&6To our server" height: 0.5 actions: LEFT_CLICK: - "MESSAGE:Thanks for clicking!" ``` -------------------------------- ### Implement Custom PlaceholderProvider Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Example implementation of a custom placeholder provider that parses specific strings. ```java public class CustomPlaceholder implements PlaceholderProvider { @Override public String getName() { return "myplugin"; } @Override public String parseString(String string, PlatformPlayer player) { if (string.equals("%myplugin_custom%")) { return "Custom Value"; } return string; } } ``` -------------------------------- ### Platform Integration Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Examples of checking server platform types and feature support using the API. ```APIDOC ## Platform Integration ### Description Use `DecentHologramsAPI` to access the `PlatformAdapter` and `PlatformCapabilities` to query server environment details and feature support. ### Example ```java PlatformAdapter adapter = DecentHologramsAPI.get().getPlatformAdapter(); // Check server type if (PlatformCapabilities.getServerPlatformType() == ServerPlatformType.PAPER) { System.out.println("Running on Paper!"); } // Check feature availability boolean hasTextDisplay = PlatformCapabilities.supportsFeature(MinecraftFeature.TEXT_DISPLAY); ``` ``` -------------------------------- ### Async Hologram Creation Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Example of running hologram loading tasks off the main server thread. ```java Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> { // Load holograms from file // (runs off-main-thread) }); ``` -------------------------------- ### Logging Methods Usage Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/errors.md Examples of using the Log utility for info, warning, and error messages. ```java Log.info("Hologram created") ``` ```java Log.warn("Failed to load: %s", e, reason) ``` ```java Log.error("Critical error", e) ``` -------------------------------- ### Define Hologram Configuration in YAML Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/README.md Example of a hologram configuration file defining location, display range, pages, and click actions. ```yaml location: "world:100:64:200" enabled: true display-range: 48 update-interval: 20 pages: - lines: - content: "&c&lWelcome!" height: 0.5 - content: "#ICON:DIAMOND_SWORD" height: 0.8 actions: LEFT_CLICK: - "MESSAGE:Thanks for clicking!" RIGHT_CLICK: - "TELEPORT:0,64,0,world" ``` -------------------------------- ### Create and Add HologramItem to Line Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Example of converting an ItemStack and adding it as a line to a hologram. ```java ItemStack sword = new ItemStack(Material.DIAMOND_SWORD); HologramItem item = HologramItem.fromItemStack(sword); String content = "#ICON:" + item.getContent(); DHAPI.addHologramLine(holo, content); ``` -------------------------------- ### Animation Syntax Examples Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Common animation patterns used within text content. ```text Hello ``` ```text Scroll ``` ```text Wave ``` ```text Burn ``` ```text Colors ``` ```text Rainbow ``` ```text ``` -------------------------------- ### Get all hologram pages Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Retrieves a list containing all pages in their current order. ```java public List getPages() ``` -------------------------------- ### Implement HologramClickEvent Listener Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Example of a Bukkit listener class to handle hologram click events and inspect click details. ```java import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import eu.decentsoftware.holograms.event.HologramClickEvent; public class MyListener implements Listener { @EventHandler public void onHologramClick(HologramClickEvent event) { Player player = event.getPlayer(); HologramPage page = event.getPage(); ClickType clickType = event.getClickType(); player.sendMessage("You clicked a hologram!"); // Check if it's a left click if (clickType == ClickType.LEFT_CLICK) { player.sendMessage("Left click registered"); } } } ``` -------------------------------- ### Get CommandManager Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve the command manager instance. ```java public CommandManager getCommandManager() ``` -------------------------------- ### Exception Handling with Log Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/errors.md Example of catching an IllegalArgumentException and logging the failure using the Log utility. ```java try { Hologram holo = DHAPI.createHologram("test", loc); } catch (IllegalArgumentException e) { Log.warn("Failed to create hologram: %s", e, e.getMessage()); } ``` -------------------------------- ### Get HologramManager Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve the hologram manager instance. ```java public HologramManager getHologramManager() ``` -------------------------------- ### Retrieve Feature Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Get a registered feature instance by its name. ```java public AbstractFeature getFeature(String name) ``` -------------------------------- ### getPlayerText(Player player) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Gets the text for a specific player with placeholders applied. ```APIDOC ## getPlayerText(Player player) ### Description Gets the text for a specific player (applies placeholders). ### Signature `public String getPlayerText(Player player)` ### Returns - **String** - Text with PlaceholderAPI placeholders applied ``` -------------------------------- ### Get Command Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve a registered command by name, returning null if not found. ```java public CommandBase getCommand(String name) ``` -------------------------------- ### Register Custom Animation Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Example of registering a custom animation implementation using the AnimationManager. ```java AnimationManager manager = DecentHologramsAPI.get().getAnimationManager(); manager.registerAnimation(new CustomAnimation()); ``` -------------------------------- ### Get Page Size Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Returns the total count of lines currently present on the page. ```java public int size() ``` -------------------------------- ### Create and Configure Hologram Lines in Java Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Demonstrates initializing a hologram, adding various line types (text, animated, item), and attaching click actions to a page. ```java Hologram holo = DHAPI.createHologram("example", loc); HologramPage page = holo.getPage(0); // Add text line HologramLine textLine = new HologramLine(page, location, "&c&lWelcome!"); textLine.setHeight(0.5); page.addLine(textLine); // Add animated line HologramLine animLine = new HologramLine(page, location.clone().add(0, -0.6, 0), "Animated Rainbow"); page.addLine(animLine); // Add item HologramLine itemLine = new HologramLine(page, location.clone().add(0, -1.2, 0), "#ICON:DIAMOND_SWORD"); page.addLine(itemLine); // Add actions page.addAction(ClickType.LEFT_CLICK, new Action("MESSAGE:You clicked!")); holo.showAll(); holo.save(); ``` -------------------------------- ### getViewerPlayers() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Gets all players currently viewing this line. ```APIDOC ### getViewerPlayers() Returns a Set of players currently viewing this line. ``` -------------------------------- ### Get Server Platform Type Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Retrieves the current server platform type, such as BUKKIT, SPIGOT, or PAPER. ```java public static ServerPlatformType getServerPlatformType() ``` -------------------------------- ### getViewerPlayers() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Gets all players currently viewing the page. ```APIDOC ## getViewerPlayers() ### Description Gets all players viewing this page. ### Signature `public Player[] getViewerPlayers()` ### Returns - **Player[]**: Array of viewing players ``` -------------------------------- ### Get Default Visibility State Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Retrieves the default visibility state applied to new viewers. ```java public boolean getDefaultVisibleState() ``` -------------------------------- ### Create and Configure Hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Demonstrates the standard workflow for creating a new hologram, adding content, assigning click actions, and persisting the changes. ```java // 1. Create hologram Hologram holo = DHAPI.createHologram("shop", location, true); // 2. Get first page HologramPage page = holo.getPage(0); // 3. Add content DHAPI.addHologramLine(holo, "&b&lShop"); DHAPI.addHologramLine(holo, "&6Click to open!"); // 4. Add actions page.addAction(ClickType.LEFT_CLICK, new Action("MESSAGE:Opening shop...")); // 5. Save holo.save(); ``` -------------------------------- ### Get AnimationManager Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve the animation manager instance. ```java public AnimationManager getAnimationManager() ``` -------------------------------- ### Initialize Hologram with configuration and state Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a hologram instance with a specific configuration and an initial enabled or disabled state. ```java public Hologram(String name, Location location, FileConfig config, boolean enabled) ``` -------------------------------- ### Get Scheduler Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve the async scheduler for background tasks. ```java public PlatformScheduler getScheduler() ``` -------------------------------- ### Build DecentHolograms with Gradle Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/README.md Use this command to build the DecentHolograms plugin. The resulting JAR file will be located in the ./plugin/build/libs/ directory. ```bash gradle clean shadowJar ``` -------------------------------- ### show() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Methods to show the hologram line to players. ```APIDOC ### show(Player player) Shows the line to all, a specific, or multiple players. #### Methods - **show()** - Shows to all online players. - **show(Player player)** - Shows to a specific player. - **show(Player... players)** - Shows to multiple players. ``` -------------------------------- ### Handle IllegalArgumentException Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/errors.md Example of catching an IllegalArgumentException when providing invalid arguments to the DHAPI. ```java try { Hologram holo = DHAPI.createHologram("my-holo", loc); } catch (IllegalArgumentException e) { System.out.println("Failed to create hologram: " + e.getMessage()); } ``` -------------------------------- ### Initialize FileConfig Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Constructor for creating a new FileConfig instance with a plugin and file path. ```java public FileConfig(Plugin plugin, String path) ``` -------------------------------- ### Get Hologram Line Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Retrieves a specific line from a hologram page by index. ```java @Nullable public static HologramLine getHologramLine(HologramPage page, int index) throws IllegalArgumentException ``` -------------------------------- ### Handle Hologram Click Events Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Demonstrates how to listen for HologramClickEvent using the Bukkit event system. ```java @EventHandler public void onHologramClick(HologramClickEvent event) { Player player = event.getPlayer(); HologramPage page = event.getPage(); ClickType clickType = event.getClickType(); } ``` -------------------------------- ### Get Hologram ID Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Retrieves the unique identifier for the hologram, which corresponds to its name. ```java public String getId() ``` -------------------------------- ### Get Hologram Viewers Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Retrieves a set of all players currently viewing the hologram. ```java public Set getViewers() ``` -------------------------------- ### Retrieve HologramItem Content Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Method to get the serialized content string for an item. ```java public String getContent() ``` -------------------------------- ### Create Interactive Hologram with Actions Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Demonstrates creating a hologram, adding animated lines, and assigning various click actions to specific interaction types. ```java // Create hologram with text and actions Hologram holo = DHAPI.createHologram("interactive", location); HologramPage page = holo.getPage(0); // Add animated welcome line DHAPI.addHologramLine(page, "Welcome to Server!"); // Add clickable title HologramLine titleLine = new HologramLine(page, location.clone().add(0, -0.6, 0), "Click me!"); page.addLine(titleLine); // Add left-click action (send message) page.addAction(ClickType.LEFT_CLICK, new Action("MESSAGE:You clicked the hologram!")); // Add right-click action (teleport) page.addAction(ClickType.RIGHT_CLICK, new Action("TELEPORT:0,64,0,world")); // Add shift-click action (run command) page.addAction(ClickType.SHIFT_LEFT_CLICK, new Action("CONSOLE_COMMAND:/give %player_name% diamond")); holo.showAll(); holo.save(); ``` -------------------------------- ### Initialize and add a HologramLine Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Create a new line instance with specific content and register it to a parent page. ```java public HologramLine(HologramPage parent, Location location, String content) ``` ```java HologramLine line = new HologramLine(page, location, "&c&lError!"); page.addLine(line); ``` -------------------------------- ### Get Viewing Players Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Retrieves an array of all players currently viewing the page. ```java public Player[] getViewerPlayers() ``` -------------------------------- ### Integrate PlaceholderAPI Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Uses placeholders in hologram lines and sets per-player text overrides. ```java // PlayerName will be replaced with actual player name DHAPI.addHologramLine(holo, "Hello, %player_name%!"); // Will show player's health DHAPI.addHologramLine(holo, "Health: %player_health%"); // Per-player text override (if needed) HologramLine line = holo.getPage(0).getLine(0); line.setPlayerText(player, "Custom text for " + player.getName()); ``` -------------------------------- ### DecentHologramsAPI.getPlugin Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Returns the main plugin instance. ```APIDOC ## getPlugin() ### Description Returns the plugin instance. ### Response - **DecentHolograms** - Plugin instance (extends JavaPlugin) ``` -------------------------------- ### Create a Simple Hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/INDEX.md Initializes a new hologram at a specific location with a list of text lines. ```java Location loc = new Location(world, 100, 64, 200); DHAPI.createHologram("welcome", loc, true, Arrays.asList("&c&lWelcome!", "&6Click me")); ``` -------------------------------- ### Handle LocationParseException Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/errors.md Example of catching a LocationParseException when attempting to parse an invalid location string. ```java try { Location loc = LocationUtils.asLocationE("invalid"); } catch (LocationParseException e) { e.printStackTrace(); } ``` -------------------------------- ### Initialize Hologram with explicit configuration Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a hologram instance using a specific FileConfig object for persistence. ```java public Hologram(String name, Location location, FileConfig config) ``` -------------------------------- ### Get Viewing Players Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Retrieves the set of players currently viewing the hologram line. ```java public Set getViewerPlayers() ``` -------------------------------- ### fromFile(String filePath) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Loads and deserializes a hologram configuration from a specified file path. ```APIDOC ## fromFile(String filePath) ### Description Loads a hologram from file (called by plugin on startup). ### Signature `public static Hologram fromFile(String filePath) throws LocationParseException, IllegalArgumentException` ### Parameters - **filePath** (String) - Required - Relative path like "hologram_example.yml" ### Returns - **Hologram** - Deserialized hologram ### Throws - **LocationParseException** - If location string is invalid - **IllegalArgumentException** - If name is empty or duplicate ``` -------------------------------- ### Get all cached holograms Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Returns a collection containing all currently cached Hologram objects. ```java public static Collection getCachedHolograms() ``` -------------------------------- ### Basic Hologram Operations Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/README.md Demonstrates creating, updating, adding interactivity, and saving holograms using the DHAPI. ```java // Create hologram DHAPI.createHologram("my_holo", location, true, Arrays.asList( "&c&lWelcome!", "&6Click me" )); // Get and update Hologram holo = DHAPI.getHologram("my_holo"); DHAPI.setHologramLine(holo, 0, "&eUpdated!"); // Add interactivity HologramPage page = holo.getPage(0); page.addAction(ClickType.LEFT_CLICK, new Action("MESSAGE:Hello!")); // Save to file holo.save(); ``` -------------------------------- ### Get Page Center Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Calculates the visual center of the page, respecting the downOrigin configuration. ```java public Location getCenter() ``` -------------------------------- ### Dependency Configuration Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/README.md Add the JitPack repository and DecentHolograms dependency to your project build file. ```xml jitpack.io https://jitpack.io com.github.decentsoftware-eu decentholograms RELEASE provided ``` ```gradle repositories { maven { url 'https://jitpack.io' } } dependencies { compileOnly 'com.github.decentsoftware-eu:decentholograms:RELEASE' } ``` -------------------------------- ### Get Page Height Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Returns the sum of all line heights within the hologram page. ```java public double getHeight() ``` -------------------------------- ### Create and Show Hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/README.md Initialize a new hologram at a specific location and make it visible to all players. ```java Hologram h = DHAPI.createHologram("test", loc, true); h.showAll(); ``` -------------------------------- ### Configure Gradle Dependencies Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Add the JitPack repository and DecentHolograms dependency to your build.gradle file. ```gradle repositories { maven { url 'https://jitpack.io' } } dependencies { compileOnly 'com.github.decentsoftware-eu:decentholograms:RELEASE' } ``` -------------------------------- ### Hologram(String name, Location location, FileConfig config, boolean enabled) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a hologram instance with an explicit configuration file and initial enabled state. ```APIDOC ## Hologram(String name, Location location, FileConfig config, boolean enabled) ### Description Creates a hologram instance, optionally disabled. ### Parameters - **name** (String) - Required - Hologram name - **location** (Location) - Required - Bukkit Location - **config** (FileConfig) - Required - Config for persistence - **enabled** (boolean) - Required - Enable hologram on creation ``` -------------------------------- ### Access DecentHologramsAPI Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieve the main API entry point. ```java DecentHolograms api = DecentHologramsAPI.get(); ``` -------------------------------- ### Create Multi-Page Holograms Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Initializes a hologram with multiple pages and displays a specific page to a player. ```java Hologram holo = DHAPI.createHologram("pages", location, true, Arrays.asList("&b&lPage 1", "&aFirst page")); // Add second page HologramPage page2 = DHAPI.addHologramPage(holo, Arrays.asList("&b&lPage 2", "&aSecond page")); // Show first page (page index stored per player) holo.getPage(0).show(player); ``` -------------------------------- ### Initialize Hologram with default persistence Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a new hologram instance that is saved to a file by default. ```java public Hologram(String name, Location location) ``` -------------------------------- ### Get Hologram Line Offsets Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Retrieves the current X, Y, or Z offset values for the line. ```java public double getOffsetX() public double getOffsetY() public double getOffsetZ() ``` -------------------------------- ### Platform Adapter Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Methods for retrieving the adapter name and the Minecraft version. ```java String getName() ``` ```java String getVersion() ``` -------------------------------- ### Hologram Lifecycle Workflow Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/INDEX.md A visual representation of the standard lifecycle for creating, configuring, and managing holograms. ```text Create ↓ DHAPI.createHologram(name, location, saveToFile, lines) ↓ Populate ↓ DHAPI.addHologramLine() / insertHologramLine() ↓ Configure ↓ Add actions, flags, animations ↓ Display ↓ hologram.showAll() or hologram.show(player) ↓ Update ↓ DHAPI.setHologramLine() → hologram.updateAll() ↓ Persist ↓ hologram.save() ↓ Clean Up ↓ DHAPI.removeHologram(name) ``` -------------------------------- ### PlaceholderProvider Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Required methods for implementing a custom placeholder provider. ```java String getName() String getVersion() String parseString(String string, PlatformPlayer player) ``` -------------------------------- ### Get ActionType by Name Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Retrieves an ActionType instance by its string name, returning null if no match is found. ```java public static ActionType getByName(String name) ``` -------------------------------- ### Get Line Type Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Returns the immutable type of the hologram line, such as TEXT, ITEM, ENTITY, or HEAD. ```java public HologramLineType getType() ``` -------------------------------- ### Initialize Hologram with optional persistence Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a hologram instance with the ability to toggle file persistence via the saveToFile parameter. ```java public Hologram(String name, Location location, boolean saveToFile) ``` -------------------------------- ### Configure Maven Dependencies Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Add the JitPack repository and DecentHolograms dependency to your pom.xml file. ```xml jitpack.io https://jitpack.io com.github.decentsoftware-eu decentholograms RELEASE provided ``` -------------------------------- ### Get all cached hologram names Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Returns an immutable set containing the names of all currently cached holograms. ```java public static Set getCachedHologramNames() ``` -------------------------------- ### Hologram(String name, Location location, FileConfig config) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a hologram instance using an explicit configuration file. ```APIDOC ## Hologram(String name, Location location, FileConfig config) ### Description Creates a hologram instance with an explicit config file. ### Parameters - **name** (String) - Required - Hologram name - **location** (Location) - Required - Bukkit Location - **config** (FileConfig) - Required - Config for persistence ``` -------------------------------- ### fromFile(ConfigurationSection config, HologramPage parent, Location location) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Deserializes a hologram line from a YAML configuration section. ```APIDOC ## fromFile(ConfigurationSection config, HologramPage parent, Location location) ### Description Deserializes a line from YAML configuration. ### Parameters - **config** (ConfigurationSection) - Required - YAML section for line - **parent** (HologramPage) - Required - Parent page - **location** (Location) - Required - Line location ### Returns - **HologramLine** - Deserialized line with all settings ``` -------------------------------- ### Get Rendered Text Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Retrieves the final text string for the current tick, including applied animations and placeholders. ```java public String getText() ``` -------------------------------- ### Configure Multi-Page Hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Create interactive holograms that switch pages based on player input. ```yaml location: "world:0:64:0" enabled: true pages: - lines: - content: "&b&lPage 1" height: 0.5 - content: "&aUse commands to change" height: 0.5 actions: RIGHT_CLICK: - "PLAYER_COMMAND:/hologram page 2" - lines: - content: "&b&lPage 2" height: 0.5 - content: "&aThis is the second page" height: 0.5 actions: LEFT_CLICK: - "PLAYER_COMMAND:/hologram page 1" ``` -------------------------------- ### show(Player player) / show(Player... players) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Shows the page to one or more players. ```APIDOC ## show(Player player) / show(Player... players) ### Description Shows the page to a player or multiple players. ### Signatures `public void show(Player player)` `public void show(Player... players)` ``` -------------------------------- ### Apply Color and Formatting Codes Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Text supports standard Minecraft color and formatting codes prefixed with &. ```text &0 ``` ```text &1 ``` ```text &2 ``` ```text &3 ``` ```text &4 ``` ```text &5 ``` ```text &6 ``` ```text &7 ``` ```text &8 ``` ```text &9 ``` ```text &a ``` ```text &b ``` ```text &c ``` ```text &d ``` ```text &e ``` ```text &f ``` ```text &l ``` ```text &o ``` ```text &n ``` ```text &m ``` ```text &k ``` ```text &r ``` -------------------------------- ### Create Hologram with Lines Signature Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Method signature for creating a hologram initialized with a list of text lines. ```java public static Hologram createHologram(String name, Location location, List lines) throws IllegalArgumentException ``` -------------------------------- ### showAll() / hideAll() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Shows or hides the page for all online players. ```APIDOC ## showAll() / hideAll() ### Description Shows or hides the page from all online players. ### Signatures `public void showAll()` `public void hideAll()` ``` -------------------------------- ### createHologram(String name, Location location, List lines) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Creates a hologram with initial text lines. ```APIDOC ## createHologram(String name, Location location, List lines) ### Description Creates a hologram with initial text lines. ### Method public static Hologram createHologram(String name, Location location, List lines) ### Parameters - **name** (String) - Required - Hologram name - **location** (Location) - Required - Bukkit Location - **lines** (List) - Required - Initial hologram lines (text content) ### Example ```java List lines = Arrays.asList("Welcome", "To our Server", "&6Gold Text"); DHAPI.createHologram("welcome", loc, lines); ``` ``` -------------------------------- ### Hologram(String name, Location location, boolean saveToFile) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Creates a hologram instance with optional file persistence. ```APIDOC ## Hologram(String name, Location location, boolean saveToFile) ### Description Creates a hologram instance with optional file persistence. ### Parameters - **name** (String) - Required - Hologram name - **location** (Location) - Required - Bukkit Location - **saveToFile** (boolean) - Required - Persist to YAML if true ``` -------------------------------- ### Define Settings Class Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Represents the global plugin settings and defaults class. ```java public class Settings ``` -------------------------------- ### Create Hologram with Persistence and Lines Signature Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Method signature for creating a hologram with both file persistence control and initial lines. ```java public static Hologram createHologram(String name, Location location, boolean saveToFile, List lines) throws IllegalArgumentException ``` -------------------------------- ### createHologram(String name, Location location, boolean saveToFile, List lines) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Creates a hologram with initial lines and file persistence control. ```APIDOC ## createHologram(String name, Location location, boolean saveToFile, List lines) ### Description Creates a hologram with initial lines and file persistence control. ### Method public static Hologram createHologram(String name, Location location, boolean saveToFile, List lines) ### Parameters - **name** (String) - Required - Hologram name - **location** (Location) - Required - Bukkit Location - **saveToFile** (boolean) - Required - Persist to file if true - **lines** (List) - Required - List of initial line content ``` -------------------------------- ### Handle Player Null Cases Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/errors.md Confirm that both the player and the target hologram exist before attempting to show the hologram to the player. ```java public void showHologramToPlayer(String playerName, String hologramName) { Player player = Bukkit.getPlayer(playerName); if (player == null) { System.out.println("Player '" + playerName + "' not found"); return; } Hologram holo = DHAPI.getHologram(hologramName); if (holo == null) { System.out.println("Hologram '" + hologramName + "' not found"); return; } holo.show(player); } ``` -------------------------------- ### Access FileConfig Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Common methods for retrieving configuration values from a YAML file. ```java public String getString(String path) public String getString(String path, String defaultValue) public int getInt(String path) public int getInt(String path, int defaultValue) public double getDouble(String path) public boolean getBoolean(String path) public List getStringList(String path) public List getMapList(String path) public ConfigurationSection getConfigurationSection(String path) ``` -------------------------------- ### Manage Hologram Visibility by Permission Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Shows a hologram to specific players based on their permissions upon joining the server. ```java Hologram holo = DHAPI.getHologram("admin"); @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); if (player.hasPermission("myplugin.admin")) { holo.show(player); } } ``` -------------------------------- ### Construct HologramPage Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Initializes a new page instance, typically invoked via the parent hologram's addPage method. ```java public HologramPage(Hologram parent, int index) ``` -------------------------------- ### Action Class Constructors Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Constructors for creating new Action instances. ```java public Action(String string) throws IllegalArgumentException public Action(ActionType type, String data) ``` ```java new Action("MESSAGE:Hello World!") new Action("TELEPORT:100,64,200,world") new Action("COMMAND:/give %player_name% diamond") ``` -------------------------------- ### Gradle Repository for DecentHolograms API Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/README.md Configure your Gradle project to use the JitPack repository for accessing the DecentHolograms API. Remember to substitute VERSION with the actual version. ```groovy repositories { maven { url 'https://jitpack.io' } } ``` -------------------------------- ### Define Hologram Location Format Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/INDEX.md Use these formats to specify hologram coordinates in configuration files. ```text world:x:y:z world:x:y:z:yaw:pitch ``` -------------------------------- ### PlatformMaterialService Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Available methods for retrieving and checking material properties. ```java Material getMaterial(String name) boolean isAir(Material material) boolean isBlock(Material material) boolean isItem(Material material) ``` -------------------------------- ### updateAll() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Updates the hologram line for all viewers. ```APIDOC ## updateAll() ### Description Updates the line for all viewers. ### Signature `public void updateAll()` ``` -------------------------------- ### Create and Display a Hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Use DHAPI to instantiate a new hologram at a specific location with initial lines. ```java import eu.decentsoftware.holograms.api.DHAPI; import org.bukkit.Location; import org.bukkit.plugin.java.JavaPlugin; public class MyPlugin extends JavaPlugin { @Override public void onEnable() { Location loc = new Location(getServer().getWorld("world"), 100, 64, 200); DHAPI.createHologram("hello", loc, true, Arrays.asList("&c&lWelcome!", "&6To our server")); } } ``` -------------------------------- ### Manage Player Text Formatting Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Methods to retrieve or override text content for specific players, supporting PlaceholderAPI. ```java public String getPlayerText(Player player) ``` ```java public void setPlayerText(Player player, String text) ``` -------------------------------- ### Apply Pattern method Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Method signature for applying a pattern to a string at a specific animation step. ```java String apply(String text, int step) ``` -------------------------------- ### Define Hologram Locations Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Use these strings to specify the world and coordinates for hologram placement. ```text world:100:64:200 world:100.5:64:200.5:45:0 nether:0:120:0:180:30 ``` -------------------------------- ### HologramManager Core Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Method signatures for managing hologram collections, retrieval, creation, deletion, and reloading. ```java public Collection getHolograms() ``` ```java public Hologram getHologram(String name) ``` ```java public Hologram create(String name, Location location) ``` ```java public void delete(String name) ``` ```java public void reload() ``` -------------------------------- ### Add Multi-Page Support Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/README.md Extend an existing hologram by adding a new page with a list of lines. ```java HologramPage p2 = DHAPI.addHologramPage(holo, Arrays.asList("Page 2")); ``` -------------------------------- ### Configure Animated Hologram with Items Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Incorporate special effects like rainbows, typewriters, and item icons into hologram lines. ```yaml location: "world:100:64:200" enabled: true facing: 45.0 pages: - lines: - content: "Rainbow Title" height: 0.5 - content: "#ICON:DIAMOND_SWORD" height: 0.8 - content: "Typewriter Effect" height: 0.5 actions: LEFT_CLICK: - "MESSAGE:Beautiful hologram!" RIGHT_CLICK: - "TELEPORT:50,64,50,world" ``` -------------------------------- ### Show Page to Players Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Displays the hologram page to one or more players. ```java public void show(Player player) ``` ```java public void show(Player... players) ``` -------------------------------- ### Migrate Legacy Hologram Format Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md The plugin automatically converts the old flat line array format to the modern page-based structure. ```yaml location: "world:100:64:200" lines: 1: content: "Line 1" 2: content: "Line 2" ``` ```yaml location: "world:100:64:200" pages: - lines: - content: "Line 1" - content: "Line 2" actions: {} ``` -------------------------------- ### Configure Hologram Permissions Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/INDEX.md Sets a required permission node for players to view the hologram. ```java holo.setPermission("myplugin.see"); ``` -------------------------------- ### SolidPattern Implementation Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Applies a single solid color to text. ```java new SolidPattern("&c") ``` -------------------------------- ### DecentPosition Constructors Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Constructors for creating a DecentPosition from coordinates or a Bukkit Location. ```java public DecentPosition(double x, double y, double z, float yaw, float pitch, String world) public DecentPosition(Location location) ``` -------------------------------- ### Handle Hologram Click Events Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/README.md Implement an event listener to respond to player interactions with holograms. ```java @EventHandler public void onHologramClick(HologramClickEvent e) { e.getPlayer().sendMessage("Clicked!"); } ``` -------------------------------- ### Action Execution and Serialization Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Methods for executing an action and converting it to a string format. ```java public boolean execute(Player player) ``` ```java public String toString() ``` -------------------------------- ### updateAll() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-page.md Updates the hologram page for all viewers. ```APIDOC ## updateAll() ### Description Updates the page for all viewers. ### Signature `public void updateAll()` ``` -------------------------------- ### Define hologram click actions Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Structure for mapping click types to a list of action strings. ```yaml actions: LEFT_CLICK: - "ACTION_TYPE:data" - "ACTION_TYPE:data" RIGHT_CLICK: - "ACTION_TYPE:data" SHIFT_LEFT_CLICK: - "ACTION_TYPE:data" ``` -------------------------------- ### Manage Multi-Page Holograms Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/INDEX.md Adds a new page to an existing hologram instance. ```java HologramPage page2 = DHAPI.addHologramPage(holo, Arrays.asList("&b&lPage 2", "&aContent")); ``` -------------------------------- ### enable() Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-class.md Enables the hologram if it is currently disabled. ```APIDOC ## enable() ### Description Enables the hologram if disabled. ### Signature `public void enable()` ``` -------------------------------- ### HologramManager.create(String name, Location loc) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Creates a new hologram at the specified location. ```APIDOC ## create(String name, Location loc) ### Description Creates a new hologram instance. ### Example ```java Hologram holo = manager.create("my_hologram", loc); ``` ``` -------------------------------- ### Create Hologram Method Signature Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Standard method signature for creating a new hologram without saving to file. ```java public static Hologram createHologram(String name, Location location) throws IllegalArgumentException ``` -------------------------------- ### Retrieve MinecraftVersion Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Accessing the current server version and its components via the platform adapter. ```java MinecraftVersion version = DecentHologramsAPI.get() .getPlatformAdapter() .getMinecraftVersion(); int major = version.getMajor(); // e.g., 1 int minor = version.getMinor(); // e.g., 20 int patch = version.getPatch(); // e.g., 1 ``` -------------------------------- ### Register Command Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Register a custom command implementation. ```java public void registerCommand(CommandBase command) ``` -------------------------------- ### Create Hologram with Persistence Signature Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Method signature for creating a hologram with an option to persist it to a YAML file. ```java public static Hologram createHologram(String name, Location location, boolean saveToFile) throws IllegalArgumentException ``` -------------------------------- ### Apply EnumFlags to Holograms and Lines Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Demonstrates adding flags to modify hologram and line behavior. ```java hologram.addFlag(EnumFlag.DISABLE_ANIMATION); line.addFlag(EnumFlag.SHADOW); ``` -------------------------------- ### Maven Repository for DecentHolograms API Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/README.md Add this repository to your Maven project to include the DecentHolograms API. Replace VERSION with the latest release version. ```xml jitpack.io https://jitpack.io ``` -------------------------------- ### PlatformPlayerService Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Methods for retrieving players by UUID, name, or listing all online players. ```java PlatformPlayer getPlayer(UUID uuid) PlatformPlayer getPlayer(String name) Collection getOnlinePlayers() ``` -------------------------------- ### Pattern.apply Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Method to apply a color pattern to a string at a specific animation step. ```APIDOC ## String apply(String text, int step) ### Description Applies the pattern to the provided text at a given animation step. ### Parameters - **text** (String) - The text to apply the pattern to. - **step** (int) - The animation step index. ### Returns - **String** - The formatted text with the pattern applied. ``` -------------------------------- ### Define Item Content Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Display Minecraft items using the #ICON prefix followed by the material name and optional metadata. ```text #ICON:MATERIAL_NAME #ICON:MATERIAL_NAME:damage_value:custom_model_data ``` ```yaml content: "#ICON:DIAMOND_SWORD" content: "#ICON:PLAYER_HEAD" content: "#ICON:NETHERITE_PICKAXE" ``` -------------------------------- ### Validate YAML Location Format Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/errors.md Ensure location strings in configuration files follow the world:x:y:z format. ```yaml location: "invalid:location:format" # Wrong: only 3 parts # Correct: world:x:y:z location: "world:100:64:200" ``` -------------------------------- ### HologramItem.fromItemStack(ItemStack itemStack) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Converts a Bukkit ItemStack into a serializable HologramItem representation suitable for use in hologram lines. ```APIDOC ## public static HologramItem fromItemStack(ItemStack itemStack) ### Description Converts a Bukkit ItemStack to a hologram-displayable item. ### Parameters - **itemStack** (ItemStack) - Required - The Bukkit item to convert. ### Returns - **HologramItem** - A serializable item representation. ### Example ```java ItemStack sword = new ItemStack(Material.DIAMOND_SWORD); HologramItem item = HologramItem.fromItemStack(sword); String content = "#ICON:" + item.getContent(); DHAPI.addHologramLine(holo, content); ``` ``` -------------------------------- ### HologramClickEvent Constructor Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Constructor for initializing a new HologramClickEvent instance. ```java public HologramClickEvent(Player player, HologramPage page, ClickType clickType) ``` -------------------------------- ### Animation Utility Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Methods for identifying animations and calculating animation steps. ```java public boolean isIdentifier(String string) ``` ```java protected int getCurrentStep(long step, int maxSteps) ``` -------------------------------- ### Hologram Visibility and Updates Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/quick-integration-guide.md Methods for managing per-player visibility and dynamic content updates. ```APIDOC ## Hologram Visibility and Updates ### Description Control which players see a hologram and update content dynamically. ### Methods - **holo.show(Player player)** - Makes the hologram visible to a specific player. - **holo.hide(Player player)** - Hides the hologram from a specific player. - **line.setPlayerText(Player player, String text)** - Sets custom text for a specific player on a line. - **DHAPI.setHologramLine(Hologram holo, int index, String text)** - Updates the text of a specific line. - **holo.updateAll(boolean refresh)** - Performs a full refresh of the hologram. ``` -------------------------------- ### CommandManager.getCommand Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-managers.md Retrieves a registered command instance by its name. ```APIDOC ## getCommand(String name) ### Description Retrieves a command. ### Parameters - **name** (String) - Required - The name of the command ### Response - **CommandBase** - The command, or null if not registered ``` -------------------------------- ### HologramLine(HologramPage parent, Location location, String content) Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-hologram-line.md Creates a new instance of a hologram line. ```APIDOC ## HologramLine(HologramPage parent, Location location, String content) ### Description Creates a new hologram line. ### Parameters - **parent** (HologramPage) - Required - Parent page (can be null for temporary lines) - **location** (Location) - Required - World position of line - **content** (String) - Required - Line content (text, item, entity format) ### Example ```java HologramLine line = new HologramLine(page, location, "&c&lError!"); page.addLine(line); ``` ``` -------------------------------- ### Platform Adapter Interface Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Defines the base interface for platform-specific implementations. ```java public interface PlatformAdapter ``` -------------------------------- ### Define FileConfig Class Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/types.md Represents the YAML file configuration wrapper class. ```java public class FileConfig ``` -------------------------------- ### TextDisplayContent Interface Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Interface for text-based display content, supporting alignment, background color, and brightness. ```java public interface TextDisplayContent extends DisplayContent ``` -------------------------------- ### Retrieve and update a hologram Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Use this to fetch a hologram instance by name and perform updates if it exists. ```java @Nullable public static Hologram getHologram(String name) throws IllegalArgumentException ``` ```java Hologram holo = DHAPI.getHologram("myholo"); if (holo != null) { holo.updateAll(true); } ``` -------------------------------- ### Add Click Actions to Hologram Pages Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/INDEX.md Registers actions to be triggered on left or right clicks for a specific hologram page. ```java page.addAction(ClickType.LEFT_CLICK, new Action("MESSAGE:Hello!")); page.addAction(ClickType.RIGHT_CLICK, new Action("TELEPORT:0,64,0,world")); ``` -------------------------------- ### Create Hologram Line Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-dhapi.md Methods for creating new hologram line objects. ```java public static HologramLine createHologramLine(HologramPage parent, String content) throws IllegalArgumentException ``` ```java public static HologramLine createHologramLine(HologramPage parent, Location location, String content) throws IllegalArgumentException ``` -------------------------------- ### PlatformPlayer Methods Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Methods for accessing player identity, online status, and location data. ```java UUID getUUID() UUID getUniqueId() String getName() boolean isOnline() Location getLocation() World getWorld() ``` -------------------------------- ### RainbowPattern Implementation Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/api-reference-animations-actions.md Cycles through all colors in the text. ```java new RainbowPattern() ``` -------------------------------- ### Apply Animation Formats Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/configuration.md Animations are applied to text using the syntax text. ```text Text ``` ```text Text ``` ```text Text ``` ```text Text ``` ```text Text ``` ```text Text ``` ```text Text ``` -------------------------------- ### PlatformPlayerService Interface Source: https://github.com/decentsoftware-eu/decentholograms/blob/main/_autodocs/platform-api-events.md Defines the service interface for retrieving player instances. ```java public interface PlatformPlayerService ```