mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Add Forgotten Changes
• Just added some small things that were forgotten in the last commit
This commit is contained in:
parent
eedc65cc21
commit
0e99fbef4d
2 changed files with 9 additions and 0 deletions
|
@ -98,6 +98,13 @@ public class AddCommand extends PKCommand {
|
|||
return;
|
||||
}
|
||||
bPlayer.addElement(e);
|
||||
|
||||
for (SubElement sub : Element.getAllSubElements()) {
|
||||
if (sub.getParentElement() == e && bPlayer.hasSubElementPermission(sub)) {
|
||||
bPlayer.addSubElement(sub);
|
||||
}
|
||||
}
|
||||
|
||||
ChatColor color = e.getColor();
|
||||
|
||||
if (!(sender instanceof Player) || !((Player) sender).equals(target)) {
|
||||
|
@ -106,6 +113,7 @@ public class AddCommand extends PKCommand {
|
|||
target.sendMessage(color + added.replace("{element}", e.getName() + e.getType().getBender()));
|
||||
}
|
||||
GeneralMethods.saveElements(bPlayer);
|
||||
GeneralMethods.saveSubElements(bPlayer);
|
||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, target, e, Result.ADD));
|
||||
return;
|
||||
} else if (Arrays.asList(Element.getAllSubElements()).contains(e)) {
|
||||
|
|
|
@ -138,6 +138,7 @@ public class ChooseCommand extends PKCommand {
|
|||
target.sendMessage(color + chosen.replace("{element}", element.getName() + element.getType().getBender()));
|
||||
}
|
||||
GeneralMethods.saveElements(bPlayer);
|
||||
GeneralMethods.saveSubElements(bPlayer);
|
||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, target, element, Result.CHOOSE));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue