Hey there! I'm currently learning the Bukkit API, and I was wondering, how do you make it so a timer works ONLY for a specific player? For example, if I was making a plugin where if you right click with an iron axe, and you teleport to your eye destination, and a 5 second cooldown kicks in, wouldn't it kick in for ALL the players on the server? Or would it only take affect for the player that used the teleport?
Code:java // ... event code + iron axe checking, etc ...final Player player = e.getPlayer( ); // get the playerfinal Location toBlock = player.getTargetBlock( null, 50 ).getLocation( ); // get the block they're looking atnew BukkitRunnable( ) { // create a new runnable @Override public void run( ) { p.teleport( toBlock ); // teleport the player } }.runTaskLater( myPluginInstance, 100 ); // run after 5 seconds (100 ticks) It's quite simple to only teleport one player.