Solved [HELP] 1.8.8 message on chat resuming the command

Discussion in 'Spigot Plugin Development' started by Seeyko, Apr 25, 2017.

  1. Hello all !

    I have a problem with my plugin, when a player type a custom command that i have made it's work great but a message show up in the tchat with the command...
    For example when they type /roi, the command works great, but in the chat, they can see "/roi" in white...
    I want to remove this how can i do ? I put a screenshot for more comprehension because i can't explain properly sorry...

    This is my code for my command :
    Code (Text):



           if(sender instanceof Player){
             Player p = (Player) sender;
             HumanEntity pl = (HumanEntity) sender;
             if(cmd.getName().equalsIgnoreCase("rules")){
               if(arg.length == 0){
                 FallenKingdom.getInstance();
                 pl.openInventory(FallenKingdom.Regles);

               }
             }

    And here the screen of what happens...
    rules.png
     
  2. That message is created by the code returning false on boolean onCommand().
     
  3. Add a return for fix that
     
  4. Yep return true; if the command was executed


    Sent from my iPhone using Tapatalk
     
  5. Thanks all of you it's worked great know !