mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +00:00
/b display wont show abilities player cant use
This one actually does it
This commit is contained in:
parent
86707725b8
commit
9bd3772148
2 changed files with 10 additions and 5 deletions
|
@ -215,7 +215,7 @@ public class Commands {
|
|||
return true;
|
||||
}
|
||||
for (String st: AbilityModuleManager.airbendingabilities) {
|
||||
if (Methods.canBend(s.getName(), st)) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getAirColor() + st);
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ public class Commands {
|
|||
return true;
|
||||
}
|
||||
for (String st: AbilityModuleManager.waterbendingabilities) {
|
||||
if (Methods.canBend(s.getName(), st)) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getWaterColor() + st);
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ public class Commands {
|
|||
return true;
|
||||
}
|
||||
for (String st: AbilityModuleManager.earthbendingabilities) {
|
||||
if (Methods.canBend(s.getName(), st)) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getEarthColor() + st);
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ public class Commands {
|
|||
return true;
|
||||
}
|
||||
for (String st: AbilityModuleManager.firebendingabilities) {
|
||||
if (Methods.canBend(s.getName(), st)) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getFireColor() + st);
|
||||
}
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ public class Commands {
|
|||
}
|
||||
|
||||
for (String st: AbilityModuleManager.chiabilities) {
|
||||
if (Methods.canBend(s.getName(), st)) {
|
||||
if (Methods.hasPermission((Player) s, st)) {
|
||||
s.sendMessage(Methods.getChiColor() + st);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -446,6 +446,11 @@ public class Methods {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public static boolean hasPermission(Player player, String ability) {
|
||||
if (player.hasPermission("bending.ability." + ability)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canBendPassive(String player, Element element) {
|
||||
BendingPlayer bPlayer = getBendingPlayer(player);
|
||||
|
|
Loading…
Reference in a new issue