mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
/bending bind is prettier
Now displays the slot # The color of the message matches the color of the element.
This commit is contained in:
parent
32c0646524
commit
3bd2e51b71
2 changed files with 36 additions and 2 deletions
|
@ -151,7 +151,7 @@ public class Commands {
|
|||
}
|
||||
|
||||
Methods.bindAbility((Player) s, ability);
|
||||
s.sendMessage("Ability Bound.");
|
||||
// s.sendMessage("Ability Bound to slot");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ public class Commands {
|
|||
return true;
|
||||
}
|
||||
Methods.bindAbility((Player) s, ability, slot);
|
||||
s.sendMessage("Ability Bound");
|
||||
// s.sendMessage("Ability Bound");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,11 +204,45 @@ public class Methods {
|
|||
int slot = player.getInventory().getHeldItemSlot() + 1;
|
||||
BendingPlayer bPlayer = getBendingPlayer(player.getName());
|
||||
bPlayer.abilities.put(slot, ability);
|
||||
if (isAirAbility(ability)) {
|
||||
player.sendMessage(getAirColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isWaterAbility(ability)) {
|
||||
player.sendMessage(getWaterColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isEarthAbility(ability)) {
|
||||
player.sendMessage(getEarthColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isFireAbility(ability)) {
|
||||
player.sendMessage(getFireColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isChiAbility(ability)) {
|
||||
player.sendMessage(getChiColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
} else {
|
||||
player.sendMessage(getAvatarColor() + "Successfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
}
|
||||
|
||||
public static void bindAbility(Player player, String ability, int slot) {
|
||||
BendingPlayer bPlayer = getBendingPlayer(player.getName());
|
||||
bPlayer.abilities.put(slot, ability);
|
||||
if (isAirAbility(ability)) {
|
||||
player.sendMessage(getAirColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isWaterAbility(ability)) {
|
||||
player.sendMessage(getWaterColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isEarthAbility(ability)) {
|
||||
player.sendMessage(getEarthColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isFireAbility(ability)) {
|
||||
player.sendMessage(getFireColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
else if (isChiAbility(ability)) {
|
||||
player.sendMessage(getChiColor() + "Succesfully bound " + ability + " to slot " + slot);
|
||||
} else {
|
||||
player.sendMessage(getAvatarColor() + "Successfully bound " + ability + " to slot " + slot);
|
||||
}
|
||||
}
|
||||
public static boolean abilityExists(String string) {
|
||||
if (getAbility(string) == null) return false;
|
||||
|
|
Loading…
Reference in a new issue