# HologramFormat (ShopChest 1.12 API)
Date: 2017-06-08

de.epiceric.shopchest.config

## Class HologramFormat

- java.lang.Object
- - de.epiceric.shopchest.config.HologramFormat

    public class HologramFormat
    extends Object

### Nested Class Summary

Nested Classes
`static class` `HologramFormat.Requirement`

### Constructor Summary

Constructors
Constructor and Description
`HologramFormat(ShopChest plugin)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `evalPlaceholder(String string, Map<Placeholder,Object> values)` Parse and evaluate a condition
`boolean` `evalRequirement(String condition, Map<HologramFormat.Requirement,Object> values)` Parse and evaluate a condition
`org.bukkit.configuration.file.YamlConfiguration` `getConfig()` Returns the configuration of the "hologram-format.yml" file
`String` `getFormat(int line, Map<HologramFormat.Requirement,Object> reqMap, Map<Placeholder,Object> plaMap)` Get the format for the given line of the hologram
`int` `getLineCount()` Returns the amount of lines in a hologram
`boolean` `isDynamic()` Returns whether the hologram text has to change dynamically without reloading
`void` `reload()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HologramFormat

    public HologramFormat(ShopChest plugin)

### Method Detail

#### getFormat

    public String getFormat(int line,
                            Map<HologramFormat.Requirement,Object> reqMap,
                            Map<Placeholder,Object> plaMap)

Get the format for the given line of the hologram

Parameters:
  `line` - Line of the hologram
  `reqMap` - Values of the requirements that might be needed by the format (contains `null` if not comparable)
Returns:
  The format of the first working option, or an empty String if no option is working because of not fulfilled requirements

#### reload

    public void reload()

#### isDynamic

    public boolean isDynamic()

Returns whether the hologram text has to change dynamically without reloading

#### getLineCount

    public int getLineCount()

Returns the amount of lines in a hologram

#### getConfig

    public org.bukkit.configuration.file.YamlConfiguration getConfig()

Returns the configuration of the "hologram-format.yml" file

#### evalRequirement

    public boolean evalRequirement(String condition,
                                   Map<HologramFormat.Requirement,Object> values)

Parse and evaluate a condition

Parameters:
  `condition` - Condition to evaluate
  `values` - Values of the requirements
Returns:
  Result of the condition

#### evalPlaceholder

    public String evalPlaceholder(String string,
                                  Map<Placeholder,Object> values)

Parse and evaluate a condition

Parameters:
  `string` - Message or hologram format whose containing scripts to execute
  `values` - Values of the placeholders
Returns:
  Result of the condition