Advertisement
Gamer_Z

Untitled

Feb 25th, 2012
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. package gamer5742g.rafal.HelloWorld;
  2.  
  3. import java.util.logging.Logger;
  4. import org.bukkit.Location;
  5. import org.bukkit.World;
  6. import org.bukkit.block.Block;
  7. import org.bukkit.event.player.PlayerMoveEvent;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class HelloWorld extends JavaPlugin {
  11.     Logger log = Logger.getLogger("Minecraft");
  12.     public void onEnable()
  13.     {
  14.         log.info("Helloworld ENABLED!");
  15.     }
  16.     public void onDisable()
  17.     {
  18.         log.info("Helloworld DISABLED!");
  19.     }
  20.     public void onPlayerMove(PlayerMoveEvent evt) {
  21.         Location loc = evt.getPlayer().getLocation();
  22.         //Player = evt.getPlayer();
  23.         evt.getPlayer().sendMessage("You moved");
  24.         World w = loc.getWorld();
  25.         loc.setY(loc.getY() + 5);
  26.         Block b = w.getBlockAt(loc);
  27.         b.setTypeId(1);
  28.     }  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement