Skip to content
Mark Hughes edited this page Apr 25, 2016 · 1 revision

Events

You can find a list of events in the source code under the events package.

You use these like regular events. You can read how to do this in the [http://wiki.bukkit.org/Event_API_Reference](original documentation).

Example

For whatever reason, you want to not allow the player MarkehMe to rename a Faction.

@EventHandler
public void youCanNotRename(EventFactionsRename event) {
    FPlayer fplayer = event.getFPlayer();
    if (fplayer.getName().equalsIgnoreCase("MarkehMe")) {
        event.setCancelled(true);
        fplayer.msg("<red>Nope! <aqua>You can not rename your faction!");
    }
}

Sidebar

Clone this wiki locally