Solved Make a command issue a event

Discussion in 'Plugin Development' started by Jabbers9999, Jan 23, 2016.

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

    Jabbers9999

    So how would I make it so if i did
    Code:
    /test
    
    it would change an event, so like the join message to null or something
    Thanks
     
  2. Offline

    Zombie_Striker

    @Jabbers9999
    That is not actually that much information. Do you mean you wish to make is so a command can change the join message? If that is the case, here's what you need to do:
    • Create a String variables which will be the message
    • Create a command that will set that string to be equal to something when it is issued (you can use a string builder to add all the args together if you want the player to type in what the message will be)
    • Inside the event, set the join message to be equal to that string variable.
     
  3. Offline

    Jabbers9999

    Well, sorry for not much info, but basically if i did /joinmessage off, it would turn the join message to 'null'
     
  4. Offline

    87pen

  5. Offline

    Jabbers9999

    What do you mean?
     
  6. Offline

    87pen

    I don't know what you are asking in your last post.
     
  7. Offline

    Jabbers9999

    So Basically, if i did /joinmessage off, it would turn the join message off

    But lol, I like the sound of that plugin. Can you maybe give me some links to String Builder tutorials?
     
    Last edited: Jan 23, 2016
  8. Offline

    Javlin

    Create a boolean, if join messages are on, make it true, otherwise, make it false. Add player join event, and if the boolean is false, set the message to null.
     
  9. Offline

    Jabbers9999

    Do I add @EventHandler?
     
  10. Offline

    87pen

  11. Offline

    Jabbers9999

Thread Status:
Not open for further replies.

Share This Page