mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 04:39:32 +00:00
Merge pull request #448 from StrangeOne101/master
Add Forgotten Changes
This commit is contained in:
commit
efa0d4a9bd
|
@ -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