Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.turt2live.antishare;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.block.BlockPistonExtendEvent;
- import org.bukkit.event.block.BlockPistonRetractEvent;
- import org.bukkit.plugin.java.JavaPlugin;
- public class AntiShare extends JavaPlugin implements Listener {
- @Override
- public void onEnable(){
- getServer().getPluginManager().registerEvents(this, this);
- }
- @EventHandler
- public void onPistonExtend(BlockPistonExtendEvent event) throws Exception{
- throw new Exception("EXTEND EVENT");
- }
- @EventHandler
- public void onPistonExtend(BlockPistonRetractEvent event) throws Exception{
- throw new Exception("RETRACT EVENT");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment