mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
commit
3a74a23d8b
6 changed files with 21 additions and 13 deletions
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||
public class AddCommand extends PKCommand {
|
||||
|
||||
public AddCommand() {
|
||||
super("add", "/bending add <Player> [Element]", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.", new String[] { "add", "a" });
|
||||
super("add", "/bending add <Element> [Player]", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.", new String[] { "add", "a" });
|
||||
}
|
||||
|
||||
public void execute(CommandSender sender, List<String> args) {
|
||||
|
@ -35,12 +35,12 @@ public class AddCommand extends PKCommand {
|
|||
if (!hasPermission(sender, "others")) {
|
||||
return;
|
||||
}
|
||||
Player player = Bukkit.getPlayer(args.get(0));
|
||||
Player player = Bukkit.getPlayer(args.get(1));
|
||||
if (player == null) {
|
||||
sender.sendMessage(ChatColor.RED + "That player is not online.");
|
||||
return;
|
||||
}
|
||||
add(sender, player, args.get(1).toLowerCase());
|
||||
add(sender, player, args.get(0).toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import org.bukkit.entity.Player;
|
|||
|
||||
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;
|
||||
|
@ -85,11 +84,20 @@ public class BendingTabComplete implements TabCompleter
|
|||
{
|
||||
if (args.length > 3 || !sender.hasPermission("bending.command.add")) return new ArrayList<String>();
|
||||
List<String> l = new ArrayList<String>();
|
||||
if (args.length == 2)
|
||||
{
|
||||
l.add("Air");
|
||||
l.add("Earth");
|
||||
l.add("Fire");
|
||||
l.add("Water");
|
||||
l.add("Chi");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||
l.add(p.getName());
|
||||
}
|
||||
}
|
||||
return getPossibleCompletionsForGivenArgs(args, l);
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("clear") || args[0].equalsIgnoreCase("cl") || args[0].equalsIgnoreCase("c"))
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.util.List;
|
|||
public class ChooseCommand extends PKCommand {
|
||||
|
||||
public ChooseCommand() {
|
||||
super("choose", "/bending choose [Element] <player>", "This command will allow the user to choose a player either for himself or <Player> if specified. This command can only be used once per player unless they have permission to rechoose their element.", new String[] { "choose", "ch" });
|
||||
super("choose", "/bending choose <Element> [Player]", "This command will allow the user to choose a player either for himself or <Player> if specified. This command can only be used once per player unless they have permission to rechoose their element.", new String[] { "choose", "ch" });
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
public class ClearCommand extends PKCommand {
|
||||
|
||||
public ClearCommand() {
|
||||
super("clear", "/bending clear", "This command will clear the bound ability from the slot you specify (if you specify one). If you choose not to specify a slot, all of your abilities will be cleared.", new String[] { "clear", "cl", "c" });
|
||||
super("clear", "/bending clear [Slot]", "This command will clear the bound ability from the slot you specify (if you specify one). If you choose not to specify a slot, all of your abilities will be cleared.", new String[] { "clear", "cl", "c" });
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.util.List;
|
|||
public class RemoveCommand extends PKCommand {
|
||||
|
||||
public RemoveCommand() {
|
||||
super("remove", "/bending remove [Player] <element>", "This command will remove the element of the targeted [Player]. The player will be able to re-pick their element after this command is run on them, assuming their Bending was not permaremoved.", new String[] { "remove", "rm" });
|
||||
super("remove", "/bending remove <Player> [Element]", "This command will remove the element of the targeted [Player]. The player will be able to re-pick their element after this command is run on them, assuming their Bending was not permaremoved.", new String[] { "remove", "rm" });
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ public class WhoCommand extends PKCommand {
|
|||
Map<String, String> staff = new HashMap<String, String>();
|
||||
|
||||
public WhoCommand() {
|
||||
super("who", "/bending who <Player>", "This command will tell you what element all players that are online are (If you don't specify a player) or give you information about the player that you specify.", new String[] { "who", "w" });
|
||||
super("who", "/bending who [Player]", "This command will tell you what element all players that are online are (If you don't specify a player) or give you information about the player that you specify.", new String[] { "who", "w" });
|
||||
|
||||
staff.put("8621211e-283b-46f5-87bc-95a66d68880e", ChatColor.RED + "ProjectKorra Founder"); // MistPhizzle
|
||||
|
||||
|
|
Loading…
Reference in a new issue