All pastes #2106194 Raw Edit

Miscellany

public text v1 · immutable
#2106194 ·published 2012-01-25 23:30 UTC
rendered paste body
public class BasicPluginPlayerListener implements Listener
{
    public BasicPlugin plugin;
    public BasicPluginPlayerListener(BasicPlugin instance)
    {
        this.plugin = instance;
    }
    
    @EventHandler (priority = EventPriority.HIGH)
    public void highPlayerJoin(PlayerJoinEvent event)
    {
        event.getPlayer().sendMessage("plugin is working!");
    }
    
    @EventHandler (priority = EventPriority.NORMAL)
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
    {
        if(command.getName().equalsIgnoreCase("command"))
        {
           sender.sendMessage("command");
           return true;
        }
        
        return false;
    }

}