Command that blocks /tab?

Discussion in 'Spigot Discussion' started by DDDDEAN, Jun 22, 2016.

  1. Hey all, can someone show me a simple plugin that blocks (/tab) cheers. :)
  2. Well, this should work.
    I never tried it, but theres no reason why it sould'nt.
    This is the code you should paste into your Main class. Don't forget you also need a plugin.yml and need to load craftbukkit.jar.

    Code: (I did this just in the chat, so there may be format errors.)
    Code (Text):
    package me.DevJordan.Tab;

    import org.bukkit.Bukkit;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;

    public class Main extends JavaPlugin {

      public static String colorsign(String sign)


        return sign.replaceAll("&", "§");


    public void onEnable() {

    getLogger().info("&aTabDisabler has been enabled.");


    public void onDisable() {

    getLogger().info("&cTabDisabler has been disabled.");


      public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

    Player player = (Player) sender;

    if (cmd.getName().equalsIgnoreCase("tab") && sender instanceof Player) {

          player.sendmessage("&cYou don't have permission to run that command."));}



    Hope it helps you. :)
    You can also add in a config, however that's a little more complicated. But not hard to do. I'll also put this plugin on spigot in an hour, you can download it and decompile it if you want. May as well put a plugin on Spigot anyways.
  3. Thank you! :)
  4. No problem. :)
  5. still make the plugin thought. :p I'm pretty sure other people would need it.
  6. I'll get to it, I have exams to study for at the moment though.
  7. In the context of using tab complete.

    Why do you need a plugin for this just increase the amount of characters needed or disable tab complete in your spigot.yml.

    I have mine set to two characters so people have to type the first two characters of the command.