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);
|
||||
|
||||
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)) {
|
||||
s.sendMessage(Methods.getAirColor() + "You must be an Airbender to bind this ability.");
|
||||
return true;
|
||||
|
@ -170,6 +174,11 @@ public class Commands {
|
|||
s.sendMessage(ChatColor.RED + "Slot must be an integer between 1 and 9.");
|
||||
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)) {
|
||||
s.sendMessage(Methods.getAirColor() + "You must be an Airbender to bind this ability.");
|
||||
|
|
Loading…
Reference in a new issue