Skip to content

Configuration

DSH105 edited this page Mar 2, 2014 · 14 revisions

Configuration of HoloAPI can be done in the following two files:

  • config.yml - Used for all main HoloAPI configuration
  • language.yml - Allows control over messages sent by HoloAPI

Config.yml

Options inside of this file are as follows:

Option Default value Description
primaryChatColour 3 Primary chat colour used for HoloAPI messages. Will affect language.yml when first loaded.
secondaryChatColour b Secondary chat colour used for HoloAPI messages. Will affect language.yml when first loaded.
autoUpdate false If set to true, HoloAPI will update automatically from dev.bukkit.org. See the BukkitDev page for more information on this.
checkForUpdates true If set to true, HoloAPI will check for updates from dev.bukkit.org and notify the console if one is available. See the BukkitDev page for more information on this.
verticalLineSpacing 0.25 Spacing between each line of holograms

Image and Animated Holograms

Image Holograms

The Images section of the config file can be used to control the images loaded into HoloAPI for use through both the commands and API. Only loaded images are available directly from HoloAPI.

Note: The images section is not loaded with the HoloAPI config by default, and must be created by the user.

Images MUST be placed in the images folder of the HoloAPI directory (plugins/HoloAPI/images/). This WILL NOT work unless the image is found.

The following is an example setup of an image.

images:
  myfavouriteimage:
    path: horse.png
    characterType: BLOCK
    height: 20
    type: FILE
    requiresBorder: false

The values above are as follows:

Value Explanation
path The path of the image in the images folder. (In this case, the horse.png image is located in plugins/HoloAPI/images/).
characterType Character display type of the image. Four possible options are: BLOCK, DARK, MEDIUM and LIGHT.
height Display height of the image when loaded in-game
type File type. This value is not required (see below for more information)
requiresBorder Some images work better with this set to true, depending on the placement of transparent pixels.

To create a hologram based on this image in-game, the command /holo create image myfavouriteimage would need to be used.

Animated Holograms

Content coming soon.

File Types

Along with the support of local images, HoloAPI also provides support for loading URL images out-of-the-box. Usage of this feature is NOT recommended.

By changing the type value of an image configuration to URL, the path value becomes the HTTP address for the desired image.