mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
/b bind wont bind abilities player cant use
This commit is contained in:
parent
9bd3772148
commit
d4cad612ec
1 changed files with 9 additions and 0 deletions
|
@ -131,6 +131,10 @@ public class Commands {
|
||||||
|
|
||||||
String ability = Methods.getAbility(abil);
|
String ability = Methods.getAbility(abil);
|
||||||
|
|
||||||
|
if (!Methods.canBend(s.getName(), ability)) {
|
||||||
|
s.sendMessage(ChatColor.RED + "You don't have permission to do that.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (Methods.isAirAbility(ability) && !Methods.isBender(s.getName(), Element.Air)) {
|
if (Methods.isAirAbility(ability) && !Methods.isBender(s.getName(), Element.Air)) {
|
||||||
s.sendMessage(Methods.getAirColor() + "You must be an Airbender to bind this ability.");
|
s.sendMessage(Methods.getAirColor() + "You must be an Airbender to bind this ability.");
|
||||||
return true;
|
return true;
|
||||||
|
@ -171,6 +175,11 @@ public class Commands {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Methods.canBend(s.getName(), ability)) {
|
||||||
|
s.sendMessage(ChatColor.RED + "You don't have permission to do that.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (Methods.isAirAbility(ability) && !Methods.isBender(s.getName(), Element.Air)) {
|
if (Methods.isAirAbility(ability) && !Methods.isBender(s.getName(), Element.Air)) {
|
||||||
s.sendMessage(Methods.getAirColor() + "You must be an Airbender to bind this ability.");
|
s.sendMessage(Methods.getAirColor() + "You must be an Airbender to bind this ability.");
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue