Message Delays?

Discussion in 'Plugin Development' started by Eliteninja42, Aug 2, 2013.

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

    Eliteninja42

    Hello,
    I was wondering how I would add a 1 second delay between messages being sent with player.chat("message goes here");
    It will be sending 6 different messages. Any help?

    Thanks.
     
  2. Offline

    xTrollxDudex

  3. Offline

    Eliteninja42

  4. Offline

    xTrollxDudex

  5. Offline

    Eliteninja42

    xTrollxDudex I'm completly confused about how to do this
     
  6. Offline

    xTrollxDudex

    Eliteninja42
    Did you check the link? If you don't get it, just look up "bukkit example schedulers" or something like that.
     
  7. Offline

    alex123099

    schedule an event which will execute the command of sending a message with a starting delay of 1 second and is not repeatable.
     
  8. Offline

    Eliteninja42

    xTrollxDudex Do you think you could type up an example?
     
  9. Offline

    xTrollxDudex

    Eliteninja42
    PHP:
    Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){//"this" is the plugin, if this is not in a main class, pass the instance
    @Override
    public void run(){
    //message
    }}, 0L20L);//20 ticks = 1 second in long hence the L
     
Thread Status:
Not open for further replies.

Share This Page