mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
Merge pull request #303 from StrangeOne101/master
Fix Missing Autotab Arguments
This commit is contained in:
commit
abf67ecad6
1 changed files with 18 additions and 3 deletions
|
@ -15,6 +15,8 @@ import com.projectkorra.projectkorra.Element;
|
|||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.SubElement;
|
||||
import com.projectkorra.projectkorra.ability.AbilityModuleManager;
|
||||
import com.projectkorra.projectkorra.ability.combo.ComboAbilityModule;
|
||||
import com.projectkorra.projectkorra.ability.combo.ComboModuleManager;
|
||||
import com.projectkorra.projectkorra.object.Preset;
|
||||
|
||||
/**
|
||||
|
@ -60,6 +62,17 @@ public class BendingTabComplete implements TabCompleter
|
|||
list.add("Fire");
|
||||
list.add("Water");
|
||||
list.add("Chi");
|
||||
list.add("Bloodbending");
|
||||
list.add("Combustion");
|
||||
list.add("Flight");
|
||||
list.add("Healing");
|
||||
list.add("Ice");
|
||||
list.add("Lava");
|
||||
list.add("Lightning");
|
||||
list.add("Metal");
|
||||
list.add("Plantbending");
|
||||
list.add("Sand");
|
||||
list.add("SpiritualProjection");
|
||||
list.add("AirCombos");
|
||||
list.add("EarthCombos");
|
||||
list.add("FireCombos");
|
||||
|
@ -95,15 +108,17 @@ public class BendingTabComplete implements TabCompleter
|
|||
for (Element e : Element.values()) {
|
||||
list.add(e.toString());
|
||||
}
|
||||
for (SubElement e : SubElement.values()) {
|
||||
list.add(e.toString());
|
||||
}
|
||||
List<String> abils = new ArrayList<String>();
|
||||
for (String abil : AbilityModuleManager.abilities) {
|
||||
if (GeneralMethods.canBend(sender.getName(), abil)) {
|
||||
abils.add(abil);
|
||||
}
|
||||
}
|
||||
for (ComboAbilityModule abil : ComboModuleManager.combo) {
|
||||
if (GeneralMethods.canBend(sender.getName(), abil.getName())) {
|
||||
abils.add(abil.getName());
|
||||
}
|
||||
}
|
||||
Collections.sort(abils);
|
||||
list.addAll(abils);
|
||||
return getPossibleCompletionsForGivenArgs(args, list);
|
||||
|
|
Loading…
Reference in a new issue