diff --git a/src/fr/neatmonster/nocheatplus/command/admin/ExemptCommand.java b/src/fr/neatmonster/nocheatplus/command/admin/ExemptCommand.java index c62f6cfc..73bff8f5 100644 --- a/src/fr/neatmonster/nocheatplus/command/admin/ExemptCommand.java +++ b/src/fr/neatmonster/nocheatplus/command/admin/ExemptCommand.java @@ -1,6 +1,7 @@ package fr.neatmonster.nocheatplus.command.admin; import java.util.Arrays; +import java.util.List; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -9,6 +10,7 @@ import org.bukkit.entity.Player; import fr.neatmonster.nocheatplus.NoCheatPlus; import fr.neatmonster.nocheatplus.checks.CheckType; +import fr.neatmonster.nocheatplus.command.CommandUtil; import fr.neatmonster.nocheatplus.command.NCPCommand; import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager; import fr.neatmonster.nocheatplus.permissions.Permissions; @@ -48,5 +50,13 @@ public class ExemptCommand extends NCPCommand { sender.sendMessage(TAG + "Player " + playerName + " is now exempted from: " + checkType); return true; } + + @Override + public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) + { + // At least complete CheckType + if (args.length == 3) return CommandUtil.getCheckTypeTabMatches(args[2]); + return null; + } } diff --git a/src/fr/neatmonster/nocheatplus/command/admin/RemovePlayerCommand.java b/src/fr/neatmonster/nocheatplus/command/admin/RemovePlayerCommand.java index 3aee22d6..370aa6de 100644 --- a/src/fr/neatmonster/nocheatplus/command/admin/RemovePlayerCommand.java +++ b/src/fr/neatmonster/nocheatplus/command/admin/RemovePlayerCommand.java @@ -1,6 +1,7 @@ package fr.neatmonster.nocheatplus.command.admin; import java.util.Arrays; +import java.util.List; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -10,6 +11,7 @@ import org.bukkit.entity.Player; import fr.neatmonster.nocheatplus.NoCheatPlus; import fr.neatmonster.nocheatplus.checks.CheckType; import fr.neatmonster.nocheatplus.checks.ViolationHistory; +import fr.neatmonster.nocheatplus.command.CommandUtil; import fr.neatmonster.nocheatplus.command.NCPCommand; import fr.neatmonster.nocheatplus.permissions.Permissions; import fr.neatmonster.nocheatplus.players.DataManager; @@ -75,4 +77,12 @@ public class RemovePlayerCommand extends NCPCommand { return true; } + @Override + public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) + { + // At least complete CheckType + if (args.length == 3) return CommandUtil.getCheckTypeTabMatches(args[2]); + return null; + } + } diff --git a/src/fr/neatmonster/nocheatplus/command/admin/UnexemptCommand.java b/src/fr/neatmonster/nocheatplus/command/admin/UnexemptCommand.java index 649b87fe..9e6ef4de 100644 --- a/src/fr/neatmonster/nocheatplus/command/admin/UnexemptCommand.java +++ b/src/fr/neatmonster/nocheatplus/command/admin/UnexemptCommand.java @@ -1,6 +1,7 @@ package fr.neatmonster.nocheatplus.command.admin; import java.util.Arrays; +import java.util.List; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -9,6 +10,7 @@ import org.bukkit.entity.Player; import fr.neatmonster.nocheatplus.NoCheatPlus; import fr.neatmonster.nocheatplus.checks.CheckType; +import fr.neatmonster.nocheatplus.command.CommandUtil; import fr.neatmonster.nocheatplus.command.NCPCommand; import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager; import fr.neatmonster.nocheatplus.permissions.Permissions; @@ -43,5 +45,13 @@ public class UnexemptCommand extends NCPCommand { sender.sendMessage(TAG + "Player " + playerName + " will not be exempted from: " + checkType); return true; } + + @Override + public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) + { + // At least complete CheckType + if (args.length == 3) return CommandUtil.getCheckTypeTabMatches(args[2]); + return null; + } }