Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

change discription in /help

Comments in 'Plugin Development' started by Cristalix, Sep 10, 2015.

  1. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    What do you mean?
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    i already made a plugin for that. but because this is Plugin Development :
    PHP:
    public function onCmd(PlayerCommandPreprocessEvent $event){
    $cmd explode(" "$event->getMessage());
    $player $event->getPlayer();
    if(
    strtolower($cmd[0]) == "/help" || strtolower($cmd[0]) == "/?"){
    $player->sendMessage("message 1");
    $player->sendMessage("message2");
    //etc..
    $event->setCancelled(true);
               }
    }
    Last edited: Oct 11, 2015
    SeifValkierks likes this.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Don't do that. You can simply setDescription a command.
  4. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Hacks, hacks, hacks...
    That's actually a lot simpler, but it won't work if you want to change the message format/layout altogether.
    SeifValkierks likes this.
  5. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    What Hacks? XD
  6. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    @Taha_The_Hacker???
    SeifValkierks likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Actually, there is no non-hacky way to do so. Even unregistering a command is hacky too.
    SeifValkierks likes this.

Share This Page

Advertisement