-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
290 additions
and
882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,34 @@ | ||
package com.mengcraft.playersql; | ||
|
||
import java.io.File; | ||
|
||
import org.bukkit.ChatColor; | ||
import org.bukkit.configuration.Configuration; | ||
import org.bukkit.configuration.file.YamlConfiguration; | ||
|
||
import java.io.File; | ||
|
||
public class Config { | ||
|
||
public static final Configuration CONF; | ||
|
||
public static final boolean SYN_CHEST; | ||
public static final boolean SYN_EFFECT; | ||
public static final boolean SYN_EXP; | ||
public static final boolean SYN_FOOD; | ||
public static final boolean SYN_HEALTH; | ||
public static final boolean SYN_INVENTORY; | ||
|
||
public static final int SYN_DELAY; | ||
|
||
public static final boolean MSG_ENABLE; | ||
public static final String MSG_LOADING; | ||
|
||
public static final String MSG_SYNCHRONIZED; | ||
public static final File FILE; | ||
public static final Configuration CONF; | ||
|
||
public static final boolean DEBUG; | ||
public static final int SYN_DELAY; | ||
|
||
static { | ||
FILE = new File("plugins/PlayerSQL/config.yml"); | ||
YamlConfiguration yml = YamlConfiguration.loadConfiguration(FILE); | ||
SYN_HEALTH = yml.getBoolean("sync.health", true); | ||
SYN_CHEST = yml.getBoolean("sync.chest", true); | ||
SYN_INVENTORY = yml.getBoolean("sync.inventory", true); | ||
SYN_EFFECT = yml.getBoolean("sync.potion", true); | ||
SYN_EXP = yml.getBoolean("sync.exp", true); | ||
SYN_FOOD = yml.getBoolean("sync.food", true); | ||
SYN_DELAY = yml.getInt("sync.delay", 30); | ||
MSG_ENABLE = yml.getBoolean("plugin.messages", false); | ||
MSG_LOADING = ChatColor.translateAlternateColorCodes('&', yml.getString("messages.dataLoading", "&aPlease wait while your data is being loaded :)")); | ||
MSG_SYNCHRONIZED = ChatColor.translateAlternateColorCodes('&', yml.getString("messages.dataSynchronized", "&aEnjoy! All your data has been synchronized.")); | ||
DEBUG = yml.getBoolean("plugin.debug", false); | ||
CONF = yml; | ||
CONF = YamlConfiguration.loadConfiguration(new File("plugins/PlayerSQL/config.yml")); | ||
SYN_HEALTH = CONF.getBoolean("sync.health", true); | ||
SYN_CHEST = CONF.getBoolean("sync.chest", true); | ||
SYN_INVENTORY = CONF.getBoolean("sync.inventory", true); | ||
SYN_EFFECT = CONF.getBoolean("sync.potion", true); | ||
SYN_EXP = CONF.getBoolean("sync.exp", true); | ||
SYN_FOOD = CONF.getBoolean("sync.food", true); | ||
SYN_DELAY = CONF.getInt("plugin.delay", 30); | ||
DEBUG = CONF.getBoolean("plugin.debug", false); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.