Added a language.yml

This commit is contained in:
FinnBueno 2016-03-05 01:17:17 +01:00
parent 66c7be3ddc
commit bcf91e6859
25 changed files with 721 additions and 363 deletions

View file

@ -11,8 +11,8 @@ import com.projectkorra.projectkorra.util.TempPotionEffect;
import com.projectkorra.rpg.RPGMethods;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.util.HashMap;
@ -119,23 +119,19 @@ public class BendingManager implements Runnable {
}
public static String getSunriseMessage() {
return getConfig().getString("Properties.Fire.DayMessage");
return ChatColor.translateAlternateColorCodes('&', ConfigManager.languageConfig.get().getString("Extras.Fire.DayMessage"));
}
public static String getSunsetMessage() {
return getConfig().getString("Properties.Fire.NightMessage");
return ChatColor.translateAlternateColorCodes('&', ConfigManager.languageConfig.get().getString("Extras.Fire.NightMessage"));
}
public static String getMoonriseMessage() {
return getConfig().getString("Properties.Water.NightMessage");
return ChatColor.translateAlternateColorCodes('&', ConfigManager.languageConfig.get().getString("Extras.Water.NightMessage"));
}
public static String getMoonsetMessage() {
return getConfig().getString("Properties.Water.DayMessage");
}
private static FileConfiguration getConfig() {
return ConfigManager.getConfig();
return ChatColor.translateAlternateColorCodes('&', ConfigManager.languageConfig.get().getString("Extras.Water.DayMessage"));
}
}

View file

