Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 19th, 2013  |  syntax: Java  |  size: 0.46 KB  |  views: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.    }
clone this paste RAW Paste Data