SHARE
TWEET

Untitled

a guest Jan 19th, 2013 16 Never
  1. @EventHandler
  2.   public void onBlockFromTo(BlockFromToEvent event) {
  3.     Block to = event.getToBlock();
  4.     int y = to.getY();
  5.     int x = to.getX();
  6.    
  7.    if (to.getType() == Material.LAVA || to.getType() == Material.STATIONARY_LAVA ) {
  8.            if (x > 0 && y < 76){
  9.                    Bukkit.getServer().broadcastMessage("Red Team Has Won!");
  10.                    
  11.            }
  12.            else if (x < 0 && y < 76){
  13.                    Bukkit.getServer().broadcastMessage("Blue Team Has Won!");
  14.            }
  15.    }
  16.    
  17.    }
RAW Paste Data
Top