Merge remote-tracking branch 'refs/remotes/ProjectKorra/master'

This commit is contained in:
Benford 2016-04-13 21:00:24 -04:00
commit 6f58fe5c4b
4 changed files with 9 additions and 9 deletions

View file

@ -102,8 +102,7 @@ public class Element {
}
public String getPrefix() {
String prefix = this.plugin.getName().equalsIgnoreCase("ProjectKorra") ? this.getColor() + ConfigManager.languageConfig.get().getString("Chat.Prefixes." + name) + " " : ChatColor.WHITE + "[Nonbender] ";
return prefix;
return getColor() + "[" + getName() + (getType() != null ? getType().getBender() : "") + "] ";
}
public ChatColor getColor() {

View file

@ -548,6 +548,13 @@ public abstract class CoreAbility implements Ability {
return ConfigManager.getConfig();
}
/**
* @return the language.yml for the plugin
*/
public static FileConfiguration getLanguageConfig() {
return ConfigManager.languageConfig.get();
}
/**
* Returns a String used to debug potential CoreAbility memory that can be caused
* by a developer forgetting to call {@link #remove()}

View file

@ -105,7 +105,7 @@ public class RemoveCommand extends PKCommand {
}
GeneralMethods.removeUnusableAbilities(player.getName());
sender.sendMessage(e.getColor() + this.succesfullyRemovedElementTargetConfirm.replace("{element}", e.getName() + e.getType().getBending()).replace("{sender}", ChatColor.DARK_AQUA + player.getName() + e.getColor()));
player.sendMessage(e.getColor() + this.succesfullyRemovedElementTargetConfirm.replace("{element}", e.getName() + e.getType().getBending()).replace("{sender}", ChatColor.DARK_AQUA + player.getName() + e.getColor()));
sender.sendMessage(e.getColor() + this.succesfullyRemovedElementTarget.replace("{element}" , e.getName() + e.getType().getBending()).replace("{sender}", ChatColor.DARK_AQUA + sender.getName() + e.getColor()));
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, player, e, Result.REMOVE));
return;

View file

@ -44,12 +44,6 @@ public class ConfigManager {
config.addDefault("Chat.Enable", true);
config.addDefault("Chat.Format", "<name>: <message>");
config.addDefault("Chat.Prefixes.Air", "[Airbender]");
config.addDefault("Chat.Prefixes.Water", "[Waterbender]");
config.addDefault("Chat.Prefixes.Earth", "[Earthbender]");
config.addDefault("Chat.Prefixes.Fire", "[Firebender]");
config.addDefault("Chat.Prefixes.Chi", "[Chiblocker]");
config.addDefault("Chat.Prefixes.Avatar", "[Avatar]");
config.addDefault("Chat.Colors.Avatar", "DARK_PURPLE");
config.addDefault("Chat.Colors.Air", "GRAY");
config.addDefault("Chat.Colors.AirSub", "DARK_GRAY");