@ -3,6 +3,8 @@ package com.projectkorra.projectkorra;
import org.bukkit.ChatColor;
import org.bukkit.plugin.Plugin;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@ -100,12 +102,12 @@ public class Element {
}
public ChatColor getColor() {
String color = getPlugin().getConfig().getString("Properties.Chat.Colors." + name);
String color = ConfigManager.languageConfig.get().getString("Chat.Colors." + name);
return color != null ? ChatColor.valueOf(color) : ChatColor.WHITE;
}
public ChatColor getSubColor() {
String color = getPlugin().getConfig().getString("Properties.Chat.Colors." + name + "Sub");
String color = ConfigManager.languageConfig.get().getString("Chat.Colors." + name + "Sub");
return color != null ? ChatColor.valueOf(color) : ChatColor.WHITE;
}
@ -304,7 +306,7 @@ public class Element {
@Override
public ChatColor getColor() {
String color = getPlugin().getConfig().getString("Properties.Chat.Colors." + parentElement.name + "Sub");
String color = ConfigManager.languageConfig.get().getString("Chat.Colors." + parentElement.name + "Sub");
return color != null ? ChatColor.valueOf(color) : ChatColor.WHITE;
}

View file

@ -201,7 +201,7 @@ public class GeneralMethods {
bPlayer.getAbilities().put(slot, ability);
if (coreAbil != null) {
player.sendMessage(coreAbil.getElement().getColor() + "Succesfully bound " + ability + " to slot " + slot);
player.sendMessage(coreAbil.getElement().getColor() + ConfigManager.languageConfig.get().getString("Commands.Bind.SuccessfullyBound").replace("{ability}", ability).replace("{slot}", String.valueOf(slot)));
}
saveAbility(bPlayer, slot, ability);
}

View file

@ -731,7 +731,7 @@ public class PKListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerBendingDeath(EntityBendingDeathEvent event) {
if (ConfigManager.deathMsgConfig.get().getBoolean("Properties.Enabled") && event.getEntity() instanceof Player) {
if (ConfigManager.languageConfig.get().getBoolean("DeathMessages.Enabled") && event.getEntity() instanceof Player) {
Ability ability = event.getAbility();
if (ability == null) {
@ -757,7 +757,7 @@ public class PKListener implements Listener {
public void onPlayerChat(AsyncPlayerChatEvent event) {
if (event.isCancelled()) {
return;
} else if (!plugin.getConfig().getBoolean("Properties.Chat.Enable")) {
} else if (!ConfigManager.languageConfig.get().getBoolean("Chat.Enable")) {
return;
}
@ -770,7 +770,7 @@ public class PKListener implements Listener {
}
if (player.hasPermission("bending.avatar") || bPlayer.getElements().size() > 1) {
color = ChatColor.valueOf(plugin.getConfig().getString("Properties.Chat.Colors.Avatar"));
color = ChatColor.valueOf(ConfigManager.languageConfig.get().getString("Chat.Colors.Avatar"));
} else {
for (Element element : Element.getMainElements()) {
if (bPlayer.hasElement(element)) {
@ -780,7 +780,7 @@ public class PKListener implements Listener {
}
}
String format = plugin.getConfig().getString("Properties.Chat.Format");
String format = ConfigManager.languageConfig.get().getString("Chat.Format");
format = format.replace("<message>", "%2$s");
format = format.replace("<name>", color + player.getDisplayName() + ChatColor.RESET);
event.setFormat(format);
@ -1009,7 +1009,7 @@ public class PKListener implements Listener {
if (event.getEntity().getKiller() != null) {
if (BENDING_PLAYER_DEATH.containsKey(event.getEntity())) {
String message = ConfigManager.deathMsgConfig.get().getString("Properties.Default");
String message = ConfigManager.languageConfig.get().getString("DeathMessages.Default");
String ability = BENDING_PLAYER_DEATH.get(event.getEntity());
String tempAbility = ChatColor.stripColor(ability).replaceAll(" ", "");
CoreAbility coreAbil = CoreAbility.getAbility(ability);
@ -1021,22 +1021,22 @@ public class PKListener implements Listener {
}
if (HorizontalVelocityTracker.hasBeenDamagedByHorizontalVelocity(event.getEntity()) && Arrays.asList(HorizontalVelocityTracker.abils).contains(tempAbility)) {
if (ConfigManager.deathMsgConfig.get().contains("HorizontalVelocity." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString("HorizontalVelocity." + tempAbility);
if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath")) {
message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath");
}
} else if (element != null) {
if (ConfigManager.deathMsgConfig.get().contains(element.toString() + "." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString(element + "." + tempAbility);
} else if (ConfigManager.deathMsgConfig.get().contains("Combo." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString("Combo." + tempAbility);
if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage");
} else if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage");
}
} else {
if (isAvatarAbility) {
if (ConfigManager.deathMsgConfig.get().contains("Avatar." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString("Avatar." + tempAbility);
if (ConfigManager.languageConfig.get().contains("Abilities.Avatar." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities.Avatar." + tempAbility + ".DeathMessage");
}
} else if (ConfigManager.deathMsgConfig.get().contains("Combo." + tempAbility)) {
message = ConfigManager.deathMsgConfig.get().getString("Combo." + tempAbility);
} else if (ConfigManager.languageConfig.get().contains("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage");
}
}
message = message.replace("{victim}", event.getEntity().getName()).replace("{attacker}", event.getEntity().getKiller().getName()).replace("{ability}", ability);

View file

@ -3,6 +3,7 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent.Result;
@ -19,8 +20,22 @@ import java.util.List;
*/
public class AddCommand extends PKCommand {
private String playerNotFound;
private String invalidElement;
private String addedOther;
private String added;
private String alreadyHasElementOther;
private String alreadyHasElement;
public AddCommand() {
super("add", "/bending add <Element> [Player]", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.", new String[] { "add", "a" });
super("add", "/bending add <Element> [Player]", ConfigManager.languageConfig.get().getString("Commands.Add.Description"), new String[] { "add", "a" });
this.playerNotFound = ConfigManager.languageConfig.get().getString("Commands.Add.PlayerNotFound");
this.invalidElement = ConfigManager.languageConfig.get().getString("Commands.Add.InvalidElement");
this.addedOther = ConfigManager.languageConfig.get().getString("Commands.Add.Other.SuccessfullyAdded");
this.added = ConfigManager.languageConfig.get().getString("Commands.Add.SuccessfullyAdded");
this.alreadyHasElementOther = ConfigManager.languageConfig.get().getString("Commands.Add.Other.AlreadyHasElement");
this.alreadyHasElement = ConfigManager.languageConfig.get().getString("Commands.Add.AlreadyHasElement");
}
public void execute(CommandSender sender, List<String> args) {
@ -37,7 +52,7 @@ public class AddCommand extends PKCommand {
}
Player player = Bukkit.getPlayer(args.get(1));
if (player == null) {
sender.sendMessage(ChatColor.RED + "That player is not online.");
sender.sendMessage(ChatColor.RED + playerNotFound);
return;
}
add(sender, player, Element.fromString(args.get(0).toLowerCase()));
@ -58,15 +73,15 @@ public class AddCommand extends PKCommand {
bPlayer = BendingPlayer.getBendingPlayer(target);
}
if (bPlayer.isPermaRemoved()) {
sender.sendMessage(ChatColor.RED + "That player's bending was permanently removed.");
sender.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Preset.Other.BendingPermanentlyRemoved"));
return;
}
if (Arrays.asList(Element.getAllElements()).contains(element)) {
if (bPlayer.hasElement(element)) {
if (!(sender instanceof Player) || !((Player) sender).equals(target)) {
sender.sendMessage(ChatColor.DARK_AQUA + target.getName() + ChatColor.RED + " already has that element!");
sender.sendMessage(ChatColor.RED + alreadyHasElementOther.replace("{target}", ChatColor.DARK_AQUA + target.getName() + ChatColor.RED));
} else {
sender.sendMessage(ChatColor.RED + "You already have that element!");
sender.sendMessage(ChatColor.RED + alreadyHasElement);
}
return;
}
@ -74,15 +89,15 @@ public class AddCommand extends PKCommand {
ChatColor color = element.getColor();
if (!(sender instanceof Player) || !((Player) sender).equals(target)) {
sender.sendMessage(ChatColor.DARK_AQUA + target.getName() + color + " is also a" + (isVowel(element.getName().charAt(0)) ? "n " : " ") + element.getName() + element.getType().getBender() + ".");
sender.sendMessage(color + addedOther.replace("{target}", ChatColor.DARK_AQUA + target.getName() + color).replace("{element}", element.getName() + element.getType().getBender()));
} else {
target.sendMessage(color + "You are also a" + (isVowel(element.getName().charAt(0)) ? "n " : " ") + element.getName() + element.getType().getBender() + ".");
target.sendMessage(color + added.replace("{element}", element.getName() + element.getType().getBender()));
}
GeneralMethods.saveElements(bPlayer);
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, target, element, Result.ADD));
return;
} else {
sender.sendMessage(ChatColor.RED + "You must specify a valid element.");
sender.sendMessage(ChatColor.RED + invalidElement);
}
}

View file

@ -3,6 +3,7 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -15,8 +16,18 @@ import java.util.List;
*/
public class BindCommand extends PKCommand {
private String abilityDoesntExist;
private String wrongNumber;
private String loadingInfo;
private String toggledElementOff;
public BindCommand() {
super("bind", "/bending bind [Ability] <#>", "This command will bind an ability to the slot you specify (if you specify one), or the slot currently selected in your hotbar (If you do not specify a Slot #).", new String[]{ "bind", "b" });
super("bind", "/bending bind [Ability] <#>", ConfigManager.languageConfig.get().getString("Commands.Bind.Description"), new String[]{ "bind", "b" });
this.abilityDoesntExist = ConfigManager.languageConfig.get().getString("Commands.Bind.AbilityDoesntExist");
this.wrongNumber = ConfigManager.languageConfig.get().getString("Commands.Bind.WrongNumber");
this.loadingInfo = ConfigManager.languageConfig.get().getString("Commands.Bind.LoadingInfo");
this.toggledElementOff = ConfigManager.languageConfig.get().getString("Commands.Bind.ToggledElementOff");
}
@Override
@ -27,7 +38,7 @@ public class BindCommand extends PKCommand {
CoreAbility coreAbil = CoreAbility.getAbility(args.get(0));
if (coreAbil == null || coreAbil.isHiddenAbility()) {
sender.sendMessage(ChatColor.RED + "That ability doesn't exist.");
sender.sendMessage(ChatColor.RED + abilityDoesntExist);
return;
}
@ -46,20 +57,20 @@ public class BindCommand extends PKCommand {
if (!(sender instanceof Player)) {
return;
} else if (slot < 1 || slot > 9) {
sender.sendMessage(ChatColor.RED + "Slot must be an integer between 1 and 9.");
sender.sendMessage(ChatColor.RED + wrongNumber);
return;
}
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer((Player) sender);
CoreAbility coreAbil = CoreAbility.getAbility(ability);
if (bPlayer == null) {
sender.sendMessage(ChatColor.RED + "Please wait one moment while we load your bending information.");
sender.sendMessage(ChatColor.RED + loadingInfo);
return;
} else if (coreAbil == null || !bPlayer.canBind(coreAbil)) {
sender.sendMessage(ChatColor.RED + "You don't have permission to bend this ability.");
sender.sendMessage(ChatColor.RED + super.noPermissionMessage);
return;
} else if (!bPlayer.isElementToggled(coreAbil.getElement())) {
sender.sendMessage(ChatColor.RED + "You have that ability's element toggled off currently.");
sender.sendMessage(ChatColor.RED + toggledElementOff);
}
String name = coreAbil != null ? coreAbil.getName() : null;

View file

@ -1,6 +1,7 @@
package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -12,8 +13,18 @@ import java.util.List;
*/
public class CheckCommand extends PKCommand {
private String newVersionAvailable;
private String curVersion;
private String newVersion;
private String upToDate;
public CheckCommand() {
super("check", "/bending check", "Checks if ProjectKorra is up to date.", new String[] { "check", "chk" });
super("check", "/bending check", ConfigManager.languageConfig.get().getString("Commands.Check.Description"), new String[] { "check", "chk" });
this.newVersionAvailable = ConfigManager.languageConfig.get().getString("Commands.Check.NewVersionAvailable");
this.curVersion = ConfigManager.languageConfig.get().getString("Commands.Check.CurrentVersion");
this.newVersion = ConfigManager.languageConfig.get().getString("Commands.Check.LatestVersion");
this.upToDate = ConfigManager.languageConfig.get().getString("Commands.Check.UpToDate");
}
@Override
@ -25,11 +36,11 @@ public class CheckCommand extends PKCommand {
return;
}
if (ProjectKorra.plugin.updater.updateAvailable()) {
sender.sendMessage(ChatColor.GREEN + "There is a new version of " + ChatColor.GOLD + "ProjectKorra" + ChatColor.GREEN + " available!");
sender.sendMessage(ChatColor.YELLOW + "Current version: " + ChatColor.RED + ProjectKorra.plugin.updater.getCurrentVersion());
sender.sendMessage(ChatColor.YELLOW + "Latest version: " + ChatColor.GOLD + ProjectKorra.plugin.updater.getUpdateVersion());
sender.sendMessage(ChatColor.GREEN + this.newVersionAvailable.replace("ProjectKorra", ChatColor.GOLD + "ProjectKorra" + ChatColor.GREEN));
sender.sendMessage(ChatColor.YELLOW + this.curVersion.replace("{version}", ChatColor.RED + ProjectKorra.plugin.updater.getCurrentVersion() + ChatColor.YELLOW));
sender.sendMessage(ChatColor.YELLOW + this.newVersion.replace("{version}", ChatColor.GOLD + ProjectKorra.plugin.updater.getUpdateVersion() + ChatColor.YELLOW));
} else {
sender.sendMessage(ChatColor.YELLOW + "You have the latest version of " + ChatColor.GOLD + "ProjectKorra");
sender.sendMessage(ChatColor.YELLOW + this.upToDate.replace("ProjectKorra", ChatColor.GOLD + "ProjectKorra" + ChatColor.YELLOW));
}
}

View file

@ -4,6 +4,7 @@ import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent.Result;
@ -20,8 +21,18 @@ import java.util.List;
*/
public class ChooseCommand extends PKCommand {
private String invalidElement;
private String playerNotFound;
private String chosen;
private String chosenOther;
public ChooseCommand() {
super("choose", "/bending choose <Element> [Player]", "This command will allow the user to choose a player either for himself or <Player> if specified. This command can only be used once per player unless they have permission to rechoose their element.", new String[] { "choose", "ch" });
super("choose", "/bending choose <Element> [Player]", ConfigManager.languageConfig.get().getString("Commands.Choose.Description"), new String[] { "choose", "ch" });
this.playerNotFound = ConfigManager.languageConfig.get().getString("Commands.Choose.PlayerNotFound");
this.invalidElement = ConfigManager.languageConfig.get().getString("Commands.Choose.InvalidElement");
this.chosen = ConfigManager.languageConfig.get().getString("Commands.Choose.SuccessfullyChosen");
this.chosenOther = ConfigManager.languageConfig.get().getString("Commands.Choose.Other.SuccessfullyChosen");
}
@Override
@ -39,12 +50,12 @@ public class ChooseCommand extends PKCommand {
bPlayer = BendingPlayer.getBendingPlayer(sender.getName());
}
if (bPlayer.isPermaRemoved()) {
sender.sendMessage(ChatColor.RED + "Your bending was permanently removed.");
sender.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Preset.BendingPermanentlyRemoved"));
return;
}
if (!bPlayer.getElements().isEmpty() && !sender.hasPermission("bending.command.rechoose")) {
sender.sendMessage(ChatColor.RED + "You don't have permission to do that.");
sender.sendMessage(super.noPermissionMessage);
return;
}
String element = args.get(0).toLowerCase();
@ -56,17 +67,17 @@ public class ChooseCommand extends PKCommand {
add(sender, (Player) sender, target);
return;
} else {
sender.sendMessage(ChatColor.RED + "That is not a valid element.");
sender.sendMessage(ChatColor.RED + invalidElement);
return;
}
} else if (args.size() == 2) {
if (!sender.hasPermission("bending.admin.choose")) {
sender.sendMessage(ChatColor.RED + "You don't have permission to do that.");
sender.sendMessage(super.noPermissionMessage);
return;
}
Player target = ProjectKorra.plugin.getServer().getPlayer(args.get(1));
if (target == null || !target.isOnline()) {
sender.sendMessage(ChatColor.RED + "That player is not online.");
sender.sendMessage(ChatColor.RED + playerNotFound);
return;
}
String element = args.get(0).toLowerCase();
@ -75,7 +86,7 @@ public class ChooseCommand extends PKCommand {
add(sender, target, targetElement);
return;
} else {
sender.sendMessage(ChatColor.RED + "That is not a valid element.");
sender.sendMessage(ChatColor.RED + invalidElement);
}
}
}
@ -97,9 +108,9 @@ public class ChooseCommand extends PKCommand {
bPlayer.setElement(element);
ChatColor color = element != null ? element.getColor() : null;
if (!(sender instanceof Player) || !((Player) sender).equals(target)) {
sender.sendMessage(ChatColor.DARK_AQUA + target.getName() + color + " is now a" + (isVowel(element.getName().charAt(0)) ? "n " : " ") + element.getName() + element.getType().getBender() + ".");
sender.sendMessage(color + chosenOther.replace("{target}", ChatColor.DARK_AQUA + target.getName() + color).replace("{element}", element.getName() + element.getType().getBender()));
} else {
target.sendMessage(color + "You are now a" + (isVowel(element.getName().charAt(0)) ? "n " : " ") + element.getName() + element.getType().getBender() + ".");
target.sendMessage(color + chosen.replace("{element}", element.getName() + element.getType().getBender()));
}

View file

@ -3,6 +3,7 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.util.MultiAbilityManager;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -15,8 +16,20 @@ import java.util.List;
*/
public class ClearCommand extends PKCommand {
private String cantEditBinds;
private String cleared;
private String wrongNumber;
private String clearedSlot;
private String alreadyEmpty;
public ClearCommand() {
super("clear", "/bending clear [Slot]", "This command will clear the bound ability from the slot you specify (if you specify one). If you choose not to specify a slot, all of your abilities will be cleared.", new String[] { "clear", "cl", "c" });
super("clear", "/bending clear [Slot]", ConfigManager.languageConfig.get().getString("Commands.Clear.Description"), new String[] { "clear", "cl", "c" });
this.cantEditBinds = ConfigManager.languageConfig.get().getString("Commands.Clear.CantEditBinds");
this.cleared = ConfigManager.languageConfig.get().getString("Commands.Clear.Cleared");
this.wrongNumber = ConfigManager.languageConfig.get().getString("Commands.Clear.WrongNumber");
this.clearedSlot = ConfigManager.languageConfig.get().getString("Commands.Clear.ClearedSlot");
this.alreadyEmpty = ConfigManager.languageConfig.get().getString("Commands.Clear.AlreadyEmpty");
}
@Override
@ -24,7 +37,7 @@ public class ClearCommand extends PKCommand {
if (!hasPermission(sender) || !correctLength(sender, args.size(), 0, 1) || !isPlayer(sender)) {
return;
} else if (MultiAbilityManager.hasMultiAbilityBound((Player) sender)) {
sender.sendMessage(ChatColor.RED + "You can't edit your binds right now!");
sender.sendMessage(ChatColor.RED + cantEditBinds);
return;
}
@ -38,22 +51,22 @@ public class ClearCommand extends PKCommand {
for (int i = 1; i <= 9; i++) {
GeneralMethods.saveAbility(bPlayer, i, null);
}
sender.sendMessage("Your bound abilities have been cleared.");
sender.sendMessage(cleared);
} else if (args.size() == 1) {
try {
int slot = Integer.parseInt(args.get(0));
if (slot < 1 || slot > 9) {
sender.sendMessage(ChatColor.RED + "The slot must be an integer between 1 and 9.");
sender.sendMessage(ChatColor.RED + wrongNumber);
}
if (bPlayer.getAbilities().get(slot) != null) {
bPlayer.getAbilities().remove(slot);
GeneralMethods.saveAbility(bPlayer, slot, null);
sender.sendMessage("You have cleared slot #" + slot);
sender.sendMessage(clearedSlot.replace("{slot}", String.valueOf(slot)));
} else {
sender.sendMessage("That slot was already empty.");
sender.sendMessage(alreadyEmpty);
}
} catch (NumberFormatException e) {
sender.sendMessage(ChatColor.RED + "The slot must be an integer between 1 and 9.");
sender.sendMessage(ChatColor.RED + wrongNumber);
}
}
}

View file

@ -4,6 +4,7 @@ import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -15,8 +16,18 @@ import java.util.List;
public class CopyCommand extends PKCommand {
private String playerNotFound;
private String copied;
private String failedToBindAll;
private String copiedOther;
public CopyCommand() {
super("copy", "/bending copy <Player> [Player]", "This command will allow the user to copy the binds of another player either for himself or assign them to <Player> if specified.", new String[] { "copy", "co" });
super("copy", "/bending copy <Player> [Player]", ConfigManager.languageConfig.get().getString("Commands.Copy.Description"), new String[] { "copy", "co" });
this.playerNotFound = ConfigManager.languageConfig.get().getString("Commands.Copy.PlayerNotFound");
this.copied = ConfigManager.languageConfig.get().getString("Commands.Copy.SuccessfullyCopied");
this.failedToBindAll = ConfigManager.languageConfig.get().getString("Commands.Copy.FailedToBindAll");
this.copiedOther = ConfigManager.languageConfig.get().getString("Commands.Copy.Other.SuccessfullyCopied");
}
@Override
@ -31,19 +42,19 @@ public class CopyCommand extends PKCommand {
Player orig = Bukkit.getPlayer(args.get(0));
if (orig == null || !orig.isOnline()) {
sender.sendMessage(ChatColor.RED + "Player not found.");
sender.sendMessage(ChatColor.RED + playerNotFound);
return;
}
boolean boundAll = assignAbilities(sender, orig, (Player) sender, true);
sender.sendMessage(ChatColor.GREEN + "Your bound abilities have been made the same as " + ChatColor.YELLOW + orig.getName());
sender.sendMessage(ChatColor.GREEN + copied.replace("{target}", ChatColor.YELLOW + orig.getName() + ChatColor.GREEN));
if (!boundAll) {
sender.sendMessage(ChatColor.RED + "Some abilities were not bound because you cannot bend the required element.");
sender.sendMessage(ChatColor.RED + failedToBindAll);
}
} else if (args.size() == 2) {
if (!hasPermission(sender, "assign")) {
sender.sendMessage(ChatColor.RED + "You don't have permission to do that.");
sender.sendMessage(super.noPermissionMessage);
return;
}
@ -51,15 +62,15 @@ public class CopyCommand extends PKCommand {
Player target = ProjectKorra.plugin.getServer().getPlayer(args.get(1));
if ((orig == null || !orig.isOnline()) || (target == null || !target.isOnline())) {
sender.sendMessage(ChatColor.RED + "That player is not online.");
sender.sendMessage(ChatColor.RED + playerNotFound);
return;
}
boolean boundAll = assignAbilities(sender, orig, target, false);
sender.sendMessage(ChatColor.GREEN + "The bound abilities of " + ChatColor.YELLOW + target.getName() + ChatColor.GREEN + " have been been made the same as " + ChatColor.YELLOW + orig.getName());
target.sendMessage(ChatColor.GREEN + "Your bound abilities have been made the same as " + ChatColor.YELLOW + orig.getName());
sender.sendMessage(ChatColor.GREEN + copiedOther.replace("{target1}", ChatColor.YELLOW + target.getName() + ChatColor.GREEN).replace("{target2}", ChatColor.YELLOW + orig.getName() + ChatColor.GREEN));
target.sendMessage(ChatColor.GREEN + copied.replace("{target}", ChatColor.YELLOW + orig.getName() + ChatColor.GREEN));
if (!boundAll) {
sender.sendMessage(ChatColor.RED + "Some abilities were not bound because you cannot bend the required element.");
sender.sendMessage(ChatColor.RED + failedToBindAll);
}
}
}
@ -80,9 +91,9 @@ public class CopyCommand extends PKCommand {
}
if (orig.isPermaRemoved()) {
if (self) {
player.sendMessage(ChatColor.RED + "Your bending was permanently removed.");
player.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Preset.BendingPermanentlyRemoved"));
} else {
sender.sendMessage(ChatColor.RED + "That players bending was permanently removed.");
sender.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Preset.Other.BendingPermanentlyRemoved"));
}
return false;
}

View file

@ -1,6 +1,7 @@
package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -13,7 +14,7 @@ import java.util.List;
public class DebugCommand extends PKCommand {
public DebugCommand() {
super("debug", "/bending debug", "Outputs information on the current ProjectKorra installation to /plugins/ProjectKorra/debug.txt", new String[] { "debug", "de" });
super("debug", "/bending debug", ConfigManager.languageConfig.get().getString("Commands.Debug.Description"), new String[] { "debug", "de" });
}
@Override
@ -26,8 +27,7 @@ public class DebugCommand extends PKCommand {
}
GeneralMethods.runDebug();
sender.sendMessage(ChatColor.GREEN + "Debug File Created as debug.txt in the ProjectKorra plugin folder.");
sender.sendMessage(ChatColor.GREEN + "Put contents on pastie.org and create a bug report on the ProjectKorra forum if you need to.");
sender.sendMessage(ChatColor.GREEN + ConfigManager.languageConfig.get().getString("Commands.Debug.SuccesfullyExported"));
}
/**
@ -39,7 +39,7 @@ public class DebugCommand extends PKCommand {
@Override
public boolean hasPermission(CommandSender sender) {
if (!sender.hasPermission("bending.admin." + getName())) {
sender.sendMessage(ChatColor.RED + "You don't have permission to use this command.");
sender.sendMessage(super.noPermissionMessage);
return false;
}
return true;

View file

@ -7,6 +7,7 @@ import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.SubAbility;
import com.projectkorra.projectkorra.ability.util.ComboManager;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -21,8 +22,20 @@ import java.util.List;
*/
public class DisplayCommand extends PKCommand {
private String noCombosAvailable;
private String invalidArgument;
private String playersOnly;
private String noAbilitiesAvailable;
private String noBinds;
public DisplayCommand() {
super("display", "/bending display <Element>", "This command will show you all of the elements you have bound if you do not specify an element. If you do specify an element (Air, Water, Earth, Fire, or Chi), it will show you all of the available abilities of that element installed on the server.", new String[] { "display", "dis", "d" });
super("display", "/bending display <Element>", ConfigManager.languageConfig.get().getString("Commands.Display.Description"), new String[] { "display", "dis", "d" });
this.noCombosAvailable = ConfigManager.languageConfig.get().getString("Commands.Display.NoCombosAvailable");
this.noAbilitiesAvailable = ConfigManager.languageConfig.get().getString("Commands.Display.NoAbilitiesAvailable");
this.invalidArgument = ConfigManager.languageConfig.get().getString("Commands.Display.InvalidArgument");
this.playersOnly = ConfigManager.languageConfig.get().getString("Commands.Display.PlayersOnly");
this.noBinds = ConfigManager.languageConfig.get().getString("Commands.Display.NoBinds");
}
@Override
@ -41,7 +54,7 @@ public class DisplayCommand extends PKCommand {
ArrayList<String> combos = ComboManager.getCombosForElement(element);
if (combos.isEmpty()) {
sender.sendMessage(color + "There are no " + element.getName() + " combos available.");
sender.sendMessage(color + noCombosAvailable.replace("{element}", element.getName()));
return;
}
for (String comboMove : combos) {
@ -71,7 +84,7 @@ public class DisplayCommand extends PKCommand {
}
else {
StringBuilder elements = new StringBuilder(ChatColor.RED + "Not a valid argument.");
StringBuilder elements = new StringBuilder(ChatColor.RED + invalidArgument);
elements.append(ChatColor.WHITE + "\nElements: ");
for (Element e : Element.getAllElements()) {
if (!(e instanceof SubElement)) {
@ -89,7 +102,7 @@ public class DisplayCommand extends PKCommand {
if (args.size() == 0) {
//bending display
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + "This command is only usable by players.");
sender.sendMessage(ChatColor.RED + playersOnly);
return;
}
displayBinds(sender);
@ -99,7 +112,7 @@ public class DisplayCommand extends PKCommand {
private void displayAvatar(CommandSender sender) {
List<CoreAbility> abilities = CoreAbility.getAbilitiesByElement(Element.AVATAR);
if (abilities.isEmpty()) {
sender.sendMessage(ChatColor.YELLOW + "There are no " + Element.AVATAR.getColor() + "avatar" + ChatColor.YELLOW + " abilities on this server!");
sender.sendMessage(ChatColor.YELLOW + noAbilitiesAvailable.replace("{element}", Element.AVATAR.getColor() + "Avatar" + ChatColor.YELLOW));
return;
}
for (CoreAbility ability : abilities) {
@ -126,10 +139,10 @@ public class DisplayCommand extends PKCommand {
List<CoreAbility> abilities = CoreAbility.getAbilitiesByElement(element);
if (abilities.isEmpty()) {
sender.sendMessage(ChatColor.RED + "You must select a valid element.");
sender.sendMessage(ChatColor.RED + invalidArgument);
return;
} else if (abilities.isEmpty()) {
sender.sendMessage(ChatColor.YELLOW + "There are no " + element + " abilities enabled on the server.");
sender.sendMessage(ChatColor.YELLOW + noAbilitiesAvailable.replace("{element}", element.getColor() + element.getName() + ChatColor.YELLOW));
}
for (CoreAbility ability : abilities) {
@ -163,7 +176,7 @@ public class DisplayCommand extends PKCommand {
List<CoreAbility> abilities = CoreAbility.getAbilitiesByElement(element);
if (abilities.isEmpty() && element != null) {
sender.sendMessage(ChatColor.YELLOW + "There are no " + element.getColor() + element + ChatColor.YELLOW + " abilities installed!");
sender.sendMessage(ChatColor.YELLOW + noAbilitiesAvailable.replace("{element}", element.getColor() + element.getName() + ChatColor.YELLOW));
return;
}
for (CoreAbility ability : abilities) {
@ -189,8 +202,7 @@ public class DisplayCommand extends PKCommand {
HashMap<Integer, String> abilities = bPlayer.getAbilities();
if (abilities.isEmpty()) {
sender.sendMessage(ChatColor.RED + "You don't have any bound abilities.");
sender.sendMessage("If you would like to see a list of available abilities, please use the /bending display [Element] command. Use /bending help for more information.");
sender.sendMessage(ChatColor.RED + this.noBinds);
return;
}

View file

@ -12,13 +12,39 @@ import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.ability.ComboAbility;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.util.ComboManager;
import com.projectkorra.projectkorra.configuration.ConfigManager;
/**
* Executor for /bending help. Extends {@link PKCommand}.
*/
public class HelpCommand extends PKCommand {
private String required;
private String optional;
private String properUsage;
private String learnMore;
private String air;
private String water;
private String earth;
private String fire;
private String chi;
private String invalidTopic;
private String usage;
public HelpCommand() {
super("help", "/bending help [Topic/Page]", "This command provides information on how to use other commands in ProjectKorra.", new String[] { "help", "h" });
super("help", "/bending help [Topic/Page]", ConfigManager.languageConfig.get().getString("Commands.Help.Description"), new String[] { "help", "h" });
this.required = ConfigManager.languageConfig.get().getString("Commands.Help.Required");
this.optional = ConfigManager.languageConfig.get().getString("Commands.Help.Optional");
this.properUsage = ConfigManager.languageConfig.get().getString("Commands.Help.ProperUsage");
this.learnMore = ConfigManager.languageConfig.get().getString("Commands.Help.Elements.LearnMore");
this.air = ConfigManager.languageConfig.get().getString("Commands.Help.Elements.Air");
this.water = ConfigManager.languageConfig.get().getString("Commands.Help.Elements.Water");
this.earth = ConfigManager.languageConfig.get().getString("Commands.Help.Elements.Earth");
this.fire = ConfigManager.languageConfig.get().getString("Commands.Help.Elements.Fire");
this.chi = ConfigManager.languageConfig.get().getString("Commands.Help.Elements.Chi");
this.invalidTopic = ConfigManager.languageConfig.get().getString("Commands.Help.InvalidTopic");
this.usage = ConfigManager.languageConfig.get().getString("Commands.Help.Usage");
}
@Override
@ -36,7 +62,7 @@ public class HelpCommand extends PKCommand {
Collections.reverse(strings);
strings.add(instances.get("help").getProperUse());
Collections.reverse(strings);
for (String s : getPage(strings, ChatColor.GOLD + "Commands: <required> [optional]", 1, false)) {
for (String s : getPage(strings, ChatColor.GOLD + "Commands: <" + required + "> [" + optional + "]", 1, false)) {
sender.sendMessage(ChatColor.YELLOW + s);
}
return;
@ -48,38 +74,33 @@ public class HelpCommand extends PKCommand {
for (PKCommand command : instances.values()) {
strings.add(command.getProperUse());
}
for (String s : getPage(strings, ChatColor.GOLD + "Commands: <required> [optional]", Integer.valueOf(arg), true)) {
for (String s : getPage(strings, ChatColor.GOLD + "Commands: <" + required + "> [" + optional + "]", Integer.valueOf(arg), true)) {
sender.sendMessage(ChatColor.YELLOW + s);
}
} else if (instances.keySet().contains(arg.toLowerCase())) {//bending help command
instances.get(arg).help(sender, true);
} else if (Arrays.asList(Commands.comboaliases).contains(arg)) { //bending help elementcombo
sender.sendMessage(ChatColor.GOLD + "Proper Usage: " + ChatColor.RED + "/bending display " + arg + ChatColor.GOLD + " or " + ChatColor.RED + "/bending help <Combo Name>");
sender.sendMessage(ChatColor.GOLD + properUsage.replace("{command1}", ChatColor.RED + "/bending display " + arg + ChatColor.GOLD).replace("{command2}", ChatColor.RED + "/bending help <Combo Name>" + ChatColor.GOLD));
} else if (CoreAbility.getAbility(arg) != null && !(CoreAbility.getAbility(arg) instanceof ComboAbility)) { //bending help ability
CoreAbility ability = CoreAbility.getAbility(arg);
ChatColor color = ability.getElement().getColor();
sender.sendMessage(color + ability.getName() + " - ");
sender.sendMessage(color + ability.getDescription());
} else if (Arrays.asList(Commands.airaliases).contains(args.get(0))) {
sender.sendMessage(Element.AIR.getColor() + "Air is the element of freedom. Airbenders are natural pacifists and " + "great explorers. There is nothing stopping them from scaling the tallest of mountains and walls easily. They specialize in redirection, " + "from blasting things away with gusts of winds, to forming a shield around them to prevent damage. Easy to get across flat terrains, " + "such as oceans, there is practically no terrain off limits to Airbenders. They lack much raw damage output, but make up for it with " + "with their ridiculous amounts of utility and speed.");
sender.sendMessage(ChatColor.YELLOW + "Airbenders can chain their abilities into combos, type " + Element.AIR.getColor() + "/b help AirCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/qffg9m3");
sender.sendMessage(Element.AIR.getColor() + air.replace("/b help AirCombos", Element.AIR.getSubColor() + "/b help AirCombos" + Element.AIR.getColor()));
sender.sendMessage(ChatColor.YELLOW + learnMore + ChatColor.DARK_AQUA + "http://tinyurl.com/qffg9m3");
} else if (Arrays.asList(Commands.wateraliases).contains(args.get(0))) {
sender.sendMessage(Element.WATER.getColor() + "Water is the element of change. Waterbending focuses on using your " + "opponents own force against them. Using redirection and various dodging tactics, you can be made " + "practically untouchable by an opponent. Waterbending provides agility, along with strong offensive " + "skills while in or near water.");
sender.sendMessage(ChatColor.YELLOW + "Waterbenders can chain their abilities into combos, type " + Element.WATER.getColor() + "/b help WaterCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/lod3plv");
sender.sendMessage(Element.WATER.getColor() + water.replace("/b help WaterCombos", Element.WATER.getSubColor() + "/b h WaterCombos" + Element.WATER.getColor()));
sender.sendMessage(ChatColor.YELLOW + learnMore + ChatColor.DARK_AQUA + "http://tinyurl.com/lod3plv");
} else if (Arrays.asList(Commands.earthaliases).contains(args.get(0))) {
sender.sendMessage(Element.EARTH.getColor() + "Earth is the element of substance. Earthbenders share many of the " + "same fundamental techniques as Waterbenders, but their domain is quite different and more readily " + "accessible. Earthbenders dominate the ground and subterranean, having abilities to pull columns " + "of rock straight up from the earth or drill their way through the mountain. They can also launch " + "themselves through the air using pillars of rock, and will not hurt themselves assuming they land " + "on something they can bend. The more skilled Earthbenders can even bend metal.");
//sender.sendMessage(ChatColor.YELLOW + "Earthbenders can chain their abilities into combos, type " + EarthMethods.getEarthColor() + "/b help EarthCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/qaudl42");
sender.sendMessage(Element.EARTH.getColor() + earth);
sender.sendMessage(ChatColor.YELLOW + learnMore + ChatColor.DARK_AQUA + "http://tinyurl.com/qaudl42");
} else if (Arrays.asList(Commands.firealiases).contains(args.get(0))) {
sender.sendMessage(Element.FIRE.getColor() + "Fire is the element of power. Firebenders focus on destruction and " + "incineration. Their abilities are pretty straight forward: set things on fire. They do have a bit " + "of utility however, being able to make themselves un-ignitable, extinguish large areas, cook food " + "in their hands, extinguish large areas, small bursts of flight, and then comes the abilities to shoot " + "fire from your hands.");
sender.sendMessage(ChatColor.YELLOW + "Firebenders can chain their abilities into combos, type " + Element.FIRE.getColor() + "/b help FireCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/k4fkjhb");
sender.sendMessage(Element.FIRE.getColor() + fire.replace("/b h FireCombos", Element.FIRE.getSubColor() + "/b h FireCombos" + Element.FIRE.getColor()));
sender.sendMessage(ChatColor.YELLOW + learnMore + ChatColor.DARK_AQUA + "http://tinyurl.com/k4fkjhb");
} else if (Arrays.asList(Commands.chialiases).contains(args.get(0))) {
sender.sendMessage(Element.CHI.getColor() + "Chiblockers focus on bare handed combat, utilizing their agility and " + "speed to stop any bender right in their path. Although they lack the ability to bend any of the " + "other elements, they are great in combat, and a serious threat to any bender. Chiblocking was " + "first shown to be used by Ty Lee in Avatar: The Last Airbender, then later by members of the " + "Equalists in The Legend of Korra.");
sender.sendMessage(ChatColor.YELLOW + "Chiblockers can chain their abilities into combos, type " + Element.CHI.getColor() + "/b help ChiCombos" + ChatColor.YELLOW + " for more information.");
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/mkp9n6y");
sender.sendMessage(Element.CHI.getColor() + chi.replace("/b h ChiCombos", Element.CHI.getSubColor() + "/b h ChiCombos" + Element.CHI.getColor()));
sender.sendMessage(ChatColor.YELLOW + learnMore + ChatColor.DARK_AQUA + "http://tinyurl.com/mkp9n6y");
} else {
//combos - handled differently because they're stored in CamelCase in ComboManager
for (String combo : ComboManager.getDescriptions().keySet()) {
@ -88,11 +109,11 @@ public class HelpCommand extends PKCommand {
ChatColor color = coreAbility != null ? coreAbility.getElement().getColor() : null;
sender.sendMessage(color + combo + " (Combo) - ");
sender.sendMessage(color + ComboManager.getDescriptions().get(combo));
sender.sendMessage(ChatColor.GOLD + "Usage: " + ComboManager.getInstructions().get(combo));
sender.sendMessage(ChatColor.GOLD + usage + ComboManager.getInstructions().get(combo));
return;
}
}
sender.sendMessage(ChatColor.RED + "That isn't a valid help topic. Use /bending help for more information.");
sender.sendMessage(ChatColor.RED + invalidTopic);
}
}
}

View file

@ -4,6 +4,7 @@ import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.storage.DBConnection;
import org.bukkit.Bukkit;
@ -30,9 +31,20 @@ public class ImportCommand extends PKCommand {
boolean debugEnabled = ProjectKorra.plugin.getConfig().getBoolean("debug");
BukkitTask importTask;
private String disabled;
private String preparingData;
private String importStarted;
private String debugWarning;
private String queuedUp;
public ImportCommand() {
super("import", "/bending import", "This command will import your old bendingPlayers.yml from the Bending plugin. It will generate a convert.yml file to convert the data to be used with this plugin. You can delete the file once the complete message is displayed. This command should only be used ONCE.", new String[] { "import", "i" });
super("import", "/bending import", ConfigManager.languageConfig.get().getString("Commands.Import.Description"), new String[] { "import", "i" });
this.disabled = ConfigManager.languageConfig.get().getString("Commands.Import.Description");
this.preparingData = ConfigManager.languageConfig.get().getString("Commands.Import.PreparingData");
this.importStarted = ConfigManager.languageConfig.get().getString("Commands.Import.ImportStarted");
this.debugWarning = ConfigManager.languageConfig.get().getString("Commands.Import.DebugWarning");
this.queuedUp = ConfigManager.languageConfig.get().getString("Commands.Import.DataQueuedUp");
}
@Override
@ -40,11 +52,11 @@ public class ImportCommand extends PKCommand {
if (!hasPermission(sender) || !correctLength(sender, args.size(), 0, 0)) {
return;
} else if (!GeneralMethods.isImportEnabled()) {
sender.sendMessage(ChatColor.RED + "Importing has been disabled in the config");
sender.sendMessage(ChatColor.RED + this.disabled);
return;
}
sender.sendMessage(ChatColor.GREEN + "Preparing data for import.");
sender.sendMessage(ChatColor.GREEN + this.preparingData);
File bendingPlayersFile = new File(".", "converted.yml");
FileConfiguration bendingPlayers = YamlConfiguration.loadConfiguration(bendingPlayersFile);
@ -72,21 +84,21 @@ public class ImportCommand extends PKCommand {
final CommandSender s = sender;
final int total = bPlayers.size();
sender.sendMessage(ChatColor.GREEN + "Import of data started. Do NOT stop / reload your server.");
sender.sendMessage(ChatColor.GREEN + this.importStarted);
if (debugEnabled) {
sender.sendMessage(ChatColor.RED + "Console will print out all of the players that are imported if debug mode is enabled as they import.");
sender.sendMessage(ChatColor.RED + this.debugWarning);
}
importTask = Bukkit.getServer().getScheduler().runTaskTimerAsynchronously(ProjectKorra.plugin, new Runnable() {
public void run() {
int i = 0;
if (i >= 10) {
s.sendMessage(ChatColor.GREEN + "10 / " + total + " players converted thus far!");
s.sendMessage(ChatColor.GREEN + "10 / " + total + "!");
return;
}
while (i < 10) {
if (bPlayers.isEmpty()) {
s.sendMessage(ChatColor.GREEN + "All data has been queued up, please allow up to 5 minutes for the data to complete, then reboot your server.");
s.sendMessage(ChatColor.GREEN + queuedUp);
Bukkit.getServer().getScheduler().cancelTask(importTask.getTaskId());
ProjectKorra.plugin.getConfig().set("Properties.ImportEnabled", false);
ProjectKorra.plugin.saveConfig();
@ -132,7 +144,7 @@ public class ImportCommand extends PKCommand {
}
i++;
if (debugEnabled) {
System.out.println("[ProjectKorra] Successfully imported " + bPlayer.getName() + ". " + bPlayers.size() + " players left to import.");
System.out.println("[ProjectKorra] Successfully imported " + bPlayer.getName() + ". " + bPlayers.size() + " players left to import."); // not configurable because it's internal
}
}
}

View file

@ -3,6 +3,8 @@ package com.projectkorra.projectkorra.command;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import java.util.List;
/**
@ -11,7 +13,7 @@ import java.util.List;
public class InvincibleCommand extends PKCommand {
public InvincibleCommand() {
super("invincible", "/bending invincible", "This command will make you impervious to all Bending damage. Once you use this command, you will stay invincible until you log off or use this command again.", new String[] { "invincible", "inv" });
super("invincible", "/bending invincible", ConfigManager.languageConfig.get().getString("Commands.Invincible.Description"), new String[] { "invincible", "inv" });
}
@ -23,10 +25,10 @@ public class InvincibleCommand extends PKCommand {
if (!Commands.invincible.contains(sender.getName())) {
Commands.invincible.add(sender.getName());
sender.sendMessage(ChatColor.GREEN + "You are now invincible to all bending damage and effects. Use this command again to disable this.");
sender.sendMessage(ChatColor.GREEN + ConfigManager.languageConfig.get().getString("Commands.Invincible.ToggledOn"));
} else {
Commands.invincible.remove(sender.getName());
sender.sendMessage(ChatColor.RED + "You are no longer invincible to all bending damage and effects.");
sender.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Invincible.ToggledOff"));
}
}

View file

@ -13,6 +13,8 @@ import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.projectkorra.projectkorra.configuration.ConfigManager;
/**
* Abstract representation of a command executor. Implements
* {@link SubCommand}.
@ -21,6 +23,9 @@ import org.bukkit.entity.Player;
*
*/
public abstract class PKCommand implements SubCommand {
protected String noPermissionMessage, mustBePlayerMessage;
/**
* The full name of the command.
*/
@ -48,6 +53,10 @@ public abstract class PKCommand implements SubCommand {
this.properUse = properUse;
this.description = description;
this.aliases = aliases;
this.noPermissionMessage = ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.NoPermission");
this.mustBePlayerMessage = ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.MustBePlayer");
instances.put(name, this);
}
@ -86,7 +95,7 @@ public abstract class PKCommand implements SubCommand {
if (sender.hasPermission("bending.command." + name)) {
return true;
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to do that.");
sender.sendMessage(this.noPermissionMessage);
return false;
}
}
@ -104,7 +113,7 @@ public abstract class PKCommand implements SubCommand {
if (sender.hasPermission("bending.command." + name + "." + extra)) {
return true;
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to do that.");
sender.sendMessage(this.noPermissionMessage);
return false;
}
}
@ -139,7 +148,7 @@ public abstract class PKCommand implements SubCommand {
if (sender instanceof Player) {
return true;
} else {
sender.sendMessage(ChatColor.RED + "You must be a player to use that command.");
sender.sendMessage(this.mustBePlayerMessage);
return false;
}
}

View file

@ -2,6 +2,7 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent.Result;
@ -16,9 +17,21 @@ import java.util.List;
* Executor for /bending permaremove. Extends {@link PKCommand}.
*/
public class PermaremoveCommand extends PKCommand {
private String playerIsOffline;
private String restored;
private String restoredConfirm;
private String removed;
private String removedConfirm;
public PermaremoveCommand() {
super("permaremove", "/bending permaremove [Player]", "This command will permanently remove the Bending of the targeted <Player>. Once removed, a player may only receive Bending again if this command is run on them again. This command is typically reserved for administrators.", new String[] { "permaremove", "premove", "permremove", "pr" });
super("permaremove", "/bending permaremove [Player]", ConfigManager.languageConfig.get().getString("Commands.PermaRemove.Description"), new String[] { "permaremove", "premove", "permremove", "pr" });
this.playerIsOffline = ConfigManager.languageConfig.get().getString("Commands.PermaRemove.PlayerOffline");
this.restored = ConfigManager.languageConfig.get().getString("Commands.PermaRemove.Restored");
this.restoredConfirm = ConfigManager.languageConfig.get().getString("Commands.PermaRemove.RestoredConfirm");
this.removed = ConfigManager.languageConfig.get().getString("Commands.PermaRemove.Removed");
this.removedConfirm = ConfigManager.languageConfig.get().getString("Commands.PermaRemove.RemovedConfirm");
}
@Override
@ -42,7 +55,7 @@ public class PermaremoveCommand extends PKCommand {
private void permaremove(CommandSender sender, String target) {
Player player = Bukkit.getPlayer(target);
if (player == null) {
sender.sendMessage(ChatColor.RED + "That player is not online.");
sender.sendMessage(ChatColor.RED + this.playerIsOffline);
return;
}
@ -55,18 +68,18 @@ public class PermaremoveCommand extends PKCommand {
if (bPlayer.isPermaRemoved()) {
bPlayer.setPermaRemoved(false);
GeneralMethods.savePermaRemoved(bPlayer);
player.sendMessage(ChatColor.GREEN + "Your bending has been restored.");
player.sendMessage(ChatColor.GREEN + this.restored);
if (!(sender instanceof Player) || sender.getName().equals(target))
sender.sendMessage(ChatColor.GREEN + "You have restored the bending of: " + ChatColor.DARK_AQUA + player.getName());
sender.sendMessage(ChatColor.GREEN + this.restoredConfirm.replace("{target}", ChatColor.DARK_AQUA + player.getName() + ChatColor.GREEN));
} else {
bPlayer.getElements().clear();
GeneralMethods.saveElements(bPlayer);
bPlayer.setPermaRemoved(true);
GeneralMethods.savePermaRemoved(bPlayer);
GeneralMethods.removeUnusableAbilities(player.getName());
player.sendMessage(ChatColor.RED + "Your bending has been permanently removed.");
player.sendMessage(ChatColor.RED + this.removed);
if (!(sender instanceof Player) || sender.getName().equals(target))
sender.sendMessage(ChatColor.RED + "You have permenantly removed the bending of: " + ChatColor.DARK_AQUA + player.getName());
sender.sendMessage(ChatColor.RED + this.removedConfirm.replace("{target}", ChatColor.DARK_AQUA + player.getName() + ChatColor.RED));
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, player, null, Result.PERMAREMOVE));
}
}
@ -80,7 +93,7 @@ public class PermaremoveCommand extends PKCommand {
@Override
public boolean hasPermission(CommandSender sender) {
if (!sender.hasPermission("bending.admin.permaremove")) {
sender.sendMessage(ChatColor.RED + "You don't have permission to use this command.");
sender.sendMessage(super.noPermissionMessage);
return false;
}
return true;

View file

@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.util.MultiAbilityManager;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.object.Preset;
/**
@ -24,9 +25,39 @@ public class PresetCommand extends PKCommand {
private static final String[] deletealiases = { "delete", "d", "del" };
private static final String[] listaliases = { "list", "l" };
private static final String[] bindaliases = { "bind", "b" };
private String noPresets;
private String noPresetName;
private String deletePreset;
private String noPresetNameExternal;
private String bendingRemoved;
private String bound;
private String failedToBindAll;
private String bendingRemovedOther;
private String boundOtherConfirm;
private String succesfullyCopied;
private String reachedMax;
private String alreadyExists;
private String createdNewPreset;
private String cantEditBinds;
public PresetCommand() {
super("preset", "/bending preset create|bind|list|delete [name]", "This command manages Presets, which are saved bindings. Use /bending preset list to view your existing presets, use /bending [create|delete] [name] to manage your presets, and use /bending bind [name] to bind an existing preset.", new String[] { "preset", "presets", "pre", "set", "p" });
super("preset", "/bending preset create|bind|list|delete [name]", ConfigManager.languageConfig.get().getString("Commands.Preset.Description"), new String[] { "preset", "presets", "pre", "set", "p" });
this.noPresets = ConfigManager.languageConfig.get().getString("Commands.Preset.NoPresets");
this.noPresetName = ConfigManager.languageConfig.get().getString("Commands.Preset.NoPresetName");
this.deletePreset = ConfigManager.languageConfig.get().getString("Commands.Preset.Delete");
this.noPresetNameExternal = ConfigManager.languageConfig.get().getString("Commands.Preset.External.NoPresetName");
this.bendingRemoved = ConfigManager.languageConfig.get().getString("Commands.Preset.BendingPermanentlyRemoved");
this.bound = ConfigManager.languageConfig.get().getString("Commands.Preset.SuccesfullyBound");
this.failedToBindAll = ConfigManager.languageConfig.get().getString("Commands.Preset.FailedToBindAll");
this.bendingRemovedOther = ConfigManager.languageConfig.get().getString("Commands.Preset.Other.BendingPermanentlyRemoved");
this.boundOtherConfirm = ConfigManager.languageConfig.get().getString("Commands.Preset.Other.SuccesfullyBoundConfirm");
this.succesfullyCopied = ConfigManager.languageConfig.get().getString("Commands.Preset.SuccesfullyCopied");
this.reachedMax = ConfigManager.languageConfig.get().getString("Commands.Preset.MaxPresets");
this.alreadyExists = ConfigManager.languageConfig.get().getString("Commands.Preset.AlreadyExists");
this.createdNewPreset = ConfigManager.languageConfig.get().getString("Commands.Preset.Created");
this.cantEditBinds = ConfigManager.languageConfig.get().getString("Commands.Preset.CantEditBinds");
}
@SuppressWarnings("unchecked")
@ -35,7 +66,7 @@ public class PresetCommand extends PKCommand {
if (!isPlayer(sender) || !correctLength(sender, args.size(), 1, 3)) {
return;
} else if (MultiAbilityManager.hasMultiAbilityBound((Player) sender)) {
sender.sendMessage(ChatColor.RED + "You can't edit your binds right now!");
sender.sendMessage(this.cantEditBinds);
return;
}
@ -54,7 +85,7 @@ public class PresetCommand extends PKCommand {
List<String> presetNames = new ArrayList<String>();
if (presets == null || presets.isEmpty()) {
sender.sendMessage(ChatColor.RED + "You don't have any presets.");
sender.sendMessage(ChatColor.RED + this.noPresets);
return;
}
@ -62,7 +93,7 @@ public class PresetCommand extends PKCommand {
presetNames.add(preset.getName());
}
sender.sendMessage(ChatColor.GREEN + "Your Presets: " + ChatColor.DARK_AQUA + presetNames.toString());
sender.sendMessage(ChatColor.GREEN + "Presets: " + ChatColor.DARK_AQUA + presetNames.toString());
return;
} else {
help(sender, false);
@ -73,13 +104,13 @@ public class PresetCommand extends PKCommand {
String name = args.get(1);
if (Arrays.asList(deletealiases).contains(args.get(0)) && hasPermission(sender, "delete")) { //bending preset delete name
if (!Preset.presetExists(player, name)) {
sender.sendMessage(ChatColor.RED + "You don't have a preset with that name.");
sender.sendMessage(ChatColor.RED + this.noPresetName);
return;
}
Preset preset = Preset.getPreset(player, name);
preset.delete();
sender.sendMessage(ChatColor.GREEN + "You have deleted your preset named: " + ChatColor.YELLOW + name);
sender.sendMessage(ChatColor.GREEN + this.deletePreset.replace("{name}", ChatColor.YELLOW + preset.getName() + ChatColor.GREEN));
return;
} else if (Arrays.asList(bindaliases).contains(args.get(0)) && hasPermission(sender, "bind")) { //bending preset bind name
if (args.size() < 3) {
@ -90,23 +121,23 @@ public class PresetCommand extends PKCommand {
} else if (Preset.externalPresetExists(name) && hasPermission(sender, "bind.external")) {
boundAll = Preset.bindExternalPreset(player, name);
} else if (!Preset.externalPresetExists(name) && hasPermission(sender, "bind.external")) {
sender.sendMessage(ChatColor.RED + "No external preset with that name exists.");
sender.sendMessage(ChatColor.RED + this.noPresetNameExternal);
return;
} else if (bPlayer.isPermaRemoved()) {
player.sendMessage(ChatColor.RED + "Your bending was permanently removed.");
player.sendMessage(ChatColor.RED + this.bendingRemoved);
return;
} else {
sender.sendMessage(ChatColor.RED + "You don't have a preset with that name.");
sender.sendMessage(ChatColor.RED + this.noPresetName);
return;
}
sender.sendMessage(ChatColor.GREEN + "Your bound slots have been set to match the " + ChatColor.YELLOW + name + ChatColor.GREEN + " preset.");
sender.sendMessage(ChatColor.GREEN + bound.replace("{name}", ChatColor.YELLOW + name + ChatColor.GREEN));
if (!boundAll) {
sender.sendMessage(ChatColor.RED + "Some abilities were not bound because you cannot bend the required element.");
sender.sendMessage(ChatColor.RED + this.failedToBindAll);
}
} else if (hasPermission(sender, "bind.external.assign") && Preset.externalPresetExists(name)) {
if (!Preset.externalPresetExists(name)) {
sender.sendMessage(ChatColor.RED + "No external preset with that name exists.");
sender.sendMessage(ChatColor.RED + this.noPresetNameExternal);
return;
}
@ -119,23 +150,23 @@ public class PresetCommand extends PKCommand {
bPlayer2 = BendingPlayer.getBendingPlayer(player2);
}
if (bPlayer2.isPermaRemoved()) {
player.sendMessage(ChatColor.RED + "That players bending was permanently removed.");
player.sendMessage(ChatColor.RED + this.bendingRemovedOther);
return;
}
boolean boundAll = Preset.bindExternalPreset(player2, name);
sender.sendMessage(ChatColor.GREEN + "The bound slots of " + ChatColor.YELLOW + player2.getName() + ChatColor.GREEN + " have been set to match the " + ChatColor.YELLOW + name + ChatColor.GREEN + " preset.");
player2.sendMessage(ChatColor.GREEN + "Your bound slots have been set to match the " + ChatColor.YELLOW + name + ChatColor.GREEN + " preset.");
sender.sendMessage(ChatColor.GREEN + this.boundOtherConfirm.replace("{target}", ChatColor.YELLOW + player2.getName() + ChatColor.GREEN).replace("{name}", ChatColor.YELLOW + name + ChatColor.GREEN + ChatColor.YELLOW));
player2.sendMessage(ChatColor.GREEN + this.bound.replace("{name}", ChatColor.YELLOW + name + ChatColor.GREEN));
if (!boundAll) {
player2.sendMessage(ChatColor.RED + "Some abilities were not bound, either the preset contains invalid abilities or you cannot bend the required elements.");
player2.sendMessage(ChatColor.RED + this.failedToBindAll);
}
return;
} else {
sender.sendMessage(ChatColor.RED + "Player not found.");
sender.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Preset.PlayerNotFound"));
}
} else if (hasPermission(sender, "bind.assign") && Preset.presetExists(player, name)) {
if (!Preset.presetExists(player, name)) {
sender.sendMessage(ChatColor.RED + "You don't have a preset with that name.");
sender.sendMessage(ChatColor.RED + this.noPresetName);
return;
}
@ -148,30 +179,30 @@ public class PresetCommand extends PKCommand {
bPlayer2 = BendingPlayer.getBendingPlayer(player2);
}
if (bPlayer2.isPermaRemoved()) {
player.sendMessage(ChatColor.RED + "That players bending was permanently removed.");
player.sendMessage(ChatColor.RED + this.bendingRemovedOther);
return;
}
Preset preset = Preset.getPreset(player, name);
boolean boundAll = Preset.bindPreset(player2, preset);
sender.sendMessage(ChatColor.GREEN + "The bound slots of " + ChatColor.YELLOW + player2.getName() + ChatColor.GREEN + " have been set to match your " + ChatColor.YELLOW + name + ChatColor.GREEN + " preset.");
player2.sendMessage(ChatColor.GREEN + "Your bound slots have been set to match " + ChatColor.YELLOW + player.getName() + "'s " + name + ChatColor.GREEN + " preset.");
sender.sendMessage(ChatColor.GREEN + this.boundOtherConfirm.replace("{target}", ChatColor.YELLOW + player2.getName() + ChatColor.GREEN).replace("{name}", ChatColor.YELLOW + name + ChatColor.GREEN + ChatColor.YELLOW));
player2.sendMessage(ChatColor.GREEN + this.succesfullyCopied.replace("{target}", ChatColor.YELLOW + player.getName() + ChatColor.GREEN));
if (!boundAll) {
player2.sendMessage(ChatColor.RED + "Some abilities were not bound, either the preset contains invalid abilities or you cannot bend the required elements.");
player2.sendMessage(ChatColor.RED + this.failedToBindAll);
}
return;
} else {
sender.sendMessage(ChatColor.RED + "Player not found.");
sender.sendMessage(ChatColor.RED + ConfigManager.languageConfig.get().getString("Commands.Preset.PlayerNotFound"));
}
}
} else if (Arrays.asList(createaliases).contains(args.get(0)) && hasPermission(sender, "create")) { //bending preset create name
int limit = GeneralMethods.getMaxPresets(player);
if (Preset.presets.get(player) != null && Preset.presets.get(player).size() >= limit) {
sender.sendMessage(ChatColor.RED + "You have reached your max number of Presets.");
sender.sendMessage(ChatColor.RED + this.reachedMax);
return;
} else if (Preset.presetExists(player, name)) {
sender.sendMessage(ChatColor.RED + "A preset with that name already exists.");
sender.sendMessage(ChatColor.RED + this.alreadyExists);
return;
}
@ -182,7 +213,7 @@ public class PresetCommand extends PKCommand {
Preset preset = new Preset(player.getUniqueId(), name, abilities);
preset.save(player);
sender.sendMessage(ChatColor.GREEN + "Created preset with the name: " + ChatColor.YELLOW + name);
sender.sendMessage(ChatColor.GREEN + this.createdNewPreset.replace("{name}", ChatColor.YELLOW + name + ChatColor.GREEN));
} else {
help(sender, false);
}

View file

@ -1,6 +1,7 @@
package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -13,7 +14,7 @@ import java.util.List;
public class ReloadCommand extends PKCommand {
public ReloadCommand() {
super("reload", "/bending reload", "This command will reload the Bending config file.", new String[] { "reload", "r" });
super("reload", "/bending reload", ConfigManager.languageConfig.get().getString("Commands.Reload.Description"), new String[] { "reload", "r" });
}
@Override
@ -22,7 +23,7 @@ public class ReloadCommand extends PKCommand {
return;
}
GeneralMethods.reloadPlugin(sender);
sender.sendMessage(ChatColor.AQUA + "Bending config reloaded.");
sender.sendMessage(ChatColor.AQUA + ConfigManager.languageConfig.get().getString("Commands.Reload.SuccesfullyReloaded"));
}
}

View file

@ -3,6 +3,7 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent;
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent.Result;
@ -17,9 +18,22 @@ import java.util.List;
* Executor for /bending remove. Extends {@link PKCommand}.
*/
public class RemoveCommand extends PKCommand {
private String succesfullyRemovedElementSelf, wrongElementSelf, invalidElement, playerOffline, wrongElementTarget,
succesfullyRemovedElementTarget, succesfullyRemovedElementTargetConfirm, succesfullyRemovedAllElementsTarget, succesfullyRemovedAllElementsTargetConfirm;
public RemoveCommand() {
super("remove", "/bending remove <Player> [Element]", "This command will remove the element of the targeted [Player]. The player will be able to re-pick their element after this command is run on them, assuming their Bending was not permaremoved.", new String[] { "remove", "rm" });
super("remove", "/bending remove <Player> [Element]", ConfigManager.languageConfig.get().getString("Commands.Remove.Description"), new String[] { "remove", "rm" });
this.succesfullyRemovedAllElementsTarget = ConfigManager.languageConfig.get().getString("Commands.Remove.Other.RemovedAllElements");
this.succesfullyRemovedAllElementsTargetConfirm = ConfigManager.languageConfig.get().getString("Commands.Remove.Other.RemovedAllElementsConfirm");
this.succesfullyRemovedElementTarget = ConfigManager.languageConfig.get().getString("Commands.Remove.Other.RemovedElement");
this.succesfullyRemovedElementTargetConfirm = ConfigManager.languageConfig.get().getString("Commands.Remove.Other.RemovedElementConfirm");
this.succesfullyRemovedElementSelf = ConfigManager.languageConfig.get().getString("Commands.Remove.RemovedElement");
this.invalidElement = ConfigManager.languageConfig.get().getString("Commands.Remove.InvalidElement");
this.wrongElementSelf = ConfigManager.languageConfig.get().getString("Commands.Remove.WrongElement");
this.wrongElementTarget = ConfigManager.languageConfig.get().getString("Commands.Remove.Other.WrongElement");
this.playerOffline = ConfigManager.languageConfig.get().getString("Commands.Remove.PlayerOffline");
}
@Override
@ -40,19 +54,19 @@ public class RemoveCommand extends PKCommand {
GeneralMethods.saveElements(senderBPlayer);
GeneralMethods.removeUnusableAbilities(sender.getName());
sender.sendMessage(e.getColor() + "You have removed your " + e.getName() + e.getType().getBending() + ".");
sender.sendMessage(e.getColor() + succesfullyRemovedElementSelf.replace("{element}", e.getName()));
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, (Player) sender, e, Result.REMOVE));
return;
} else {
sender.sendMessage(ChatColor.RED + "You do not have that element!");
sender.sendMessage(ChatColor.RED + wrongElementSelf);
return;
}
} else {
sender.sendMessage(ChatColor.RED + "That is not a valid element!");
sender.sendMessage(ChatColor.RED + invalidElement);
return;
}
}
sender.sendMessage(ChatColor.RED + "That player is not online.");
sender.sendMessage(ChatColor.RED + playerOffline);
return;
}
@ -65,14 +79,14 @@ public class RemoveCommand extends PKCommand {
Element e = Element.fromString(args.get(1));
if (e != null) {
if (!bPlayer.hasElement(e)) {
sender.sendMessage(ChatColor.DARK_RED + "Targeted player does not have that element");
sender.sendMessage(ChatColor.DARK_RED + wrongElementTarget);
return;
}
bPlayer.getElements().remove(e);
GeneralMethods.saveElements(bPlayer);
GeneralMethods.removeUnusableAbilities(player.getName());
sender.sendMessage(e.getColor() + "You have removed the " + e.getName() + e.getType().getBending() + " of " + ChatColor.DARK_AQUA + player.getName());
sender.sendMessage(e.getColor() + "Your " + e.getName() + e.getType().getBending() + " has been removed by " + ChatColor.DARK_AQUA + player.getName());
sender.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;
}
@ -80,8 +94,8 @@ public class RemoveCommand extends PKCommand {
bPlayer.getElements().clear();
GeneralMethods.saveElements(bPlayer);
GeneralMethods.removeUnusableAbilities(player.getName());
sender.sendMessage(ChatColor.YELLOW + "You have removed the bending of " + ChatColor.DARK_AQUA + player.getName());
player.sendMessage(ChatColor.YELLOW + "Your bending has been removed by " + ChatColor.DARK_AQUA + sender.getName());
sender.sendMessage(ChatColor.YELLOW + this.succesfullyRemovedAllElementsTargetConfirm.replace("{sender}", ChatColor.DARK_AQUA + player.getName() + ChatColor.YELLOW));
player.sendMessage(ChatColor.YELLOW + this.succesfullyRemovedAllElementsTarget.replace("{sender}", ChatColor.DARK_AQUA + sender.getName() + ChatColor.YELLOW));
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, player, null, Result.REMOVE));
}
}
@ -97,7 +111,7 @@ public class RemoveCommand extends PKCommand {
if (sender.hasPermission("bending.admin." + getName())) {
return true;
}
sender.sendMessage(ChatColor.RED + "You don't have permission to use this command.");
sender.sendMessage(super.noPermissionMessage);
return false;
}
}

View file

@ -3,10 +3,12 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.util.List;
@ -15,9 +17,35 @@ import java.util.List;
* Executor for /bending toggle. Extends {@link PKCommand}.
*/
public class ToggleCommand extends PKCommand {
private String toggledOffForAll, toggleOffSelf, toggleOnSelf, toggleOffAll, toggleOnAll,
toggledOffSingleElement, toggledOnSingleElement, wrongElementOther, toggledOnOtherElementConfirm,
toggledOffOtherElementConfirm, toggledOnOtherElement, toggledOffOtherElement, wrongElement, notFound;
//config.addDefault("Commands.Toggle.Other.ToggledOnElementConfirm", "You've toggled on {target}'s {element}");
//config.addDefault("Commands.Toggle.Other.ToggledOffElementConfirm", "You've toggled off {target}'s {element}");
//config.addDefault("Commands.Toggle.Other.ToggledOnElementConfirm", "Your {element} has been toggled on by {sender}.");
//config.addDefault("Commands.Toggle.Other.ToggledOffElementConfirm", "Your {element} has been toggled off by {sender}.");
public ToggleCommand() {
super("toggle", "/bending toggle <all | (element) <player>>", "This command will toggle a player's own Bending on or off. If toggled off, all abilities should stop working until it is toggled back on. Logging off will automatically toggle your Bending back on. If you run the command /bending toggle all, Bending will be turned off for all players and cannot be turned back on until the command is run again.", new String[] { "toggle", "t" });
super("toggle", "/bending toggle <all | (element) <player>>", ConfigManager.languageConfig.get().getString("Commands.Toggle.Description"), new String[] { "toggle", "t" });
FileConfiguration c = ConfigManager.languageConfig.get();
this.toggledOffForAll = c.getString("Commands.Toggle.All.ToggledOffForAll");
this.toggleOffSelf = c.getString("Commands.Toggle.ToggledOff");
this.toggleOnSelf = c.getString("Commands.Toggle.ToggledOn");
this.toggleOffAll = c.getString("Commands.Toggle.All.ToggleOff");
this.toggleOnAll = c.getString("Commands.Toggle.All.ToggleOn");
this.toggledOffSingleElement = c.getString("Commands.Toggle.ToggleOffSingleElement");
this.toggledOnSingleElement = c.getString("Commands.Toggle.ToggleOnSingleElement");
this.wrongElementOther = c.getString("Commands.Toggle.Other.WrongElement");
this.toggledOnOtherElementConfirm = c.getString("Commands.Toggle.Other.ToggledOnElementConfirm");
this.toggledOffOtherElementConfirm = c.getString("Commands.Toggle.Other.ToggledOffElementConfirm");
this.toggledOnOtherElement = c.getString("Commands.Toggle.Other.ToggledOnElementByOther");
this.toggledOffOtherElement = c.getString("Commands.Toggle.Other.ToggledOffElementByOther");
this.wrongElement = c.getString("Commands.Toggle.WrongElement");
this.notFound = c.getString("Commands.Toggle.Other.PlayerNotFound");
}
@Override
@ -29,7 +57,7 @@ public class ToggleCommand extends PKCommand {
return;
}
if (Commands.isToggledForAll) {
sender.sendMessage(ChatColor.RED + "Bending is currently toggled off for all players.");
sender.sendMessage(ChatColor.RED + toggledOffForAll);
return;
}
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(sender.getName());
@ -38,10 +66,10 @@ public class ToggleCommand extends PKCommand {
bPlayer = BendingPlayer.getBendingPlayer(sender.getName());
}
if (bPlayer.isToggled()) {
sender.sendMessage(ChatColor.RED + "Your bending has been toggled off. You will not be able to use most abilities until you toggle it back.");
sender.sendMessage(ChatColor.RED + toggleOffSelf);
bPlayer.toggleBending();
} else {
sender.sendMessage(ChatColor.GREEN + "You have turned your Bending back on.");
sender.sendMessage(ChatColor.GREEN + toggleOnSelf);
bPlayer.toggleBending();
}
} else if (args.size() == 1 ) {
@ -49,22 +77,22 @@ public class ToggleCommand extends PKCommand {
if (Commands.isToggledForAll) { // Bending is toggled off for all players.
Commands.isToggledForAll = false;
for (Player player : Bukkit.getOnlinePlayers()) {
player.sendMessage(ChatColor.GREEN + "Bending has been toggled back on for all players.");
player.sendMessage(ChatColor.GREEN + toggleOnAll);
}
if (!(sender instanceof Player))
sender.sendMessage(ChatColor.GREEN + "Bending has been toggled back on for all players.");
sender.sendMessage(ChatColor.GREEN + toggleOnAll);
} else {
Commands.isToggledForAll = true;
for (Player player : Bukkit.getOnlinePlayers()) {
player.sendMessage(ChatColor.RED + "Bending has been toggled off for all players.");
player.sendMessage(ChatColor.RED + toggleOffAll);
}
if (!(sender instanceof Player))
sender.sendMessage(ChatColor.RED + "Bending has been toggled off for all players.");
sender.sendMessage(ChatColor.RED + toggleOffAll);
}
} else if (sender instanceof Player && args.size() == 1
&& Element.fromString(args.get(0)) != null) {
if (!BendingPlayer.getBendingPlayer(sender.getName()).hasElement(Element.fromString(args.get(0)))) {
sender.sendMessage(ChatColor.RED + "You do not have that element.");
sender.sendMessage(ChatColor.RED + wrongElement);
return;
}
Element e = Element.fromString(args.get(0));
@ -73,9 +101,9 @@ public class ToggleCommand extends PKCommand {
bPlayer.toggleElement(e);
if (bPlayer.isElementToggled(e)) {
sender.sendMessage(color + "You have toggled on your " + e.getName() + (e.getType() != null ? e.getType().getBending() : "") + ".");
sender.sendMessage(color + toggledOnSingleElement.replace("{element}", e.getName() + (e.getType() != null ? e.getType().getBending() : "")));
} else {
sender.sendMessage(color + "You have toggled off your " + e.getName() + (e.getType() != null ? e.getType().getBending() : "") + ".");
sender.sendMessage(color + toggledOffSingleElement.replace("{element}", e.getName() + (e.getType() != null ? e.getType().getBending() : "")));
}
}
} else if (sender instanceof Player && args.size() == 2
@ -83,33 +111,23 @@ public class ToggleCommand extends PKCommand {
Player target = Bukkit.getPlayer(args.get(1));
if (!hasAdminPermission(sender)) return;
if (target == null) {
sender.sendMessage(ChatColor.RED + "Target is not found.");
sender.sendMessage(ChatColor.RED + notFound);
return;
}
if (!BendingPlayer.getBendingPlayer(target.getName()).hasElement(Element.fromString(args.get(0)))) {
sender.sendMessage(ChatColor.DARK_AQUA + target.getName() + ChatColor.RED + " doesn't have that element.");
sender.sendMessage(ChatColor.RED + wrongElementOther.replace("{target}", ChatColor.DARK_AQUA + target.getName() + ChatColor.RED));
return;
}
Element e = Element.fromString(args.get(0));
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(target.getName());
ChatColor color = e != null ? e.getColor() : null;
if (bPlayer.isElementToggled(e) == true) {
if (e == Element.CHI) {
sender.sendMessage(color + "You have toggled off " + ChatColor.DARK_AQUA + target.getName() + "'s chiblocking");
target.sendMessage(color + "Your chiblocking has been toggled off by " + ChatColor.DARK_AQUA + sender.getName());
} else {
sender.sendMessage(color + "You have toggled off " + ChatColor.DARK_AQUA + target.getName() + "'s " + getElement(args.get(0)).toLowerCase() + "bending");
target.sendMessage(color + "Your " + getElement(args.get(0)).toLowerCase() + "bending has been toggled off by " + ChatColor.DARK_AQUA + sender.getName());
}
if (bPlayer.isElementToggled(e)) {
sender.sendMessage(color + this.toggledOffOtherElementConfirm.replace("{target}", target.getName()).replace("{element}", e.getName()));
target.sendMessage(color + this.toggledOffOtherElement.replace("{element}", e.getName()).replace("{sender}", ChatColor.DARK_AQUA + sender.getName()));
} else {
if (e == Element.CHI) {
sender.sendMessage(color + "You have toggled on " + ChatColor.DARK_AQUA + target.getName() + "'s chiblocking");
target.sendMessage(color + "Your chiblocking has been toggled on by " + ChatColor.DARK_AQUA + sender.getName());
} else {
sender.sendMessage(color + "You have toggled on " + ChatColor.DARK_AQUA + target.getName() + "'s " + getElement(args.get(0)).toLowerCase() + "bending");
target.sendMessage(color + "Your " + getElement(args.get(0)).toLowerCase() + "bending has been toggled on by " + ChatColor.DARK_AQUA + sender.getName());
}
sender.sendMessage(color + this.toggledOnOtherElementConfirm.replace("{target}", target.getName()).replace("{element}", e.getName()));
target.sendMessage(color + this.toggledOnOtherElement.replace("{element}", e.getName()).replace("{sender}", ChatColor.DARK_AQUA + sender.getName()));
}
bPlayer.toggleElement(e);
} else {
@ -119,7 +137,7 @@ public class ToggleCommand extends PKCommand {
public boolean hasAdminPermission(CommandSender sender) {
if (!sender.hasPermission("bending.admin.toggle")) {
sender.sendMessage(ChatColor.RED + "You don't have permission to do that.");
sender.sendMessage(super.noPermissionMessage);
return false;
}
return true;

View file

@ -2,6 +2,7 @@ package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -14,7 +15,7 @@ import java.util.List;
public class VersionCommand extends PKCommand {
public VersionCommand() {
super("version", "/bending version", "Displays the installed version of ProjectKorra.", new String[] { "version", "v" });
super("version", "/bending version", ConfigManager.languageConfig.get().getString("Commands.Version.Description"), new String[] { "version", "v" });
}
@Override

View file

@ -1,13 +1,10 @@
package com.projectkorra.projectkorra.command;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.Element.ElementType;
import com.projectkorra.projectkorra.Element.SubElement;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.rpg.RPGMethods;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -16,11 +13,15 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.Element.ElementType;
import com.projectkorra.projectkorra.Element.SubElement;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.rpg.RPGMethods;
/**
* Executor for /bending who. Extends {@link PKCommand}.
@ -29,11 +30,17 @@ public class WhoCommand extends PKCommand {
/**
* Map storage of all ProjectKorra staffs' UUIDs and titles
*/
Map<String, String> staff = new HashMap<String, String>();
Map<String, String> staff = new HashMap<String, String>(), playerInfoWords = new HashMap<String, String>();
private String databaseOverload, noPlayersOnline, playerOffline;
public WhoCommand() {
super("who", "/bending who [Player/Page]", "This command will tell you what element all players that are online are (If you don't specify a player) or give you information about the player that you specify.", new String[] { "who", "w" });
super("who", "/bending who [Player/Page]", ConfigManager.languageConfig.get().getString("Commands.Who.Description"), new String[] { "who", "w" });
databaseOverload = ConfigManager.languageConfig.get().getString("Commands.Who.DatabaseOverload");
noPlayersOnline = ConfigManager.languageConfig.get().getString("Commands.Who.NoPlayersOnline");
playerOffline = ConfigManager.languageConfig.get().getString("Commands.Who.PlayerOffline");
staff.put("8621211e-283b-46f5-87bc-95a66d68880e", ChatColor.RED + "ProjectKorra Founder"); // MistPhizzle
staff.put("a197291a-cd78-43bb-aa38-52b7c82bc68c", ChatColor.DARK_PURPLE + "ProjectKorra Lead Developer"); // OmniCypher
@ -106,7 +113,7 @@ public class WhoCommand extends PKCommand {
players.add(result);
}
if (players.isEmpty()) {
sender.sendMessage(ChatColor.RED + "There is no one online.");
sender.sendMessage(ChatColor.RED + noPlayersOnline);
} else {
for (String s : getPage(players, ChatColor.GOLD + "Players:", page, true)) {
sender.sendMessage(s);
@ -132,7 +139,7 @@ public class WhoCommand extends PKCommand {
return;
}
if (!player.isOnline() && !BendingPlayer.getPlayers().containsKey(player.getUniqueId())) {
sender.sendMessage(player.getName() + ChatColor.GRAY + " is currently offline. A lookup is currently being done (this might take a few seconds).");
sender.sendMessage(ChatColor.GRAY + playerOffline.replace("{player}", ChatColor.WHITE + player.getName() + ChatColor.GRAY));
}
Player player_ = (Player) (player.isOnline() ? player : null);
@ -147,7 +154,7 @@ public class WhoCommand extends PKCommand {
final long delay = 200L;
while (!BendingPlayer.getPlayers().containsKey(player.getUniqueId())) {
if (count > 5 * (1000 / delay)) { //After 5 seconds of waiting, tell the user the database is busy and to try again in a few seconds.
sender.sendMessage(ChatColor.DARK_RED + "The database appears to busy at the moment. Please wait a few seconds and try again.");
sender.sendMessage(ChatColor.DARK_RED + databaseOverload);
break;
}
count++;
@ -156,7 +163,7 @@ public class WhoCommand extends PKCommand {
}
catch (InterruptedException e) {
e.printStackTrace();
sender.sendMessage(ChatColor.DARK_RED + "The database appears to busy at the moment. Please wait a few seconds and try again.");
sender.sendMessage(ChatColor.DARK_RED + databaseOverload);
break;
}
}

View file

@ -10,14 +10,17 @@ public class ConfigManager {
public static Config presetConfig;
public static Config deathMsgConfig;
public static Config defaultConfig;
public static Config languageConfig;
public ConfigManager() {
presetConfig = new Config(new File("presets.yml"));
deathMsgConfig = new Config(new File("deathmessages.yml"));
defaultConfig = new Config(new File("config.yml"));
languageConfig = new Config(new File("language.yml"));
configCheck(ConfigType.DEFAULT);
configCheck(ConfigType.DEATH_MESSAGE);
configCheck(ConfigType.LANGUAGE);
configCheck(ConfigType.PRESETS);
configCheck(ConfigType.DEATH_MESSAGE);
}
public static void configCheck(ConfigType type) {
@ -41,57 +44,282 @@ public class ConfigManager {
presetConfig.save();
} else if (type == ConfigType.DEATH_MESSAGE) {
config = deathMsgConfig.get();
config.addDefault("Properties.Enabled", true);
config.addDefault("Properties.Default", "{victim} was slain by {attacker}'s {ability}");
config.addDefault("Air.AirBlast", "{victim} was flung by {attacker}'s {ability}");
config.addDefault("Air.AirBurst", "{victim} was thrown down by {attacker}'s {ability}");
config.addDefault("Air.AirSwipe", "{victim} was struck by {attacker}'s {ability}");
config.addDefault("Air.Suffocate", "{victim} was asphyxiated by {attacker}'s {ability}");
config.addDefault("Water.IceBlast", "{victim} was shattered by {attacker}'s {ability}");
config.addDefault("Water.Torrent", "{victim} was taken down by {attacker}'s {ability}");
config.addDefault("Water.IceSpike", "{victim} was impaled by {attacker}'s {ability}");
config.addDefault("Water.WaterManipulation", "{victim} was taken down by {attacker}'s {ability}");
config.addDefault("Water.WaterArmsPunch", "{victim} was too slow for {attacker}'s {ability}");
config.addDefault("Water.WaterArmsFreeze", "{victim} was frozen by {attacker}'s {ability}");
config.addDefault("Water.WaterArmsSpear", "{victim} was speared to death by {attacker}'s {ability}");
config.addDefault("Water.OctopusForm", "{victim} was slapped by {attacker}'s {ability}");
config.addDefault("Water.Bloodbending", "{victim} was destroyed by {attacker}'s {ability}");
config.addDefault("Earth.Collapse", "{victim} was suffocated by {attacker}'s {ability}");
config.addDefault("Earth.EarthBlast", "{victim} was broken apart by {attacker}'s {ability}");
config.addDefault("Earth.EarthSmash", "{victim} was crushed by {attacker}'s {ability}");
config.addDefault("Earth.LavaFlow", "{victim} was caught in by {attacker}'s {ability}");
config.addDefault("Earth.MetalClips", "{victim} was too slow for {attacker}'s {ability}");
config.addDefault("Earth.Shockwave", "{victim} was blown away by {attacker}'s {ability}");
config.addDefault("Fire.FireBlast", "{victim} was burnt by {attacker}'s {ability}");
config.addDefault("Fire.Blaze", "{victim} was burned alive by {attacker}'s {ability}");
config.addDefault("Fire.WallOfFire", "{victim} ran into {attacker}'s {ability}");
config.addDefault("Fire.Lightning", "{victim} was electrocuted by {attacker}'s {ability}");
config.addDefault("Fire.Combustion", "{victim} was shot down by {attacker}'s {ability}");
config.addDefault("Fire.FireBurst", "{victim} was blown apart by {attacker}'s {ability}");
config.addDefault("Fire.FireShield", "{victim} scorched theirself on {attacker}'s {ability}");
config.addDefault("Chi.QuickStrike", "{victim} was struck down by {attacker}'s {ability}");
config.addDefault("Chi.SwiftKick", "{victim} was kicked to the floor by {attacker}'s {ability}");
config.addDefault("Chi.RapidPunch", "{victim} took all the hits against {attacker}'s {ability}");
config.addDefault("Combo.AirSweep", "{victim} was swept away by {attacker}'s {ability}");
config.addDefault("Combo.FireKick", "{victim} was kicked to the floor with flames by {attacker}'s {ability}");
config.addDefault("Combo.FireSpin", "{victim} was caught in {attacker}'s {ability} inferno");
config.addDefault("Combo.JetBlaze", "{victim} was blasted away by {attacker}'s {ability}");
config.addDefault("Combo.FireWheel", "{victim} was incinerated by {attacker}'s {ability}");
config.addDefault("Combo.IceBullets", "{victim}'s heart was frozen by {attacker}'s {ability}");
// TODO: remove DeathMessage.yml ?
config.addDefault("HorizontalVelocity.AirBlast","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("HorizontalVelocity.AirBurst","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("HorizontalVelocity.AirSuction","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("HorizontalVelocity.Bloodbending","{victim} experienced kinetic damage by {attacker}'s {ability}");
deathMsgConfig.save();
} else if (type == ConfigType.LANGUAGE) {
config = languageConfig.get();
config.addDefault("DeathMessages.Enabled", true);
config.addDefault("DeathMessages.Default", "{victim} was slain by {attacker}'s {ability}");
config.addDefault("Abilities.Avatar.AvatarState.Description", "The signature ability of the Avatar, this is a toggle. Click to activate to become " + "nearly unstoppable. While in the Avatar State, the user takes severely reduced damage from " + "all sources, regenerates health rapidly, and is granted extreme speed. Nearly all abilities " + "are incredibly amplified in this state. Additionally, AirShield and FireJet become toggle-able " + "abilities and last until you deactivate them or the Avatar State. Click again with the Avatar " + "State selected to deactivate it.");
config.addDefault("Abilities.Air.AirBlast.Description", "AirBlast is the most fundamental bending technique of an airbender." + " To use, simply left-click in a direction. A gust of wind will be" + " created at your fingertips, launching anything in its path harmlessly back." + " A gust of air can extinguish fires on the ground or on a player, can cool lava, and " + "can flip levers and activate buttons. Additionally, tapping sneak will change the " + "origin of your next AirBlast to your targeted location.");
config.addDefault("Abilities.Air.AirBlast.DeathMessage", "{victim} was flung by {attacker}'s {ability}");
config.addDefault("Abilities.Air.AirBlast.HorizontalVelocityDeath","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("Abilities.Air.AirBubble.Description", "To use, the bender must hold down sneak. All water around the user in a small bubble will vanish, replacing itself once the user either gets too far away or selects a different ability.");
config.addDefault("Abilities.Air.AirBurst.Description", "AirBurst is one of the most powerful abilities in the airbender's arsenal. " + "To use, press and hold sneak to charge your burst. " + "Once charged, you can either release sneak to release the burst in a sphere around you " + "or click to launch a cone-shaped burst of air in front of you. " + "Additionally, having this ability selected when you land on the ground from a " + "large enough fall will create a burst of air around you.");
config.addDefault("Abilities.Air.AirBurst.DeathMessage", "{victim} was thrown down by {attacker}'s {ability}");
config.addDefault("Abilities.Air.AirBurst.HorizontalVelocityDeath","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("Abilities.Air.AirScooter.Description", "AirScooter is a fast means of transportation. To use, sprint, jump then click with " + "this ability selected. You will hop on a scooter of air and be propelled forward " + "in the direction you're looking (you don't need to press anything). " + "This ability can be used to levitate above liquids, but it cannot go up steep slopes. " + "Any other actions will deactivate this ability.");
config.addDefault("Abilities.Air.Tornado.Description", "To use, simply sneak (default: shift). " + "This will create a swirling vortex at the targeted location. " + "Any creature or object caught in the vortex will be launched up " + "and out in some random direction. If another player gets caught " + "in the vortex, the launching effect is minimal. Tornado can " + "also be used to transport the user. If the user gets caught in his/her " + "own tornado, his movements are much more manageable. Provided the user doesn't " + "fall out of the vortex, it will take him to a maximum height and move him in " + "the general direction he's looking. Skilled airbenders can scale anything " + "with this ability.");
config.addDefault("Abilities.Air.AirShield.Description", "Air Shield is one of the most powerful defensive techniques in existence. " + "To use, simply sneak (default: shift). " + "This will create a whirlwind of air around the user, " + "with a small pocket of safe space in the center. " + "This wind will deflect all projectiles and will prevent any creature from " + "entering it for as long as its maintained.");
config.addDefault("Abilities.Air.AirSpout.Description", "This ability gives the airbender limited sustained levitation. It is a " + "toggle - click to activate and form a whirling spout of air " + "beneath you, lifting you up. You can bend other abilities while using AirSpout. " + "Click again to deactivate this ability.");
config.addDefault("Abilities.Air.AirSuction.Description", "To use, simply left-click in a direction. A gust of wind will originate as far as it can in that direction and flow towards you, sucking anything in its path harmlessly with it. Skilled benders can use this technique to pull items from precarious locations. Additionally, tapping sneak will change the origin of your next AirSuction to your targeted location.");
config.addDefault("Abilities.Air.AirSuction.HorizontalVelocityDeath","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("Abilities.Air.AirSwipe.Description", "To use, simply left-click in a direction. An arc of air will flow from you towards that direction, cutting and pushing back anything in its path. Its damage is minimal, but it still sends the message. This ability will extinguish fires, cool lava, and cut things like grass, mushrooms, and flowers. Additionally, you can charge it by holding sneak. Charging before attacking will increase damage and knockback, up to a maximum.");
config.addDefault("Abilities.Air.AirSwipe.DeathMessage", "{victim} was struck by {attacker}'s {ability}");
config.addDefault("Abilities.Air.Flight.Description", "Jump in the air, crouch (default: shift) and hold with this ability bound and you will glide around in the direction you look. While flying, click to Hover. Click again to disable Hovering.");
config.addDefault("Abilities.Air.Suffocate.Description", "This ability is one of the most dangerous abilities an Airbender possesses. To use, simply look at an entity and hold shift. The entity will begin taking damage as you extract the air from their lungs. Any bender caught in this sphere will only be able to use basic moves, such as AirSwipe, WaterManipulation, FireBlast, or EarthBlast. An entity can be knocked out of the sphere by certain bending arts, and your attention will be disrupted if you are hit by bending.");
config.addDefault("Abilities.Air.Suffocate.DeathMessage", "{victim} was asphyxiated by {attacker}'s {ability}");
config.addDefault("Abilities.Air.Combo.AirSweep.DeathMessage", "{victim} was swept away by {attacker}'s {ability}");
config.addDefault("Abilities.Water.Bloodbending.Description", "This ability was made illegal for a reason. With this ability selected, sneak while " + "targetting something and you will bloodbend that target. Bloodbent targets cannot move, " + "bend or attack. You are free to control their actions by looking elsewhere - they will " + "be forced to move in that direction. Additionally, clicking while bloodbending will " + "launch that target off in the direction you're looking. " + "People who are capable of bloodbending are immune to your technique, and you are immune to theirs.");
config.addDefault("Abilities.Water.Bloodbending.DeathMessage", "{victim} was destroyed by {attacker}'s {ability}");
config.addDefault("Abilities.Water.Bloodbending.HorizontalVelocityDeath","{victim} experienced kinetic damage by {attacker}'s {ability}");
config.addDefault("Abilities.Water.HealingWaters.Description", "To use, the bender must be at least partially submerged in water. " + "If the user is not sneaking, this ability will automatically begin " + "working provided the user has it selected. If the user is sneaking, " + "he/she is channeling the healing to their target in front of them. " + "In order for this channel to be successful, the user and the target must " + "be at least partially submerged in water.");
config.addDefault("Abilities.Water.IceBlast.Description", "This ability offers a powerful ice utility for Waterbenders. It can be used to fire an explosive burst of ice at an opponent, spraying ice and snow around it. To use, simply tap sneak (Default: Shift) while targeting a block of ice to select it as a source. From there, you can just left click to send the blast off at your opponent.");
config.addDefault("Abilities.Water.IceBlast.DeathMessage", "{victim} was shattered by {attacker}'s {ability}");
config.addDefault("Abilities.Water.IceSpike.Description", "This ability has many functions. Clicking while targetting ice, or an entity over some ice, " + "will raise a spike of ice up, damaging and slowing the target. Tapping sneak (shift) while" + " selecting a water source will select that source that can then be fired with a click. Firing" + " this will launch a spike of ice at your target, dealing a bit of damage and slowing the target. " + "If you sneak (shift) while not selecting a source, many ice spikes will erupt from around you, " + "damaging and slowing those targets.");
config.addDefault("Abilities.Water.IceSpike.DeathMessage", "{victim} was impaled by {attacker}'s {ability}");
config.addDefault("Abilities.Water.OctopusForm.Description", "This ability allows the waterbender to manipulate a large quantity of water into a form resembling that of an octopus. " + "To use, click to select a water source. Then, hold sneak to channel this ability. " + "While channeling, the water will form itself around you and has a chance to block incoming attacks. " + "Additionally, you can click while channeling to attack things near you, dealing damage and knocking them back. " + "Releasing shift at any time will dissipate the form.");
config.addDefault("Abilities.Water.OctopusForm.DeathMessage", "{victim} was slapped by {attacker}'s {ability}");
config.addDefault("Abilities.Water.PhaseChange.Description", "To use, simply left-click. " + "Any water you are looking at within range will instantly freeze over into solid ice. " + "Provided you stay within range of the ice and do not unbind FreezeMelt, " + "that ice will not thaw. If, however, you do either of those the ice will instantly thaw. " + "If you sneak (default: shift), anything around where you are looking at will instantly melt. " + "Since this is a more favorable state for these things, they will never re-freeze unless they " + "would otherwise by nature or some other bending ability. Additionally, if you tap sneak while " + "targetting water with FreezeMelt, it will evaporate water around that block that is above " + "sea level. ");
config.addDefault("Abilities.Water.PlantArmor.Description", "PlantArmor is a defensive ability in the arsenal of the plantbender. Clicking on leaves with this ability will temporarily clad you in strong armor made out of plants! You can use this defensively, but you can also use the armor as a source for other plantbending skills.");
config.addDefault("Abilities.Water.Surge.Description", "This ability has two distinct features. If you sneak to select a source block, you can then click in a direction and a large wave will be launched in that direction. If you sneak again while the wave is en route, the wave will freeze the next target it hits. If, instead, you click to select a source block, you can hold sneak to form a wall of water at your cursor location. Click to shift between a water wall and an ice wall. Release sneak to dissipate it.");
config.addDefault("Abilities.Water.Torrent.Description", "Torrent is one of the strongest moves in a waterbender's arsenal. To use, first click a source block to select it; then hold shift to begin streaming the water around you. Water flowing around you this way will damage and knock back nearby enemies and projectiles. If you release shift during this, you will create a large wave that expands outwards from you, launching anything in its path back. Instead, if you click you release the water and channel it to flow towards your cursor. Anything caught in the blast will be tossed about violently and take damage. Finally, if you click again when the water is torrenting, it will freeze the area around it when it is obstructed.");
config.addDefault("Abilities.Water.Torrent.DeathMessage", "{victim} was taken down by {attacker}'s {ability}");
config.addDefault("Abilities.Water.WaterArms.Description", "One of the most diverse moves in a Waterbender's arsenal, this move creates tendrils " + "of water from the players arms to emulate their actual arms. Each water arms mode will be binded to a slot, switch slots to change mode. " + "To deactive the arms, hold Sneak and Double Left-Click." + "\nPull - Use your Arms to pull blocks, items, mobs or even players towards you!" + "\nPunch - An offensive attack, harming players or mobs!" + "\nGrapple - Scale walls and speed across battlefields, using your Arms as a grappling hook!" + "\nGrab - Grab an entity with your arm, and swing them about!" + "\nFreeze - Use your Arms to fire small blasts of ice in any direction!" + "\nSpear - Throw your Arms in any direction, freezing whatever it hits!");
config.addDefault("Abilities.Water.WaterArms.SneakMessage", "Active Ability:");
config.addDefault("Abilities.Water.WaterArms.Punch.Description", "{victim} was too slow for {attacker}'s {ability}");
config.addDefault("Abilities.Water.WaterArms.Freeze.Description", "{victim} was frozen by {attacker}'s {ability}");
config.addDefault("Abilities.Water.WaterArms.Spear.Description", "{victim} was speared to death by {attacker}'s {ability}");
config.addDefault("Abilities.Water.WaterBubble.Description", "To use, the bender must hold down sneak. All water around the user in a small bubble will vanish, replacing itself once the user either gets too far away or selects a different ability.");
config.addDefault("Abilities.Water.WaterManipulation.Description", "To use, place your cursor over a waterbendable object and tap sneak (default: shift). Smoke will appear where you've selected, indicating the origin of your ability. After you have selected an origin, simply left-click in any direction and you will see your water spout off in that direction, slicing any creature in its path. If you look towards a creature when you use this ability, it will target that creature. A collision from Water Manipulation both knocks the target back and deals some damage. Alternatively, if you have the source selected and tap shift again, you will be able to control the water more directly.");
config.addDefault("Abilities.Water.WaterManipulation.DeathMessage", "{victim} was taken down by {attacker}'s {ability}");
config.addDefault("Abilities.Water.WaterSpout.Description", "This ability provides a Waterbender with a means of transportation. To use, simply left click while in or over water to spout water up beneath you, experiencing controlled levitation. Left clicking again while the spout is active will cause it to disappear. Alternatively, tapping a Waterbendable block while not in Water will select a water block as a source, from there, you can tap sneak (Default:Shift) to channel the Water around you. Releasing the sneak will create a wave allowing you a quick burst of controlled transportation. While riding the wave you may press sneak to cause the wave to disappear.");
config.addDefault("Abilities.Water.Combo.IceBullets.DeathMessage", "{victim}'s heart was frozen by {attacker}'s {ability}");
config.addDefault("Abilities.Earth.Catapult.Description", "To use, left-click while looking in the direction you want to be launched. " + "A pillar of earth will jut up from under you and launch you in that direction - " + "if and only if there is enough earth behind where you're looking to launch you. " + "Skillful use of this ability takes much time and work, and it does result in the " + "death of certain gung-ho earthbenders. If you plan to use this ability, be sure " + "you've read about your passive ability you innately have as an earthbender.");
config.addDefault("Abilities.Earth.Collapse.Description", " To use, simply left-click on an earthbendable block. " + "That block and the earthbendable blocks above it will be shoved " + "back into the earth below them, if they can. " + "This ability does have the capacity to trap something inside of it, " + "although it is incredibly difficult to do so. " + "Additionally, press sneak with this ability to affect an area around your targetted location - " + "all earth that can be moved downwards will be moved downwards. " + "This ability is especially risky or deadly in caves, depending on the " + "earthbender's goal and technique.");
config.addDefault("Abilities.Earth.Collapse.DeathMessage", "{victim} was suffocated by {attacker}'s {ability}");
config.addDefault("Abilities.Earth.EarthArmor.Description", "This ability encases the earthbender in temporary armor. To use, click on a block that is earthbendable. If there is another block under it that is earthbendable, the block will fly to you and grant you temporary armor and damage reduction. This ability has a long cooldown.");
config.addDefault("Abilities.Earth.EarthBlast.Description", "To use, place your cursor over an earthbendable object (dirt, rock, ores, etc) " + "and tap sneak (default: shift). The object will temporarily turn to stone, " + "indicating that you have it focused as the source for your ability. " + "After you have selected an origin (you no longer need to be sneaking), " + "simply left-click in any direction and you will see your object launch " + "off in that direction, smashing into any creature in its path. If you look " + "towards a creature when you use this ability, it will target that creature. " + "A collision from Earth Blast both knocks the target back and deals some damage. " + "You cannot have multiple of these abilities flying at the same time.");
config.addDefault("Abilities.Earth.EarthBlast.DeathMessage", "{victim} was broken apart by {attacker}'s {ability}");
config.addDefault("Abilities.Earth.EarthGrab.Description", "To use, simply left-click while targeting a creature within range. " + "This ability will erect a circle of earth to trap the creature in.");
config.addDefault("Abilities.Earth.EarthTunnel.Description", "Earth Tunnel is a completely utility ability for earthbenders. To use, simply sneak (default: shift) in the direction you want to tunnel. You will slowly begin tunneling in the direction you're facing for as long as you sneak or if the tunnel has been dug long enough. This ability will be interrupted if it hits a block that cannot be earthbent.");
config.addDefault("Abilities.Earth.Extraction.Description", "This ability allows metalbenders to extract the minerals from ore blocks. To use, simply tap sneak while looking at an ore block with metal in it (iron, gold, quartz) and the ore will be extracted and drop in front of you. This ability has a small chance of doubling or tripling the loot. This ability has a short cooldown.");
config.addDefault("Abilities.Earth.LavaFlow.Description", "This ability allows an Earthbender to create lava using the Earth around them. To use, simply hold sneak (Default: Shift) to create a lava moat that surrounds you, press sneak again to remove the moat. Left click an Earthbendable block to create a pool of lava after a small delay. Additionally, you can left click at any time to turn lava back into its original state -- Earth.");
config.addDefault("Abilities.Earth.LavaFlow.DeathMessage", "{victim} was caught in by {attacker}'s {ability}");
config.addDefault("Abilities.Earth.EarthSmash.Description", "To raise an EarthSmash hold sneak (default: shift) for approximately 1.5 seconds, " + "then release while aiming at dirt. To grab the EarthSmash aim at the center and hold sneak, " + "the EarthSmash will follow your mouse. You can shoot the EarthSmash by grabbing onto it and left clicking. " + "To ride the EarthSmash simply hop ontop of it and hold sneak while aiming in the direction that you wish to go. " + "Another way to ride an EarthSmash is to grab it with sneak and then right click it. " + "Use EarthSmash as a defensive shield, a powerful attack, or an advanced means of transportation.");
config.addDefault("Abilities.Earth.EarthSmash.DeathMessage", "{victim} was crushed by {attacker}'s {ability}");
config.addDefault("Abilities.Earth.MetalClips.Description", "MetalClips has the potential to be both an offensive and a utility ability. To start, you must carry smelted Iron Ingots in your inventory. To apply the clips onto an entity, simply click at them. If the entity is a Zombie, a Skeleton, or a Player, the clips will form armor around the entity, giving you some control over them. Each additional clip will give you more control. If you have permission to do so, you may crush the entity against a wall with a 4th clip, hurting them. Without explicit permissions, you will only be able to strap three clips on your target. If the entity is not one of the above, the clip will simply do damage and fall to the ground, to be collected. Another permission requiring action is throwing entities. To do so, click while controlling a metalclipped entity");
config.addDefault("Abilities.Earth.MetalClips.DeathMessage", "{victim} was too slow for {attacker}'s {ability}");
config.addDefault("Abilities.Earth.RaiseEarth.Description", "To use, simply left-click on an earthbendable block. " + "A column of earth will shoot upwards from that location. " + "Anything in the way of the column will be brought up with it, " + "leaving talented benders the ability to trap brainless entities up there. " + "Additionally, simply sneak (default shift) looking at an earthbendable block. " + "A wall of earth will shoot upwards from that location. " + "Anything in the way of the wall will be brought up with it. ");
config.addDefault("Abilities.Earth.Shockwave.Description", "This is one of the most powerful moves in the earthbender's arsenal. " + "To use, you must first charge it by holding sneak (default: shift). " + "Once charged, you can release sneak to create an enormous shockwave of earth, " + "disturbing all earth around you and expanding radially outwards. " + "Anything caught in the shockwave will be blasted back and dealt damage. " + "If you instead click while charged, the disruption is focused in a cone in front of you. " + "Lastly, if you fall from a great enough height with this ability selected, you will automatically create a shockwave.");
config.addDefault("Abilities.Earth.Shockwave.DeathMessage", "{victim} was blown away by {attacker}'s {ability}");
config.addDefault("Abilities.Earth.SandSpout.Description", "SandSpout is a core move for travelling, evasion, and mobility for sandbenders. To use, simply left click while over sand or sandstone, and a column of sand will form at your feet, enabling you to levitate. Any mobs or players that touch your column will receive damage and be blinded. Beware, as the spout will stop working when no longer over sand!");
config.addDefault("Abilities.Earth.Tremorsense.Description", "This is a pure utility ability for earthbenders. If you are in an area of low-light and are standing on top of an earthbendable block, this ability will automatically turn that block into glowstone, visible *only by you*. If you lose contact with a bendable block, the light will go out as you have lost contact with the earth and cannot 'see' until you can touch earth again. Additionally, if you click with this ability selected, smoke will appear above nearby earth with pockets of air beneath them.");
config.addDefault("Abilities.Fire.Blaze.Description", "To use, simply left-click in any direction. An arc of fire will flow from your location, igniting anything in its path. Additionally, tap sneak to engulf the area around you in roaring flames.");
config.addDefault("Abilities.Fire.Blaze.DeathMessage", "{victim} was burned alive by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.Combustion.Description", "Combustion is a powerful ability only known by a few skilled Firebenders. It allows the bender to Firebend with their mind, concentrating energy to create a powerful blast. To use, simply tap sneak (Default: Shift) to launch the blast. This technique is highly destructive and very effective, it also comes with a long cooldown.");
config.addDefault("Abilities.Fire.Combustion.DeathMessage", "{victim} was shot down by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.FireBlast.Description", "FireBlast is the most fundamental bending technique of a firebender. " + "To use, simply left-click in a direction. A blast of fire will be created at your fingertips. " + "If this blast contacts an enemy, it will dissipate and engulf them in flames, " + "doing additional damage and knocking them back slightly. " + "If the blast hits terrain, it will ignite the nearby area. " + "Additionally, if you hold sneak, you will charge up the fireblast. " + "If you release it when it's charged, it will instead launch a powerful " + "fireball that explodes on contact.");
config.addDefault("Abilities.Fire.FireBlast.DeathMessage", "{victim} was burnt by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.FireBurst.Description", "FireBurst is a very powerful firebending ability. " + "To use, press and hold sneak to charge your burst. " + "Once charged, you can either release sneak to release the burst in a sphere around you or " + "click to launch a cone-shaped burst of flames in front of you.");
config.addDefault("Abilities.Fire.FireBurst.DeathMessage", "{victim} was blown apart by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.FireJet.Description", "This ability is used for a limited burst of flight for firebenders. Clicking with this " + "ability selected will launch you in the direction you're looking, granting you " + "controlled flight for a short time. This ability can be used mid-air to prevent falling " + "to your death, but on the ground it can only be used if standing on a block that's " + "ignitable (e.g. not snow or water).");
config.addDefault("Abilities.Fire.FireShield.Description", "FireShield is a basic defensive ability. " + "Clicking with this ability selected will create a " + "small disc of fire in front of you, which will block most " + "attacks and bending. Alternatively, pressing and holding " + "sneak creates a very small shield of fire, blocking most attacks. " + "Creatures that contact this fire are ignited.");
config.addDefault("Abilities.Fire.FireShield.DeathMessage", "{victim} scorched theirself on {attacker}'s {ability}");
config.addDefault("Abilities.Fire.HeatControl.Description", "While this ability is selected, the firebender becomes impervious " + "to fire damage and cannot be ignited. " + "If the user left-clicks with this ability, the targeted area will be " + "extinguished, although it will leave any creature burning engulfed in flames. " + "This ability can also cool lava. If this ability is used while targetting ice or snow, it" + " will instead melt blocks in that area. Finally, sneaking with this ability will cook any food in your hand.");
config.addDefault("Abilities.Fire.Illumination.Description", "This ability gives firebenders a means of illuminating the area. It is a toggle - clicking " + "will create a torch that follows you around. The torch will only appear on objects that are " + "ignitable and can hold a torch (e.g. not leaves or ice). If you get too far away from the torch, " + "it will disappear, but will reappear when you get on another ignitable block. Clicking again " + "dismisses this torch.");
config.addDefault("Abilities.Fire.Lightning.Description", "Hold sneak while selecting this ability to charge up a lightning strike. Once charged, release sneak to discharge the lightning to the targeted location.");
config.addDefault("Abilities.Fire.Lightning.DeathMessage", "{victim} was electrocuted by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.WallOfFire.Description", "To use this ability, click at a location. A wall of fire will appear at this location, igniting enemies caught in it and blocking projectiles.");
config.addDefault("Abilities.Fire.WallOfFire.DeathMessage", "{victim} ran into {attacker}'s {ability}");
config.addDefault("Abilities.Fire.Combo.FireKick.DeathMessage", "{victim} was kicked to the floor with flames by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.Combo.FireSpin.DeathMessage", "{victim} was caught in {attacker}'s {ability} inferno");
config.addDefault("Abilities.Fire.Combo.JetBlaze.DeathMessage", "{victim} was blasted away by {attacker}'s {ability}");
config.addDefault("Abilities.Fire.Combo.FireWheel.DeathMessage", "{victim} was incinerated by {attacker}'s {ability}");
config.addDefault("Abilities.Chi.AcrobatStance.Description", "AcrobatStance gives a Chiblocker a higher probability of blocking a Bender's Chi while granting them a Speed and Jump Boost. It also increases the rate at which the hunger bar depletes. To use, simply left click. Left clicking again will de-activate the stance.");
config.addDefault("Abilities.Chi.HighJump.Description", "To use this ability, simply click. You will jump quite high. This ability has a short cooldown.");
config.addDefault("Abilities.Chi.Paralyze.Description", "Paralyzes the target, making them unable to do anything for a short " + "period of time. This ability has a long cooldown.");
config.addDefault("Abilities.Chi.RapidPunch.Description", "This ability allows the chiblocker to punch rapidly in a short period. To use, simply punch. This has a short cooldown.");
config.addDefault("Abilities.Chi.RapidPunch.DeathMessage", "{victim} took all the hits against {attacker}'s {ability}");
config.addDefault("Abilities.Chi.Smokescreen.Description", "Smokescreen, if used correctly, can serve as a defensive and offensive ability for Chiblockers. To use, simply left click and you will toss out a Smoke Bomb. When the bomb hits the ground, it will explode and give all players within a small radius of the explosion temporary blindness, allowing you to either get away, or move in for the kill. This ability has a long cooldown.");
config.addDefault("Abilities.Chi.WarriorStance.Description", "WarriorStance gives a Chiblocker increased damage but makes them a tad more vulnerable. To activate, simply left click.");
config.addDefault("Abilities.Chi.QuickStrike.Description", "QuickStrike enables a chiblocker to quickly strike an enemy, potentially blocking their chi.");
config.addDefault("Abilities.Chi.QuickStrike.DeathMessage", "{victim} was struck down by {attacker}'s {ability}");
config.addDefault("Abilities.Chi.SwiftKick.Description", "SwiftKick allows a chiblocker to swiftly kick an enemy, potentially blocking their chi. The chiblocker must be in the air to use this ability.");
config.addDefault("Abilities.Chi.SwiftKick.DeathMessage", "{victim} was kicked to the floor by {attacker}'s {ability}");
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");
config.addDefault("Chat.Colors.Water", "AQUA");
config.addDefault("Chat.Colors.WaterSub", "DARK_AQUA");
config.addDefault("Chat.Colors.Earth", "GREEN");
config.addDefault("Chat.Colors.EarthSub", "DARK_GREEN");
config.addDefault("Chat.Colors.Fire", "RED");
config.addDefault("Chat.Colors.FireSub", "DARK_RED");
config.addDefault("Chat.Colors.Chi", "GOLD");
config.addDefault("Commands.Who.Description", "This command will tell you what element all players that are online are (If you don't specify a player) or give you information about the player that you specify.");
config.addDefault("Commands.Who.NoPlayersOnline", "There is no one online.");
config.addDefault("Commands.Who.DatabaseOverload", "The database appears to be overloaded. Please try again later.");
config.addDefault("Commands.Who.PlayerOffline", "{target} is currently offline. A lookup is currently being done (this might take a few seconds).");
config.addDefault("Commands.NoPermission", "You do not have permission to do that.");
config.addDefault("Commands.MustBePlayer", "You must be a player to perform this action.");
config.addDefault("Commands.Version.Description", "Displays the installed version of ProjectKorra.");
config.addDefault("Commands.Toggle.Description", "This command will toggle a player's own Bending on or off. If toggled off, all abilities should stop working until it is toggled back on. Logging off will automatically toggle your Bending back on. If you run the command /bending toggle all, Bending will be turned off for all players and cannot be turned back on until the command is run again.");
config.addDefault("Commands.Toggle.All.ToggledOffForAll", "Bending is currently toggled off for all players.");
config.addDefault("Commands.Toggle.ToggledOff", "Your bending has been toggled off. You will not be able to use most abilities until you toggle it back.");
config.addDefault("Commands.Toggle.ToggledOn", "You have turned your Bending back on.");
config.addDefault("Commands.Toggle.All.ToggleOn", "Bending has been toggled back on for all players.");
config.addDefault("Commands.Toggle.All.ToggleOff", "Bending has been toggled off for all players.");
config.addDefault("Commands.Toggle.ToggleOnSingleElement", "You have toggled on your {element}.");
config.addDefault("Commands.Toggle.ToggleOffSingleElement", "You have toggled off your {element}.");
config.addDefault("Commands.Toggle.Other.WrongElement", "{target} doesn't have that element.");
config.addDefault("Commands.Toggle.Other.ToggledOnElementConfirm", "You've toggled on {target}'s {element}");
config.addDefault("Commands.Toggle.Other.ToggledOffElementConfirm", "You've toggled off {target}'s {element}");
config.addDefault("Commands.Toggle.Other.ToggledOnElementByOther", "Your {element} has been toggled on by {sender}.");
config.addDefault("Commands.Toggle.Other.ToggledOffElementByOther", "Your {element} has been toggled off by {sender}.");
config.addDefault("Commands.Toggle.WrongElement", "You do not have that element.");
config.addDefault("Commands.Toggle.Other.PlayerNotFound", "Target is not found.");
config.addDefault("Commands.Remove.Description", "This command will remove the element of the targeted [Player]. The player will be able to re-pick their element after this command is run on them, assuming their Bending was not permaremoved.");
config.addDefault("Commands.Remove.Other.RemovedAllElements", "Your bending has been removed by {sender}.");
config.addDefault("Commands.Remove.Other.RemovedAllElementsConfirm", "You've removed {target's} bending.");
config.addDefault("Commands.Remove.Other.RemovedElement", "Your {element} has been removed by {sender}.");
config.addDefault("Commands.Remove.Other.RemovedElementConfirm", "{sender} has removed your {element}.");
config.addDefault("Commands.Remove.RemovedElement", "You've removed your {element}.");
config.addDefault("Commands.Remove.InvalidElement", "That element is invalid!");
config.addDefault("Commands.Remove.WrongElement", "You do not have that element!");
config.addDefault("Commands.Remove.Other.WrongElement", "{target} does not have that element!");
config.addDefault("Commands.Remove.PlayerOffline", "That player is offline!");
config.addDefault("Commands.Reload.Description", "This command will reload the Bending config file.");
config.addDefault("Commands.Reload.SuccesfullyReloaded", "Bending Config reloaded!");
config.addDefault("Commands.Preset.Description", "This command manages Presets, which are saved bindings. Use /bending preset list to view your existing presets, use /bending [create|delete] [name] to manage your presets, and use /bending bind [name] to bind an existing preset.");
config.addDefault("Commands.Preset.NoPresets", "You do not have any presets.");
config.addDefault("Commands.Preset.NoPresetName", "You don't have a preset with that name.");
config.addDefault("Commands.Preset.Delete", "You have deleted your '{name}' preset.");
config.addDefault("Commands.Preset.External.NoPresetName", "No external preset found with that name.");
config.addDefault("Commands.Preset.BendingPermanentlyRemoved", "Your bending was permanently removed.");
config.addDefault("Commands.Preset.SuccesfullyBound", "Your binds have been set to match the {name} preset.");
config.addDefault("Commands.Preset.FailedToBindAll", "Some abilities were not bound because you cannot bend the required element.");
config.addDefault("Commands.Preset.Other.BendingPermanentlyRemoved", "That player's bending was permanently removed.");
config.addDefault("Commands.Preset.Other.SuccesfullyBoundConfirm", "The bound slots of {target} have been set to match the {name} preset.");
config.addDefault("Commands.Preset.PlayerNotFound", "Player not found.");
config.addDefault("Commands.Preset.SuccesfullyCopied", "Your binds have been set to match {target}'s binds.");
config.addDefault("Commands.Preset.MaxPresets", "You've reached your maximum number of presets.");
config.addDefault("Commands.Preset.AlreadyExists", "A preset with that name already exists.");
config.addDefault("Commands.Preset.Created", "Created a new preset named '{name}'.");
config.addDefault("Commands.Preset.Removed", "Your bending has been permanently removed.");
config.addDefault("Commands.Preset.RemovedConfirm", "You have permanently removed {target}'s bending.");
config.addDefault("Commands.Preset.CantEditBinds", "You can't edit your binds right now!");
config.addDefault("Commands.PermaRemove.Description", "This command will permanently remove the Bending of the targeted <Player>. Once removed, a player may only receive Bending again if this command is run on them again. This command is typically reserved for administrators.");
config.addDefault("Commands.PermaRemove.PlayerOffline", "That player is not online.");
config.addDefault("Commands.PermaRemove.Restored", "Your bending has been restored.");
config.addDefault("Commands.PermaRemove.RestoredConfirm", "You have restored the bending off {target}.");
config.addDefault("Commands.Invincible.Description", "This command will make you impervious to all Bending damage. Once you use this command, you will stay invincible until you log off or use this command again.");
config.addDefault("Commands.Invincible.ToggledOn", "You are now invincible to all bending damage and effects. Use this command again to disable this.");
config.addDefault("Commands.Invincible.ToggledOff", "You are no longer invincible to all bending damage and effects.");
config.addDefault("Commands.Import.Description", "This command will import your old bendingPlayers.yml from the Bending plugin. It will generate a convert.yml file to convert the data to be used with this plugin. You can delete the file once the complete message is displayed. This command should only be used ONCE.");
config.addDefault("Commands.Import.Disabled", "Import has been disabled in the config!");
config.addDefault("Commands.Import.PreparingData", "Preparing Data for import.");
config.addDefault("Commands.Import.ImportStarted", "Import of data started. Do NOT stop / reload your server.");
config.addDefault("Commands.Import.DebugWarning", "Console will print out all of the players that are imported if debug mode is enabled as they import.");
config.addDefault("Commands.Import.DataQueuedUp", "All data has been queued up, please allow up to 5 minutes for the data to complete, then reboot your server.");
config.addDefault("Commands.Help.Description", "This command provides information on how to use other commands in ProjectKorra.");
config.addDefault("Commands.Help.Required", "Required");
config.addDefault("Commands.Help.Optional", "Optional");
config.addDefault("Commands.Help.ProperUsage", "Proper Usage: {command1} or {command2}");
config.addDefault("Commands.Help.Elements.LearnMore", "Learn more: ");
config.addDefault("Commands.Help.Elements.Water", "Water is the element of change. Waterbending focuses on using your opponents own force against them. Using redirection and various dodging tactics, you can be made practically untouchable by an opponent. Waterbending provides agility, along with strong offensive skills while in or near water.\nWaterbenders can chain their abilities into combos, type /b help WaterCombos for more information.");
config.addDefault("Commands.Help.Elements.Earth", "Earth is the element of substance. Earthbenders share many of the same fundamental techniques as Waterbenders, but their domain is quite different and more readily accessible. Earthbenders dominate the ground and subterranean, having abilities to pull columns of rock straight up from the earth or drill their way through the mountain. They can also launch themselves through the air using pillars of rock, and will not hurt themselves assuming they land on something they can bend. The more skilled Earthbenders can even bend metal.");
config.addDefault("Commands.Help.Elements.Fire", "Fire is the element of power. Firebenders focus on destruction and incineration. Their abilities are pretty straight forward: set things on fire. They do have a bit of utility however, being able to make themselves un-ignitable, extinguish large areas, cook food in their hands, extinguish large areas, small bursts of flight, and then comes the abilities to shoot fire from your hands.\nFirebenders can chain their abilities into combos, type /b help FireCombos for more information.");
config.addDefault("Commands.Help.Elements.Air", "Air is the element of freedom. Airbenders are natural pacifists and great explorers. There is nothing stopping them from scaling the tallest of mountains and walls easily. They specialize in redirection, from blasting things away with gusts of winds, to forming a shield around them to prevent damage. Easy to get across flat terrains, such as oceans, there is practically no terrain off limits to Airbenders. They lack much raw damage output, but make up for it with with their ridiculous amounts of utility and speed.\nAirbenders can chain their abilities into combos, type /b help AirCombos for more information.");
config.addDefault("Commands.Help.Elements.Chi", "Chiblockers focus on bare handed combat, utilizing their agility and speed to stop any bender right in their path. Although they lack the ability to bend any of the other elements, they are great in combat, and a serious threat to any bender. Chiblocking was first shown to be used by Ty Lee in Avatar: The Last Airbender, then later by members of the Equalists in The Legend of Korra.\nChiblockers can chain their abilities into combos, type /b help ChiCombos for more information.");
config.addDefault("Commands.Help.InvalidTopic", "That isn't a valid help topic. Use /bending help for more information.");
config.addDefault("Commands.Help.Usage", "Usage: ");
config.addDefault("Commands.Display.Description", "This command will show you all of the elements you have bound if you do not specify an element. If you do specify an element (Air, Water, Earth, Fire, or Chi), it will show you all of the available abilities of that element installed on the server.");;
config.addDefault("Commands.Display.NoCombosAvailable", "There are no {element} combos available.");
config.addDefault("Commands.Display.NoAbilitiesAvailable", "There are no {element} abilities on this server!");
config.addDefault("Commands.Display.InvalidArgument", "Not a valid argument.");
config.addDefault("Commands.Display.PlayersOnly", "This command is only useable by players.");
config.addDefault("Commands.Display.NoBinds", "You do not have any abilities bound.\nIf you would like to see a list of available abilities, please use the /bending display [Element] command. Use /bending help for more information.");
config.addDefault("Commands.Debug.Description", "Outputs information on the current ProjectKorra installation to /plugins/ProjectKorra/debug.txt");
config.addDefault("Commands.Debug.SuccesfullyExported", "Debug File Created as debug.txt in the ProjectKorra plugin folder.\nPut contents on pastie.org and create a bug report on the ProjectKorra forum if you need to.");
config.addDefault("Commands.Copy.Description", "This command will allow the user to copy the binds of another player either for himself or assign them to <Player> if specified.");
config.addDefault("Commands.Copy.PlayerNotFound", "Couldn't find player.");
config.addDefault("Commands.Copy.SuccessfullyCopied", "Your binds have been set to match {target}'s!");
config.addDefault("Commands.Copy.FailedToBindAll", "Not all moves have been bound because you do not have the permission to.");
config.addDefault("Commands.Copy.Other.SuccessfullyCopied", "{target1}'s binds have been set to match {target2}'s.");
config.addDefault("Commands.Clear.Description", "This command will clear the bound ability from the slot you specify (if you specify one). If you choose not to specify a slot, all of your abilities will be cleared.");
config.addDefault("Commands.Clear.CantEditBinds", "You can't edit your binds right now!");
config.addDefault("Commands.Clear.Cleared", "Your bound abilities have been cleared.");
config.addDefault("Commands.Clear.WrongNumber", "The slot must be an integer between 1 and 9.");
config.addDefault("Commands.Clear.ClearedSlot", "You have cleared slot #{slot}.");
config.addDefault("Commands.Clear.AlreadyEmpty", "That slot was is already empty.");
config.addDefault("Commands.Choose.Description", "This command will allow the user to choose a player either for himself or <Player> if specified. This command can only be used once per player unless they have permission to rechoose their element.");
config.addDefault("Commands.Choose.InvalidElement", "That is not a valid element.");
config.addDefault("Commands.Choose.PlayerNotFound", "Could not find player.");
config.addDefault("Commands.Choose.SuccessfullyChosen", "You are now a {element}.");
config.addDefault("Commands.Choose.Other.SuccessfullyChosen", "{target} is now a {element}.");
config.addDefault("Commands.Check.Description", "Checks if ProjectKorra is up to date.");
config.addDefault("Commands.Check.NewVersionAvailable", "There's a new version of ProjectKorra available!");
config.addDefault("Commands.Check.CurrentVersion", "Current Version: {version}");
config.addDefault("Commands.Check.LatestVersion", "Latest Version: {version}");
config.addDefault("Commands.Check.UpToDate", "You have the latest version of ProjectKorra.");
config.addDefault("Commands.Bind.Description", "This command will bind an ability to the slot you specify (if you specify one), or the slot currently selected in your hotbar (If you do not specify a Slot #).");
config.addDefault("Commands.Bind.AbilityDoesntExist", "This command will bind an ability to the slot you specify (if you specify one), or the slot currently selected in your hotbar (If you do not specify a Slot #).");
config.addDefault("Commands.Bind.WrongNumber", "Slot must be an integer between 1 and 9.");
config.addDefault("Commands.Bind.ElementToggledOff", "You have that ability's element toggled off currently.");
config.addDefault("Commands.Bind.SuccessfullyBound", "Succesfully bound {ability} to slot {slot}.");
config.addDefault("Commands.Add.Choose", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.");
config.addDefault("Commands.Add.PlayerNotFound", "That player could not be found.");
config.addDefault("Commands.Add.InvalidElement", "You must specify a valid element.");
config.addDefault("Commands.Add.SuccessfullyAdded", "You are now also a {element}.");
config.addDefault("Commands.Add.Other.SuccessfullyAdded", "{target} is now also a {element}.");
config.addDefault("Commands.Add.Other.AlreadyHasElement", "{target} already has that element!");
config.addDefault("Commands.Add.AlreadyHasElement", "You already have that element!");
config.addDefault("Extras.Water.NightMessage", "You feel the strength of the rising moon empowering your waterbending.");
config.addDefault("Extras.Water.DayMessage", "You feel the empowering of your waterbending subside as the moon sets.");
config.addDefault("Extras.Fire.NightMessage", "You feel the empowering of your firebending subside as the sun sets.");
config.addDefault("Extras.Fire.DayMessage", "You feel the strength of the rising sun empowering your firebending.");
languageConfig.save();
} else if (type == ConfigType.DEFAULT) {
config = defaultConfig.get();
@ -149,25 +377,6 @@ public class ConfigManager {
plantBlocks.add("PUMPKIN_STEM");
plantBlocks.add("MELON_STEM");
config.addDefault("Properties.Chat.Enable", true);
config.addDefault("Properties.Chat.Format", "<name>: <message>");
config.addDefault("Properties.Chat.Prefixes.Air", "[Airbender]");
config.addDefault("Properties.Chat.Prefixes.Water", "[Waterbender]");
config.addDefault("Properties.Chat.Prefixes.Earth", "[Earthbender]");
config.addDefault("Properties.Chat.Prefixes.Fire", "[Firebender]");
config.addDefault("Properties.Chat.Prefixes.Chi", "[Chiblocker]");
config.addDefault("Properties.Chat.Prefixes.Avatar", "[Avatar]");
config.addDefault("Properties.Chat.Colors.Avatar", "DARK_PURPLE");
config.addDefault("Properties.Chat.Colors.Air", "GRAY");
config.addDefault("Properties.Chat.Colors.AirSub", "DARK_GRAY");
config.addDefault("Properties.Chat.Colors.Water", "AQUA");
config.addDefault("Properties.Chat.Colors.WaterSub", "DARK_AQUA");
config.addDefault("Properties.Chat.Colors.Earth", "GREEN");
config.addDefault("Properties.Chat.Colors.EarthSub", "DARK_GREEN");
config.addDefault("Properties.Chat.Colors.Fire", "RED");
config.addDefault("Properties.Chat.Colors.FireSub", "DARK_RED");
config.addDefault("Properties.Chat.Colors.Chi", "GOLD");
config.addDefault("Properties.ImportEnabled", true);
config.addDefault("Properties.BendingAffectFallingSand.Normal", true);
config.addDefault("Properties.BendingAffectFallingSand.NormalStrengthMultiplier", 1.0);
@ -202,8 +411,6 @@ public class ConfigManager {
config.addDefault("Properties.Water.NightFactor", 1.5);
config.addDefault("Properties.Water.FullMoonFactor", 2.0);
config.addDefault("Properties.Water.PlaySound", true);
config.addDefault("Properties.Water.NightMessage", "You feel the strength of the rising moon empowering your waterbending.");
config.addDefault("Properties.Water.DayMessage", "You feel the empowering of your waterbending subside as the moon sets.");
config.addDefault("Properties.Earth.RevertEarthbending", true);
config.addDefault("Properties.Earth.SafeRevert", true);
@ -218,8 +425,6 @@ public class ConfigManager {
config.addDefault("Properties.Fire.CanBendWithWeapons", true);
config.addDefault("Properties.Fire.DayFactor", 1.25);
config.addDefault("Properties.Fire.PlaySound", true);
config.addDefault("Properties.Fire.NightMessage", "You feel the empowering of your firebending subside as the sun sets.");
config.addDefault("Properties.Fire.DayMessage", "You feel the strength of the rising sun empowering your firebending.");
config.addDefault("Properties.Fire.FireGriefing", false);
config.addDefault("Properties.Fire.RevertTicks", 12000L);
@ -231,7 +436,6 @@ public class ConfigManager {
config.addDefault("Properties.DisabledWorlds", disabledWorlds);
config.addDefault("Abilities.Avatar.AvatarState.Enabled", true);
config.addDefault("Abilities.Avatar.AvatarState.Description", "The signature ability of the Avatar, this is a toggle. Click to activate to become " + "nearly unstoppable. While in the Avatar State, the user takes severely reduced damage from " + "all sources, regenerates health rapidly, and is granted extreme speed. Nearly all abilities " + "are incredibly amplified in this state. Additionally, AirShield and FireJet become toggle-able " + "abilities and last until you deactivate them or the Avatar State. Click again with the Avatar " + "State selected to deactivate it.");
config.addDefault("Abilities.Avatar.AvatarState.Cooldown", 7200000);
config.addDefault("Abilities.Avatar.AvatarState.Duration", 480000);
config.addDefault("Abilities.Avatar.AvatarState.PowerMultiplier", 5);
@ -249,7 +453,6 @@ public class ConfigManager {
config.addDefault("Abilities.Air.Passive.Jump", 3);
config.addDefault("Abilities.Air.AirBlast.Enabled", true);
config.addDefault("Abilities.Air.AirBlast.Description", "AirBlast is the most fundamental bending technique of an airbender." + " To use, simply left-click in a direction. A gust of wind will be" + " created at your fingertips, launching anything in its path harmlessly back." + " A gust of air can extinguish fires on the ground or on a player, can cool lava, and " + "can flip levers and activate buttons. Additionally, tapping sneak will change the " + "origin of your next AirBlast to your targeted location.");
config.addDefault("Abilities.Air.AirBlast.Speed", 25);
config.addDefault("Abilities.Air.AirBlast.Range", 20);
config.addDefault("Abilities.Air.AirBlast.Radius", 2);
@ -265,11 +468,9 @@ public class ConfigManager {
config.addDefault("Abilities.Air.AirBlast.CanCoolLava", true);
config.addDefault("Abilities.Air.AirBubble.Enabled", true);
config.addDefault("Abilities.Air.AirBubble.Description", "To use, the bender must hold down sneak. All water around the user in a small bubble will vanish, replacing itself once the user either gets too far away or selects a different ability.");
config.addDefault("Abilities.Air.AirBubble.Radius", 7);
config.addDefault("Abilities.Air.AirBurst.Enabled", true);
config.addDefault("Abilities.Air.AirBurst.Description", "AirBurst is one of the most powerful abilities in the airbender's arsenal. " + "To use, press and hold sneak to charge your burst. " + "Once charged, you can either release sneak to release the burst in a sphere around you " + "or click to launch a cone-shaped burst of air in front of you. " + "Additionally, having this ability selected when you land on the ground from a " + "large enough fall will create a burst of air around you.");
config.addDefault("Abilities.Air.AirBurst.FallThreshold", 10);
config.addDefault("Abilities.Air.AirBurst.PushFactor", 1.5);
config.addDefault("Abilities.Air.AirBurst.ChargeTime", 1750);
@ -280,17 +481,12 @@ public class ConfigManager {
config.addDefault("Abilities.Air.AirBurst.AngleTheta", 10);
config.addDefault("Abilities.Air.AirScooter.Enabled", true);
config.addDefault("Abilities.Air.AirScooter.Description", "AirScooter is a fast means of transportation. To use, sprint, jump then click with " + "this ability selected. You will hop on a scooter of air and be propelled forward " + "in the direction you're looking (you don't need to press anything). " + "This ability can be used to levitate above liquids, but it cannot go up steep slopes. " + "Any other actions will deactivate this ability.");
config.addDefault("Abilities.Air.AirScooter.Speed", 0.675);
config.addDefault("Abilities.Air.AirScooter.Interval", 100);
config.addDefault("Abilities.Air.AirScooter.Radius", 1);
config.addDefault("Abilities.Air.AirScooter.MaxHeightFromGround", 7);
config.addDefault("Abilities.Air.Tornado.Enabled", true);
config.addDefault("Abilities.Air.Tornado.Description", "To use, simply sneak (default: shift). " + "This will create a swirling vortex at the targeted location. " + "Any creature or object caught in the vortex will be launched up " + "and out in some random direction. If another player gets caught " + "in the vortex, the launching effect is minimal. Tornado can " + "also be used to transport the user. If the user gets caught in his/her " + "own tornado, his movements are much more manageable. Provided the user doesn't " + "fall out of the vortex, it will take him to a maximum height and move him in " + "the general direction he's looking. Skilled airbenders can scale anything " + "with this ability.");
config.addDefault("Abilities.Air.AirShield.Enabled", true);
config.addDefault("Abilities.Air.AirShield.Description", "Air Shield is one of the most powerful defensive techniques in existence. " + "To use, simply sneak (default: shift). " + "This will create a whirlwind of air around the user, " + "with a small pocket of safe space in the center. " + "This wind will deflect all projectiles and will prevent any creature from " + "entering it for as long as its maintained.");
config.addDefault("Abilities.Air.AirShield.Radius", 7);
config.addDefault("Abilities.Air.AirShield.Streams", 5);
config.addDefault("Abilities.Air.AirShield.Speed", 10);
@ -298,12 +494,10 @@ public class ConfigManager {
config.addDefault("Abilities.Air.AirShield.IsAvatarStateToggle", true);
config.addDefault("Abilities.Air.AirSpout.Enabled", true);
config.addDefault("Abilities.Air.AirSpout.Description", "This ability gives the airbender limited sustained levitation. It is a " + "toggle - click to activate and form a whirling spout of air " + "beneath you, lifting you up. You can bend other abilities while using AirSpout. " + "Click again to deactivate this ability.");
config.addDefault("Abilities.Air.AirSpout.Height", 20);
config.addDefault("Abilities.Air.AirSpout.Interval", 100);
config.addDefault("Abilities.Air.AirSuction.Enabled", true);
config.addDefault("Abilities.Air.AirSuction.Description", "To use, simply left-click in a direction. A gust of wind will originate as far as it can in that direction and flow towards you, sucking anything in its path harmlessly with it. Skilled benders can use this technique to pull items from precarious locations. Additionally, tapping sneak will change the origin of your next AirSuction to your targeted location.");
config.addDefault("Abilities.Air.AirSuction.Speed", 25);
config.addDefault("Abilities.Air.AirSuction.Range", 20);
config.addDefault("Abilities.Air.AirSuction.SelectRange", 10);
@ -314,7 +508,6 @@ public class ConfigManager {
config.addDefault("Abilities.Air.AirSuction.SelectParticles", 6);
config.addDefault("Abilities.Air.AirSwipe.Enabled", true);
config.addDefault("Abilities.Air.AirSwipe.Description", "To use, simply left-click in a direction. An arc of air will flow from you towards that direction, cutting and pushing back anything in its path. Its damage is minimal, but it still sends the message. This ability will extinguish fires, cool lava, and cut things like grass, mushrooms, and flowers. Additionally, you can charge it by holding sneak. Charging before attacking will increase damage and knockback, up to a maximum.");
config.addDefault("Abilities.Air.AirSwipe.Damage", 2);
config.addDefault("Abilities.Air.AirSwipe.Range", 16);
config.addDefault("Abilities.Air.AirSwipe.Radius", 2);
@ -328,13 +521,11 @@ public class ConfigManager {
config.addDefault("Abilities.Air.AirSwipe.StepSize", 4);
config.addDefault("Abilities.Air.Flight.Enabled", true);
config.addDefault("Abilities.Air.Flight.Description", "Jump in the air, crouch (default: shift) and hold with this ability bound and you will glide around in the direction you look. While flying, click to Hover. Click again to disable Hovering.");
config.addDefault("Abilities.Air.Flight.HoverEnabled", true);
config.addDefault("Abilities.Air.Flight.Speed", 1);
config.addDefault("Abilities.Air.Flight.MaxHits", 4);
config.addDefault("Abilities.Air.Suffocate.Enabled", true);
config.addDefault("Abilities.Air.Suffocate.Description", "This ability is one of the most dangerous abilities an Airbender possesses. To use, simply look at an entity and hold shift. The entity will begin taking damage as you extract the air from their lungs. Any bender caught in this sphere will only be able to use basic moves, such as AirSwipe, WaterManipulation, FireBlast, or EarthBlast. An entity can be knocked out of the sphere by certain bending arts, and your attention will be disrupted if you are hit by bending.");
config.addDefault("Abilities.Air.Suffocate.ChargeTime", 500);
config.addDefault("Abilities.Air.Suffocate.Cooldown", 0);
config.addDefault("Abilities.Air.Suffocate.Range", 20);
@ -353,7 +544,8 @@ public class ConfigManager {
config.addDefault("Abilities.Air.Suffocate.AnimationRadius", 2.0);
config.addDefault("Abilities.Air.Suffocate.AnimationParticleAmount", 1);
config.addDefault("Abilities.Air.Suffocate.AnimationSpeed", 1.0);
config.addDefault("Abilities.Air.Tornado.Enabled", true);
config.addDefault("Abilities.Air.Tornado.Radius", 10);
config.addDefault("Abilities.Air.Tornado.Height", 25);
config.addDefault("Abilities.Air.Tornado.Range", 25);
@ -384,7 +576,6 @@ public class ConfigManager {
config.addDefault("Abilities.Water.Passive.SwimSpeedFactor", 0.7);
config.addDefault("Abilities.Water.Bloodbending.Enabled", true);
config.addDefault("Abilities.Water.Bloodbending.Description", "This ability was made illegal for a reason. With this ability selected, sneak while " + "targetting something and you will bloodbend that target. Bloodbent targets cannot move, " + "bend or attack. You are free to control their actions by looking elsewhere - they will " + "be forced to move in that direction. Additionally, clicking while bloodbending will " + "launch that target off in the direction you're looking. " + "People who are capable of bloodbending are immune to your technique, and you are immune to theirs.");
config.addDefault("Abilities.Water.Bloodbending.CanOnlyBeUsedAtNight", true);
config.addDefault("Abilities.Water.Bloodbending.CanBeUsedOnUndeadMobs", true);
config.addDefault("Abilities.Water.Bloodbending.ThrowFactor", 2);
@ -395,7 +586,6 @@ public class ConfigManager {
config.addDefault("Abilities.Water.Bloodbending.CanBloodbendOtherBloodbenders", false);
config.addDefault("Abilities.Water.HealingWaters.Enabled", true);
config.addDefault("Abilities.Water.HealingWaters.Description", "To use, the bender must be at least partially submerged in water. " + "If the user is not sneaking, this ability will automatically begin " + "working provided the user has it selected. If the user is sneaking, " + "he/she is channeling the healing to their target in front of them. " + "In order for this channel to be successful, the user and the target must " + "be at least partially submerged in water.");
config.addDefault("Abilities.Water.HealingWaters.ShiftRequired", true);
config.addDefault("Abilities.Water.HealingWaters.Radius", 5);
config.addDefault("Abilities.Water.HealingWaters.Interval", 750);
@ -409,10 +599,8 @@ public class ConfigManager {
config.addDefault("Abilities.Water.IceBlast.CollisionRadius", 2);
config.addDefault("Abilities.Water.IceBlast.Interval", 20);
config.addDefault("Abilities.Water.IceBlast.Cooldown", 1500);
config.addDefault("Abilities.Water.IceBlast.Description", "This ability offers a powerful ice utility for Waterbenders. It can be used to fire an explosive burst of ice at an opponent, spraying ice and snow around it. To use, simply tap sneak (Default: Shift) while targeting a block of ice to select it as a source. From there, you can just left click to send the blast off at your opponent.");
config.addDefault("Abilities.Water.IceSpike.Enabled", true);
config.addDefault("Abilities.Water.IceSpike.Description", "This ability has many functions. Clicking while targetting ice, or an entity over some ice, " + "will raise a spike of ice up, damaging and slowing the target. Tapping sneak (shift) while" + " selecting a water source will select that source that can then be fired with a click. Firing" + " this will launch a spike of ice at your target, dealing a bit of damage and slowing the target. " + "If you sneak (shift) while not selecting a source, many ice spikes will erupt from around you, " + "damaging and slowing those targets.");
config.addDefault("Abilities.Water.IceSpike.Cooldown", 2000);
config.addDefault("Abilities.Water.IceSpike.Damage", 2);
config.addDefault("Abilities.Water.IceSpike.Range", 20);
@ -437,7 +625,6 @@ public class ConfigManager {
config.addDefault("Abilities.Water.IceSpike.Blast.Interval", 20);
config.addDefault("Abilities.Water.OctopusForm.Enabled", true);
config.addDefault("Abilities.Water.OctopusForm.Description", "This ability allows the waterbender to manipulate a large quantity of water into a form resembling that of an octopus. " + "To use, click to select a water source. Then, hold sneak to channel this ability. " + "While channeling, the water will form itself around you and has a chance to block incoming attacks. " + "Additionally, you can click while channeling to attack things near you, dealing damage and knocking them back. " + "Releasing shift at any time will dissipate the form.");
config.addDefault("Abilities.Water.OctopusForm.Range", 10);
config.addDefault("Abilities.Water.OctopusForm.AttackRange", 2.5);
config.addDefault("Abilities.Water.OctopusForm.Radius", 3);
@ -448,21 +635,18 @@ public class ConfigManager {
config.addDefault("Abilities.Water.OctopusForm.AngleIncrement", 45);
config.addDefault("Abilities.Water.PhaseChange.Enabled", true);
config.addDefault("Abilities.Water.PhaseChange.Description", "To use, simply left-click. " + "Any water you are looking at within range will instantly freeze over into solid ice. " + "Provided you stay within range of the ice and do not unbind FreezeMelt, " + "that ice will not thaw. If, however, you do either of those the ice will instantly thaw. " + "If you sneak (default: shift), anything around where you are looking at will instantly melt. " + "Since this is a more favorable state for these things, they will never re-freeze unless they " + "would otherwise by nature or some other bending ability. Additionally, if you tap sneak while " + "targetting water with FreezeMelt, it will evaporate water around that block that is above " + "sea level. ");
config.addDefault("Abilities.Water.PhaseChange.Range", 20);
config.addDefault("Abilities.Water.PhaseChange.Radius", 5);
config.addDefault("Abilities.Water.PhaseChange.Freeze.Cooldown", 0);
config.addDefault("Abilities.Water.PhaseChange.Melt.Cooldown", 0);
config.addDefault("Abilities.Water.PlantArmor.Enabled", true);
config.addDefault("Abilities.Water.PlantArmor.Description", "PlantArmor is a defensive ability in the arsenal of the plantbender. Clicking on leaves with this ability will temporarily clad you in strong armor made out of plants! You can use this defensively, but you can also use the armor as a source for other plantbending skills.");
config.addDefault("Abilities.Water.PlantArmor.Duration", 7500);
config.addDefault("Abilities.Water.PlantArmor.Resistance", 1);
config.addDefault("Abilities.Water.PlantArmor.Cooldown", 10000);
config.addDefault("Abilities.Water.PlantArmor.Range", 10);
config.addDefault("Abilities.Water.Surge.Enabled", true);
config.addDefault("Abilities.Water.Surge.Description", "This ability has two distinct features. If you sneak to select a source block, you can then click in a direction and a large wave will be launched in that direction. If you sneak again while the wave is en route, the wave will freeze the next target it hits. If, instead, you click to select a source block, you can hold sneak to form a wall of water at your cursor location. Click to shift between a water wall and an ice wall. Release sneak to dissipate it.");
config.addDefault("Abilities.Water.Surge.Wave.Radius", 3);
config.addDefault("Abilities.Water.Surge.Wave.Range", 20);
config.addDefault("Abilities.Water.Surge.Wave.HorizontalPush", 1);
@ -476,7 +660,6 @@ public class ConfigManager {
config.addDefault("Abilities.Water.Surge.Wall.Interval", 30);
config.addDefault("Abilities.Water.Torrent.Enabled", true);
config.addDefault("Abilities.Water.Torrent.Description", "Torrent is one of the strongest moves in a waterbender's arsenal. To use, first click a source block to select it; then hold shift to begin streaming the water around you. Water flowing around you this way will damage and knock back nearby enemies and projectiles. If you release shift during this, you will create a large wave that expands outwards from you, launching anything in its path back. Instead, if you click you release the water and channel it to flow towards your cursor. Anything caught in the blast will be tossed about violently and take damage. Finally, if you click again when the water is torrenting, it will freeze the area around it when it is obstructed.");
config.addDefault("Abilities.Water.Torrent.Range", 25);
config.addDefault("Abilities.Water.Torrent.SelectRange", 10);
config.addDefault("Abilities.Water.Torrent.Damage", 3);
@ -498,9 +681,7 @@ public class ConfigManager {
config.addDefault("Abilities.Water.Plantbending.RegrowTime", 180000);
config.addDefault("Abilities.Water.WaterArms.Enabled", true);
config.addDefault("Abilities.Water.WaterArms.Description", "One of the most diverse moves in a Waterbender's arsenal, this move creates tendrils " + "of water from the players arms to emulate their actual arms. Each water arms mode will be binded to a slot, switch slots to change mode. " + "To deactive the arms, hold Sneak and Double Left-Click." + "\nPull - Use your Arms to pull blocks, items, mobs or even players towards you!" + "\nPunch - An offensive attack, harming players or mobs!" + "\nGrapple - Scale walls and speed across battlefields, using your Arms as a grappling hook!" + "\nGrab - Grab an entity with your arm, and swing them about!" + "\nFreeze - Use your Arms to fire small blasts of ice in any direction!" + "\nSpear - Throw your Arms in any direction, freezing whatever it hits!");
config.addDefault("Abilities.Water.WaterArms.SneakMessage", "Active Ability:");
config.addDefault("Abilities.Water.WaterArms.Arms.InitialLength", 4);
config.addDefault("Abilities.Water.WaterArms.Arms.SourceGrabRange", 4);
config.addDefault("Abilities.Water.WaterArms.Arms.MaxAttacks", 10);
@ -551,11 +732,9 @@ public class ConfigManager {
config.addDefault("Abilities.Water.WaterArms.Spear.NightAugments.Duration.FullMoon", 12000);
config.addDefault("Abilities.Water.WaterBubble.Enabled", true);
config.addDefault("Abilities.Water.WaterBubble.Description", "To use, the bender must hold down sneak. All water around the user in a small bubble will vanish, replacing itself once the user either gets too far away or selects a different ability.");
config.addDefault("Abilities.Water.WaterBubble.Radius", 7);
config.addDefault("Abilities.Water.WaterManipulation.Enabled", true);
config.addDefault("Abilities.Water.WaterManipulation.Description", "To use, place your cursor over a waterbendable object and tap sneak (default: shift). Smoke will appear where you've selected, indicating the origin of your ability. After you have selected an origin, simply left-click in any direction and you will see your water spout off in that direction, slicing any creature in its path. If you look towards a creature when you use this ability, it will target that creature. A collision from Water Manipulation both knocks the target back and deals some damage. Alternatively, if you have the source selected and tap shift again, you will be able to control the water more directly.");
config.addDefault("Abilities.Water.WaterManipulation.Damage", 3.0);
config.addDefault("Abilities.Water.WaterManipulation.Range", 30);
config.addDefault("Abilities.Water.WaterManipulation.SelectRange", 10);
@ -566,7 +745,6 @@ public class ConfigManager {
config.addDefault("Abilities.Water.WaterManipulation.Cooldown", 1000);
config.addDefault("Abilities.Water.WaterSpout.Enabled", true);
config.addDefault("Abilities.Water.WaterSpout.Description", "This ability provides a Waterbender with a means of transportation. To use, simply left click while in or over water to spout water up beneath you, experiencing controlled levitation. Left clicking again while the spout is active will cause it to disappear. Alternatively, tapping a Waterbendable block while not in Water will select a water block as a source, from there, you can tap sneak (Default:Shift) to channel the Water around you. Releasing the sneak will create a wave allowing you a quick burst of controlled transportation. While riding the wave you may press sneak to cause the wave to disappear.");
config.addDefault("Abilities.Water.WaterSpout.Height", 20);
config.addDefault("Abilities.Water.WaterSpout.Interval", 50);
config.addDefault("Abilities.Water.WaterSpout.BlockSpiral", false);
@ -598,13 +776,11 @@ public class ConfigManager {
config.addDefault("Properties.Earth.Passive.SandRunSpeed", 0);
config.addDefault("Abilities.Earth.Catapult.Enabled", true);
config.addDefault("Abilities.Earth.Catapult.Description", "To use, left-click while looking in the direction you want to be launched. " + "A pillar of earth will jut up from under you and launch you in that direction - " + "if and only if there is enough earth behind where you're looking to launch you. " + "Skillful use of this ability takes much time and work, and it does result in the " + "death of certain gung-ho earthbenders. If you plan to use this ability, be sure " + "you've read about your passive ability you innately have as an earthbender.");
config.addDefault("Abilities.Earth.Catapult.Length", 6);
config.addDefault("Abilities.Earth.Catapult.Push", 4);
config.addDefault("Abilities.Earth.Catapult.ShiftModifier", 2);
config.addDefault("Abilities.Earth.Collapse.Enabled", true);
config.addDefault("Abilities.Earth.Collapse.Description", " To use, simply left-click on an earthbendable block. " + "That block and the earthbendable blocks above it will be shoved " + "back into the earth below them, if they can. " + "This ability does have the capacity to trap something inside of it, " + "although it is incredibly difficult to do so. " + "Additionally, press sneak with this ability to affect an area around your targetted location - " + "all earth that can be moved downwards will be moved downwards. " + "This ability is especially risky or deadly in caves, depending on the " + "earthbender's goal and technique.");
config.addDefault("Abilities.Earth.Collapse.SelectRange", 20);
config.addDefault("Abilities.Earth.Collapse.Radius", 7);
config.addDefault("Abilities.Earth.Collapse.Speed", 8);
@ -614,14 +790,12 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.Collapse.Wall.Cooldown", 500);
config.addDefault("Abilities.Earth.EarthArmor.Enabled", true);
config.addDefault("Abilities.Earth.EarthArmor.Description", "This ability encases the earthbender in temporary armor. To use, click on a block that is earthbendable. If there is another block under it that is earthbendable, the block will fly to you and grant you temporary armor and damage reduction. This ability has a long cooldown.");
config.addDefault("Abilities.Earth.EarthArmor.SelectRange", 7);
config.addDefault("Abilities.Earth.EarthArmor.Duration", 10000);
config.addDefault("Abilities.Earth.EarthArmor.Strength", 2);
config.addDefault("Abilities.Earth.EarthArmor.Cooldown", 17500);
config.addDefault("Abilities.Earth.EarthBlast.Enabled", true);
config.addDefault("Abilities.Earth.EarthBlast.Description", "To use, place your cursor over an earthbendable object (dirt, rock, ores, etc) " + "and tap sneak (default: shift). The object will temporarily turn to stone, " + "indicating that you have it focused as the source for your ability. " + "After you have selected an origin (you no longer need to be sneaking), " + "simply left-click in any direction and you will see your object launch " + "off in that direction, smashing into any creature in its path. If you look " + "towards a creature when you use this ability, it will target that creature. " + "A collision from Earth Blast both knocks the target back and deals some damage. " + "You cannot have multiple of these abilities flying at the same time.");
config.addDefault("Abilities.Earth.EarthBlast.CanHitSelf", false);
config.addDefault("Abilities.Earth.EarthBlast.SelectRange", 10);
config.addDefault("Abilities.Earth.EarthBlast.Range", 30);
@ -634,13 +808,11 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.EarthBlast.CollisionRadius", 2);
config.addDefault("Abilities.Earth.EarthGrab.Enabled", true);
config.addDefault("Abilities.Earth.EarthGrab.Description", "To use, simply left-click while targeting a creature within range. " + "This ability will erect a circle of earth to trap the creature in.");
config.addDefault("Abilities.Earth.EarthGrab.SelectRange", 8);
config.addDefault("Abilities.Earth.EarthGrab.Height", 6);
config.addDefault("Abilities.Earth.EarthGrab.Cooldown", 500);
config.addDefault("Abilities.Earth.EarthTunnel.Enabled", true);
config.addDefault("Abilities.Earth.EarthTunnel.Description", "Earth Tunnel is a completely utility ability for earthbenders. To use, simply sneak (default: shift) in the direction you want to tunnel. You will slowly begin tunneling in the direction you're facing for as long as you sneak or if the tunnel has been dug long enough. This ability will be interrupted if it hits a block that cannot be earthbent.");
config.addDefault("Abilities.Earth.EarthTunnel.MaxRadius", 1);
config.addDefault("Abilities.Earth.EarthTunnel.Range", 10);
config.addDefault("Abilities.Earth.EarthTunnel.Radius", 0.25);
@ -648,14 +820,12 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.EarthTunnel.Interval", 30);
config.addDefault("Abilities.Earth.Extraction.Enabled", true);
config.addDefault("Abilities.Earth.Extraction.Description", "This ability allows metalbenders to extract the minerals from ore blocks. To use, simply tap sneak while looking at an ore block with metal in it (iron, gold, quartz) and the ore will be extracted and drop in front of you. This ability has a small chance of doubling or tripling the loot. This ability has a short cooldown.");
config.addDefault("Abilities.Earth.Extraction.SelectRange", 5);
config.addDefault("Abilities.Earth.Extraction.Cooldown", 500);
config.addDefault("Abilities.Earth.Extraction.TripleLootChance", 15);
config.addDefault("Abilities.Earth.Extraction.DoubleLootChance", 40);
config.addDefault("Abilities.Earth.LavaFlow.Enabled", true);
config.addDefault("Abilities.Earth.LavaFlow.Description", "This ability allows an Earthbender to create lava using the Earth around them. To use, simply hold sneak (Default: Shift) to create a lava moat that surrounds you, press sneak again to remove the moat. Left click an Earthbendable block to create a pool of lava after a small delay. Additionally, you can left click at any time to turn lava back into its original state -- Earth.");
config.addDefault("Abilities.Earth.LavaFlow.ShiftCooldown", 20000);
config.addDefault("Abilities.Earth.LavaFlow.ClickLavaCooldown", 10000);
config.addDefault("Abilities.Earth.LavaFlow.ClickLandCooldown", 500);
@ -678,7 +848,6 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.LavaFlow.ParticleDensity", 0.11);
config.addDefault("Abilities.Earth.EarthSmash.Enabled", true);
config.addDefault("Abilities.Earth.EarthSmash.Description", "To raise an EarthSmash hold sneak (default: shift) for approximately 1.5 seconds, " + "then release while aiming at dirt. To grab the EarthSmash aim at the center and hold sneak, " + "the EarthSmash will follow your mouse. You can shoot the EarthSmash by grabbing onto it and left clicking. " + "To ride the EarthSmash simply hop ontop of it and hold sneak while aiming in the direction that you wish to go. " + "Another way to ride an EarthSmash is to grab it with sneak and then right click it. " + "Use EarthSmash as a defensive shield, a powerful attack, or an advanced means of transportation.");
config.addDefault("Abilities.Earth.EarthSmash.AllowGrab", true);
config.addDefault("Abilities.Earth.EarthSmash.AllowFlight", true);
config.addDefault("Abilities.Earth.EarthSmash.GrabRange", 10);
@ -700,8 +869,7 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.EarthSmash.GrabDetectionRadius", 2.5);
config.addDefault("Abilities.Earth.EarthSmash.FlightDetectionRadius", 3.5);
config.addDefault("Abilities.Earth.MetalClips.Enabled", true);
config.addDefault("Abilities.Earth.MetalClips.Description", "MetalClips has the potential to be both an offensive and a utility ability. To start, you must carry smelted Iron Ingots in your inventory. To apply the clips onto an entity, simply click at them. If the entity is a Zombie, a Skeleton, or a Player, the clips will form armor around the entity, giving you some control over them. Each additional clip will give you more control. If you have permission to do so, you may crush the entity against a wall with a 4th clip, hurting them. Without explicit permissions, you will only be able to strap three clips on your target. If the entity is not one of the above, the clip will simply do damage and fall to the ground, to be collected. Another permission requiring action is throwing entities. To do so, click while controlling a metalclipped entity");
config.addDefault("Abilities.Earth.MetalClips.Enabled", true);
config.addDefault("Abilities.Earth.MetalClips.Damage", 2);
config.addDefault("Abilities.Earth.MetalClips.DamageInterval", 500);
config.addDefault("Abilities.Earth.MetalClips.Range", 10);
@ -712,7 +880,6 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.MetalClips.ThrowEnabled", false);
config.addDefault("Abilities.Earth.RaiseEarth.Enabled", true);
config.addDefault("Abilities.Earth.RaiseEarth.Description", "To use, simply left-click on an earthbendable block. " + "A column of earth will shoot upwards from that location. " + "Anything in the way of the column will be brought up with it, " + "leaving talented benders the ability to trap brainless entities up there. " + "Additionally, simply sneak (default shift) looking at an earthbendable block. " + "A wall of earth will shoot upwards from that location. " + "Anything in the way of the wall will be brought up with it. ");
config.addDefault("Abilities.Earth.RaiseEarth.Speed", 8);
config.addDefault("Abilities.Earth.RaiseEarth.Column.SelectRange", 20);
config.addDefault("Abilities.Earth.RaiseEarth.Column.Height", 6);
@ -723,7 +890,6 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.RaiseEarth.Wall.Cooldown", 500);
config.addDefault("Abilities.Earth.Shockwave.Enabled", true);
config.addDefault("Abilities.Earth.Shockwave.Description", "This is one of the most powerful moves in the earthbender's arsenal. " + "To use, you must first charge it by holding sneak (default: shift). " + "Once charged, you can release sneak to create an enormous shockwave of earth, " + "disturbing all earth around you and expanding radially outwards. " + "Anything caught in the shockwave will be blasted back and dealt damage. " + "If you instead click while charged, the disruption is focused in a cone in front of you. " + "Lastly, if you fall from a great enough height with this ability selected, you will automatically create a shockwave.");
config.addDefault("Abilities.Earth.Shockwave.FallThreshold", 10);
config.addDefault("Abilities.Earth.Shockwave.ChargeTime", 2500);
config.addDefault("Abilities.Earth.Shockwave.Cooldown", 1500);
@ -733,7 +899,6 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.Shockwave.Angle", 40);
config.addDefault("Abilities.Earth.SandSpout.Enabled", true);
config.addDefault("Abilities.Earth.SandSpout.Description", "SandSpout is a core move for travelling, evasion, and mobility for sandbenders. To use, simply left click while over sand or sandstone, and a column of sand will form at your feet, enabling you to levitate. Any mobs or players that touch your column will receive damage and be blinded. Beware, as the spout will stop working when no longer over sand!");
config.addDefault("Abilities.Earth.SandSpout.Height", 9);
config.addDefault("Abilities.Earth.SandSpout.BlindnessTime", 10);
config.addDefault("Abilities.Earth.SandSpout.SpoutDamage", 1);
@ -741,7 +906,6 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.SandSpout.Interval", 100);
config.addDefault("Abilities.Earth.Tremorsense.Enabled", true);
config.addDefault("Abilities.Earth.Tremorsense.Description", "This is a pure utility ability for earthbenders. If you are in an area of low-light and are standing on top of an earthbendable block, this ability will automatically turn that block into glowstone, visible *only by you*. If you lose contact with a bendable block, the light will go out as you have lost contact with the earth and cannot 'see' until you can touch earth again. Additionally, if you click with this ability selected, smoke will appear above nearby earth with pockets of air beneath them.");
config.addDefault("Abilities.Earth.Tremorsense.MaxDepth", 10);
config.addDefault("Abilities.Earth.Tremorsense.Radius", 5);
config.addDefault("Abilities.Earth.Tremorsense.LightThreshold", 7);
@ -750,7 +914,6 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.EarthCombo.Enabled", true);
config.addDefault("Abilities.Fire.Blaze.Enabled", true);
config.addDefault("Abilities.Fire.Blaze.Description", "To use, simply left-click in any direction. An arc of fire will flow from your location, igniting anything in its path. Additionally, tap sneak to engulf the area around you in roaring flames.");
config.addDefault("Abilities.Fire.Blaze.Arc", 16);
config.addDefault("Abilities.Fire.Blaze.Range", 7);
config.addDefault("Abilities.Fire.Blaze.Speed", 15);
@ -760,7 +923,6 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.Blaze.Ring.Cooldown", 500);
config.addDefault("Abilities.Fire.Combustion.Enabled", true);
config.addDefault("Abilities.Fire.Combustion.Description", "Combustion is a powerful ability only known by a few skilled Firebenders. It allows the bender to Firebend with their mind, concentrating energy to create a powerful blast. To use, simply tap sneak (Default: Shift) to launch the blast. This technique is highly destructive and very effective, it also comes with a long cooldown.");
config.addDefault("Abilities.Fire.Combustion.Cooldown", 10000);
config.addDefault("Abilities.Fire.Combustion.BreakBlocks", false);
config.addDefault("Abilities.Fire.Combustion.Power", 1.0);
@ -770,7 +932,6 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.Combustion.Speed", 25);
config.addDefault("Abilities.Fire.FireBlast.Enabled", true);
config.addDefault("Abilities.Fire.FireBlast.Description", "FireBlast is the most fundamental bending technique of a firebender. " + "To use, simply left-click in a direction. A blast of fire will be created at your fingertips. " + "If this blast contacts an enemy, it will dissipate and engulf them in flames, " + "doing additional damage and knocking them back slightly. " + "If the blast hits terrain, it will ignite the nearby area. " + "Additionally, if you hold sneak, you will charge up the fireblast. " + "If you release it when it's charged, it will instead launch a powerful " + "fireball that explodes on contact.");
config.addDefault("Abilities.Fire.FireBlast.Speed", 20);
config.addDefault("Abilities.Fire.FireBlast.Range", 20);
config.addDefault("Abilities.Fire.FireBlast.CollisionRadius", 2);
@ -791,7 +952,6 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.FireBlast.Charged.FireTicks", 4);
config.addDefault("Abilities.Fire.FireBurst.Enabled", true);
config.addDefault("Abilities.Fire.FireBurst.Description", "FireBurst is a very powerful firebending ability. " + "To use, press and hold sneak to charge your burst. " + "Once charged, you can either release sneak to release the burst in a sphere around you or " + "click to launch a cone-shaped burst of flames in front of you.");
config.addDefault("Abilities.Fire.FireBurst.Damage", 2);
config.addDefault("Abilities.Fire.FireBurst.ChargeTime", 3500);
config.addDefault("Abilities.Fire.FireBurst.Cooldown", 0);
@ -801,14 +961,12 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.FireBurst.ParticlesPercentage", 5);
config.addDefault("Abilities.Fire.FireJet.Enabled", true);
config.addDefault("Abilities.Fire.FireJet.Description", "This ability is used for a limited burst of flight for firebenders. Clicking with this " + "ability selected will launch you in the direction you're looking, granting you " + "controlled flight for a short time. This ability can be used mid-air to prevent falling " + "to your death, but on the ground it can only be used if standing on a block that's " + "ignitable (e.g. not snow or water).");
config.addDefault("Abilities.Fire.FireJet.Speed", 0.8);
config.addDefault("Abilities.Fire.FireJet.Duration", 2000);
config.addDefault("Abilities.Fire.FireJet.Cooldown", 7000);
config.addDefault("Abilities.Fire.FireJet.IsAvatarStateToggle", true);
config.addDefault("Abilities.Fire.FireShield.Enabled", true);
config.addDefault("Abilities.Fire.FireShield.Description", "FireShield is a basic defensive ability. " + "Clicking with this ability selected will create a " + "small disc of fire in front of you, which will block most " + "attacks and bending. Alternatively, pressing and holding " + "sneak creates a very small shield of fire, blocking most attacks. " + "Creatures that contact this fire are ignited.");
config.addDefault("Abilities.Fire.FireShield.Radius", 3);
config.addDefault("Abilities.Fire.FireShield.DiscRadius", 1.5);
config.addDefault("Abilities.Fire.FireShield.Duration", 1000);
@ -817,7 +975,6 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.FireShield.FireTicks", 4);
config.addDefault("Abilities.Fire.HeatControl.Enabled", true);
config.addDefault("Abilities.Fire.HeatControl.Description", "While this ability is selected, the firebender becomes impervious " + "to fire damage and cannot be ignited. " + "If the user left-clicks with this ability, the targeted area will be " + "extinguished, although it will leave any creature burning engulfed in flames. " + "This ability can also cool lava. If this ability is used while targetting ice or snow, it" + " will instead melt blocks in that area. Finally, sneaking with this ability will cook any food in your hand.");
config.addDefault("Abilities.Fire.HeatControl.Extinguish.Range", 20);
config.addDefault("Abilities.Fire.HeatControl.Extinguish.Radius", 7);
config.addDefault("Abilities.Fire.HeatControl.Extinguish.Cooldown", 500);
@ -829,12 +986,10 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.HeatControl.Cook.CookTime", 2000);
config.addDefault("Abilities.Fire.Illumination.Enabled", true);
config.addDefault("Abilities.Fire.Illumination.Description", "This ability gives firebenders a means of illuminating the area. It is a toggle - clicking " + "will create a torch that follows you around. The torch will only appear on objects that are " + "ignitable and can hold a torch (e.g. not leaves or ice). If you get too far away from the torch, " + "it will disappear, but will reappear when you get on another ignitable block. Clicking again " + "dismisses this torch.");
config.addDefault("Abilities.Fire.Illumination.Range", 5);
config.addDefault("Abilities.Fire.Illumination.Cooldown", 500);
config.addDefault("Abilities.Fire.Lightning.Enabled", true);
config.addDefault("Abilities.Fire.Lightning.Description", "Hold sneak while selecting this ability to charge up a lightning strike. Once charged, release sneak to discharge the lightning to the targeted location.");
config.addDefault("Abilities.Fire.Lightning.Damage", 6.0);
config.addDefault("Abilities.Fire.Lightning.Range", 20.0);
config.addDefault("Abilities.Fire.Lightning.ChargeTime", 2500);
@ -853,7 +1008,6 @@ public class ConfigManager {
config.addDefault("Abilities.Fire.Lightning.ArcOnIce", false);
config.addDefault("Abilities.Fire.WallOfFire.Enabled", true);
config.addDefault("Abilities.Fire.WallOfFire.Description", "To use this ability, click at a location. A wall of fire will appear at this location, igniting enemies caught in it and blocking projectiles.");
config.addDefault("Abilities.Fire.WallOfFire.Range", 4);
config.addDefault("Abilities.Fire.WallOfFire.Height", 4);
config.addDefault("Abilities.Fire.WallOfFire.Width", 4);
@ -896,46 +1050,38 @@ public class ConfigManager {
config.addDefault("Abilities.Chi.ChiCombo.Immobilize.Cooldown", 15000);
config.addDefault("Abilities.Chi.AcrobatStance.Enabled", true);
config.addDefault("Abilities.Chi.AcrobatStance.Description", "AcrobatStance gives a Chiblocker a higher probability of blocking a Bender's Chi while granting them a Speed and Jump Boost. It also increases the rate at which the hunger bar depletes. To use, simply left click. Left clicking again will de-activate the stance.");
config.addDefault("Abilities.Chi.AcrobatStance.ChiBlockBoost", 5);
config.addDefault("Abilities.Chi.AcrobatStance.Speed", 1);
config.addDefault("Abilities.Chi.AcrobatStance.Jump", 1);
config.addDefault("Abilities.Chi.HighJump.Enabled", true);
config.addDefault("Abilities.Chi.HighJump.Description", "To use this ability, simply click. You will jump quite high. This ability has a short cooldown.");
config.addDefault("Abilities.Chi.HighJump.Height", 1);
config.addDefault("Abilities.Chi.HighJump.Cooldown", 3000);
config.addDefault("Abilities.Chi.Paralyze.Enabled", true);
config.addDefault("Abilities.Chi.Paralyze.Description", "Paralyzes the target, making them unable to do anything for a short " + "period of time. This ability has a long cooldown.");
config.addDefault("Abilities.Chi.Paralyze.Cooldown", 10000);
config.addDefault("Abilities.Chi.Paralyze.Duration", 2000);
config.addDefault("Abilities.Chi.RapidPunch.Enabled", true);
config.addDefault("Abilities.Chi.RapidPunch.Description", "This ability allows the chiblocker to punch rapidly in a short period. To use, simply punch. This has a short cooldown.");
config.addDefault("Abilities.Chi.RapidPunch.Damage", 1);
config.addDefault("Abilities.Chi.RapidPunch.Distance", 3);
config.addDefault("Abilities.Chi.RapidPunch.Cooldown", 6000);
config.addDefault("Abilities.Chi.RapidPunch.Punches", 3);
config.addDefault("Abilities.Chi.Smokescreen.Enabled", true);
config.addDefault("Abilities.Chi.Smokescreen.Description", "Smokescren, if used correctly, can serve as a defensive and offensive ability for Chiblockers. To use, simply left click and you will toss out a Smoke Bomb. When the bomb hits the ground, it will explode and give all players within a small radius of the explosion temporary blindness, allowing you to either get away, or move in for the kill. This ability has a long cooldown.");
config.addDefault("Abilities.Chi.Smokescreen.Cooldown", 25000);
config.addDefault("Abilities.Chi.Smokescreen.Radius", 4);
config.addDefault("Abilities.Chi.Smokescreen.Duration", 12);
config.addDefault("Abilities.Chi.WarriorStance.Enabled", true);
config.addDefault("Abilities.Chi.WarriorStance.Description", "WarriorStance gives a Chiblocker increased damage but makes them a tad more vulnerable. To activate, simply left click.");
config.addDefault("Abilities.Chi.WarriorStance.Strength", 0);
config.addDefault("Abilities.Chi.WarriorStance.Resistance", -1);
config.addDefault("Abilities.Chi.QuickStrike.Enabled", true);
config.addDefault("Abilities.Chi.QuickStrike.Description", "QuickStrike enables a chiblocker to quickly strike an enemy, potentially blocking their chi.");
config.addDefault("Abilities.Chi.QuickStrike.Damage", 1);
config.addDefault("Abilities.Chi.QuickStrike.ChiBlockChance", 10);
config.addDefault("Abilities.Chi.SwiftKick.Enabled", true);
config.addDefault("Abilities.Chi.SwiftKick.Description", "SwiftKick allows a chiblocker to swiftly kick an enemy, potentially blocking their chi. The chiblocker must be in the air to use this ability.");
config.addDefault("Abilities.Chi.SwiftKick.Damage", 2);
config.addDefault("Abilities.Chi.SwiftKick.ChiBlockChance", 15);
config.addDefault("Abilities.Chi.SwiftKick.Cooldown", 4000);

View file

@ -10,10 +10,11 @@ public class ConfigType {
public static final ConfigType DEFAULT = new ConfigType("Default");
public static final ConfigType PRESETS = new ConfigType("Presets");
public static final ConfigType DEATH_MESSAGE = new ConfigType("DeathMessage");
public static final ConfigType[] CORE_TYPES = {DEFAULT, PRESETS, DEATH_MESSAGE};
public static final ConfigType LANGUAGE = new ConfigType("Language");
public static final ConfigType[] CORE_TYPES = {DEFAULT, PRESETS, DEATH_MESSAGE, LANGUAGE};
private static HashMap<String, ConfigType> allTypes = new HashMap<>();
private static List<ConfigType> addonTypes = new ArrayList<>();
private static HashMap<String, ConfigType> allTypes = new HashMap<String, ConfigType>();
private static List<ConfigType> addonTypes = new ArrayList<ConfigType>();
private String string;