Hide and Seek Help

Discussion in 'Plugin Development' started by BurnerDiamond, Feb 7, 2015.

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

    BurnerDiamond

    I'm currently making a hide and seek plugin and was wondering how I should set a block

    I'm currently using protocol lib to set a player as a block and it works perfectly.

    1. How should I check if the player hasn't moved for 5 seconds?
    2. Should I set a block where the player is?
    3. Should I check if the seeker hits the set block and if so set it as air.
    4. Should I use a player move event or should I make a Bukkit runnablee which checks the player location every second. If so how do I use the bukkit runnable since I don't know how to do this part yet ( meaning do I need to put the run() inside the player move event or do I have to put it on the onEnable()?
     
  2. Offline

    ZanderMan9

    What are you trying to do here? Make the player turn to blocks if they stand still for x time?
     
  3. Offline

    pie_flavor

    @BurnerDiamond For number 4, neither. When you want to schedule a task (put this at the point when you actually schedule it), put
    Code:
    new BukkitRunnable() {
      public void run() {
    //put code here
      }
    }.runTaskLater(plugin, 0L, 20L)
     
Thread Status:
Not open for further replies.

Share This Page