Tab completion

This commit is contained in:
ZeroEpoch1969
2019-01-28 21:57:41 -07:00
parent d7931793f1
commit 5b2334c60f
25 changed files with 632 additions and 22 deletions

View File

@ -1,5 +1,8 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.GameRuleHandler;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
@ -160,5 +163,18 @@ public class Command_toggle extends FreedomCommand
{
msg(name + " now " + (entry.setBoolean(!entry.getBoolean()) ? "enabled." : "disabled."));
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (args.length == 1)
{
return Arrays.asList(
"waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk",
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives");
}
return Collections.emptyList();
}
}