Solved Chat Argument help!

Discussion in 'Plugin Development' started by pcgamers123, Jun 9, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    pcgamers123

    How do we like create a command with a chat argument?
    Like: /me <argument>

    The argument will be what you wrote in chat.

    Then lets say that someone wrote /me pooped, then it will broadcast "PlayerName pooped!"
     
  2. Offline

    coasterman10

    The args parameter (of type String[]) to the onCommand function will contain all of the arguments typed into a command, separated by spaces.
     
  3. Offline

    pcgamers123

    So, how would we write the code?
    Thank you!
     
  4. Offline

    xTrollxDudex

    pcgamers123
    Wrong section if all you want is the code to do what you want buddy
     
  5. Offline

    spy_1134

    If you type /command argument1 argument2 argument3
    args[0] will be a string saying "argument1"
    args[1] wiill say "argument2" and so on.

    Look here for some more help on making commands:
    http://wiki.bukkit.org/Plugin_Tutorial
     
Thread Status:
Not open for further replies.

Share This Page