SHARE
TWEET

Untitled

a guest Aug 13th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package it.bukkit.niko;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.Listener;
  6. import org.bukkit.event.block.Action;
  7. import org.bukkit.event.player.PlayerInteractEvent;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Prova extends JavaPlugin implements Listener {
  11.    
  12.     public void onEnable() {
  13.         Bukkit.getPluginManager().registerEvents(this, this);
  14.        
  15.     }
  16.  
  17.     public void onDisable() {
  18.        
  19.        
  20.     }
  21.    
  22.  
  23.     @EventHandler
  24.     public void onInteract(PlayerInteractEvent event) {
  25.         if(event.getAction().equals(Action.RIGHT_CLICK_AIR)) {
  26.             event.getPlayer().sendMessage("Look! This is an event! :D");
  27.         }
  28.     }
  29.        
  30.        
  31.     }
RAW Paste Data
Top