public class HologramFormat extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HologramFormat.Requirement |
Constructor and Description |
---|
HologramFormat(ShopChest plugin) |
Modifier and Type | Method and Description |
---|---|
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() |
public HologramFormat(ShopChest plugin)
public String getFormat(int line, Map<HologramFormat.Requirement,Object> reqMap, Map<Placeholder,Object> plaMap)
line
- Line of the hologramreqMap
- Values of the requirements that might be needed by the format (contains null
if not comparable)public void reload()
public boolean isDynamic()
public int getLineCount()
public org.bukkit.configuration.file.YamlConfiguration getConfig()
public boolean evalRequirement(String condition, Map<HologramFormat.Requirement,Object> values)
condition
- Condition to evaluatevalues
- Values of the requirementspublic String evalPlaceholder(String string, Map<Placeholder,Object> values)
string
- Message or hologram format whose containing scripts to executevalues
- Values of the placeholdersCopyright © 2017. All rights reserved.