turt2live

Untitled

Jan 28th, 2013
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. package com.turt2live.antishare;
  2.  
  3. import org.bukkit.event.EventHandler;
  4. import org.bukkit.event.Listener;
  5. import org.bukkit.event.block.BlockPistonExtendEvent;
  6. import org.bukkit.event.block.BlockPistonRetractEvent;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class AntiShare extends JavaPlugin implements Listener {
  10.  
  11.     @Override
  12.     public void onEnable(){
  13.         getServer().getPluginManager().registerEvents(this, this);
  14.     }
  15.  
  16.     @EventHandler
  17.     public void onPistonExtend(BlockPistonExtendEvent event) throws Exception{
  18.         throw new Exception("EXTEND EVENT");
  19.     }
  20.  
  21.     @EventHandler
  22.     public void onPistonExtend(BlockPistonRetractEvent event) throws Exception{
  23.         throw new Exception("RETRACT EVENT");
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment