part of the prefix update thing

This commit is contained in:
Alastair Hawkes 2015-02-09 19:50:10 +00:00
parent 3c93be91e6
commit e80196062b
2 changed files with 11 additions and 2 deletions

View File

@ -63,4 +63,4 @@ UseWarpPrefix: true
UseCustomPrefix: false
CustomPrefix: '[Test]'
CustomPrefix: '&a[&eAdvancedPortals&a]'

View File

@ -14,6 +14,10 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
public NMS nmsAccess;
public boolean useCustomPrefix = false;
public String customPrefix = "\u00A7a[\u00A7eAdvancedPortals\u00A7a]";
public void onEnable() {
try {
@ -64,7 +68,12 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
// only copy the file if it doesnt exist!
ConfigAccessor config = new ConfigAccessor(this, "Config.yml");
config.saveDefaultConfig();
this.useCustomPrefix = config.getConfig().getBoolean("UseCustomPrefix");
if(useCustomPrefix){
this.customPrefix = config.getConfig().getString("CustomPrefix");
}
ConfigAccessor portalconfig = new ConfigAccessor(this, "Portals.yml");
portalconfig.saveDefaultConfig();