tutorials/Events

I'm sure that you won't be able to do much without having a snake listener. To make one is incredibly simple! It's done in the same manner as listening for regular events, and even can be put in the same class. Example:

public class AListenerClass implements Listener{
  public void onPlayerLogin(PlayerLoginEvent event){
    event.getPlayer().sendMessage(ChatColor.GOLD+"You logged in! Yay!");
  }
  public void onSnakeDeath(SnakeDeathEvent event){
    Bukkit.broadcastMessage("A snake has died! Hurray!");
  }
}

As of v1, there are currently only 2 events. I would have added more, (add am planning to add more) but I had finished with some other plugins and wanted to get the API out on Bukkit before my server reopens.

  • SnakeDeathEvent
  • SnakeTargetEvent

Anyway, if you want to suggest more ideas for events, submit a ticket and I'll add it. No idea is a bad idea!


Comments

Posts Quoted:
Reply
Clear All Quotes