Help me to code my first plugin

Discussion in 'Plugin Development' started by sacha220899, Apr 17, 2014.

Thread Status:
Not open for further replies.
  1. Hi guys,
    I working on my first Minecraft plugin.
    Now, I search the code, to send a global message. So that all the players on the Server can see the message. Like is't a normal message sent by a player / console.
    I'm using this thread to post more than one question, so be active ;)
    LG Sacha
     
  2. Offline

    MaliciousMan

    What is your question.
     
  3. Offline

    Qwahchees

    MaliciousMan
    Ironic how your question isn't grammatically a question, haha. Just kidding.

    Okay, from what I understand what sacha220899, you want to code a plugin that sends a message to everyone online?

    Code:
    for (Player player : Bukkit.getOnlinePlayers()) {
    player.sendMessage("Hello!");
    }
    
    That's how, basically you get everyone online and cast it to the variable "player". Then you send a message to them.
     
  4. Offline

    Bobcat00

  5. Ok, wan't to code a plugin named "true or false"
    I have coded the tpall to a point, sounds, permissions and the messages. Now I have to code the mute thing, but I don't know how :/ I know that I have to cancel the AsyncPlayerChatEvent, but I don't know how to do this easy. I want it, that I can mute the chat with /globalmute, and than, I will code it in with the executeCommand(globalmute).
    And I have to code a countdown. So that the numbers appears in the chat: 30sek... (break of 10 seconds) 20sek... (break) 10sek...9sek...8sek.. etc. How can I do this?
    Help me :(
    (sry for my bad english)

    I don't know how to put a command in a public void with the EventHandler?!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
Thread Status:
Not open for further replies.

Share This Page