final class Configuration
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.io.File |
ATTACKS_FILE
Convenience reference to the attack data file.
|
private static java.lang.String |
DATA_FOLDER_PATH
Convenience field storing the path to this plugin's data folder.
|
(package private) static org.bukkit.ChatColor |
DEATH_MSG_COLOR
The configurable color applied to all death messages.
|
private static java.io.File |
EXEMPTIONS_FILE
Convenience reference to the WorldGuard exemptions data file.
|
private static java.io.File |
REPLACEMENTS_FILE
Convenience reference to the per-zone mob replacement data file.
|
private static java.io.File |
STATISTICS_FILE |
private static java.util.Set<org.bukkit.World> |
WORLDS
A set of all
Worlds that this plugin should manage. |
private static java.io.File |
ZONES_FILE
Conveneience reference to the zones data file.
|
| Modifier | Constructor and Description |
|---|---|
private |
Configuration()
Private constructor prevents reinstantiation.
|
| Modifier and Type | Method and Description |
|---|---|
private static java.io.File |
clearFile(java.io.File file)
Utility method to clear a file.
|
(package private) static boolean |
isWorldInScope(org.bukkit.World world)
Checks if a world should be managed by this plugin.
|
(package private) static void |
reload(boolean save)
Reloads the configuration.
|
private static void |
reloadAttacks()
Reloads customized attack preferences from the serialized data.
|
private static void |
reloadExemptions()
Reloads the WorldGuard exemption regions from the serialized data.
|
private static void |
reloadReplacements()
Reloads per-zone mob replacements from the serialized data.
|
private static void |
reloadStatistics()
Reloads serialized statistics data.
|
private static void |
reloadTopLevel()
Reloads the list of managed worlds from config.yml.
|
private static void |
reloadZones()
Deserializes all zones from zones.txt in
JavaPlugin.getDataFolder(). |
(package private) static void |
save()
Serializes data to respective YAML files.
|
private static void |
saveStatistics()
Serializes statistics data.
|
private static void |
serializeAttacks()
Serializes attacks and their customzied preferences.
|
private static void |
serializeExemptions()
Serializes WorldGuard exemption regions as a string list.
|
private static void |
serializeReplacements()
Serializes the per-zone mob replacements.
|
private static void |
serializeZones()
Serializes all zones to zones.txt in
JavaPlugin.getDataFolder(). |
private static final java.util.Set<org.bukkit.World> WORLDS
Worlds that this plugin should manage.static org.bukkit.ChatColor DEATH_MSG_COLOR
private static final java.lang.String DATA_FOLDER_PATH
private static final java.io.File ATTACKS_FILE
private static final java.io.File EXEMPTIONS_FILE
private static final java.io.File REPLACEMENTS_FILE
private static final java.io.File ZONES_FILE
private static final java.io.File STATISTICS_FILE
private Configuration()
static void reload(boolean save)
save - if true the configuration will be saved before reloading.static void save()
private static void reloadStatistics()
private static void saveStatistics()
throws java.io.IOException
java.io.IOException - if the file could not be written to.private static void reloadTopLevel()
private static void serializeAttacks()
throws java.io.IOException
java.io.IOException - if the file could not be written to.private static void serializeExemptions()
throws java.io.IOException
java.io.IOException - if the file could not be written to.private static void serializeReplacements()
throws java.io.IOException
java.io.IOException - if the file could not be written to.private static void reloadReplacements()
private static void reloadExemptions()
private static void reloadAttacks()
private static void serializeZones()
throws java.io.IOException
JavaPlugin.getDataFolder().java.io.IOException - if the file cannot be written to.private static void reloadZones()
JavaPlugin.getDataFolder(). Clears any zones that
share a name with a newly loaded zone.static boolean isWorldInScope(org.bukkit.World world)
world - the world.private static java.io.File clearFile(java.io.File file)
file - the file to clear.