Guest User

Untitled

a guest
Jun 17th, 2012
15,361
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.Adamki11s.Example;
  2.  
  3. import org.bukkit.Location;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.event.EventHandler;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.event.player.PlayerMoveEvent;
  8.  
  9. /* Example Template
  10.  * By Adamki11s
  11.  * Plugin Tutorial
  12.  */
  13.  
  14. public class ExamplePlayerListener implements Listener {
  15.    
  16.     private Example plugin;
  17.    
  18.     public ExamplePlayerListener(Example instance) {
  19.         plugin = instance;
  20.     }
  21.  
  22.         @EventHandler
  23.     public void onPlayerMove(PlayerMoveEvent event){
  24.         Player player = event.getPlayer();
  25.         Location playerLoc = player.getLocation();
  26.         player.sendMessage("Your X Coordinates : " + playerLoc.getX());
  27.         player.sendMessage("Your Y Coordinates : " + playerLoc.getY());
  28.         player.sendMessage("Your Z Coordinates : " + playerLoc.getZ());
  29.     }
  30.  
  31. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×