Skip to content

Instantly share code, notes, and snippets.

@brcdev
Created October 3, 2016 22:54
Show Gist options
  • Save brcdev/57a2628ba90e0c216a6859ab72bf7b86 to your computer and use it in GitHub Desktop.
Save brcdev/57a2628ba90e0c216a6859ab72bf7b86 to your computer and use it in GitHub Desktop.
package net.brcdev.gangs.event;
import net.brcdev.gangs.gang.Gang;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Called when a player joins a gang
*/
public class PlayerJoinGangEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private Player player;
private Gang gang;
private boolean cancelled;
public PlayerJoinGangEvent(Player player, Gang gang) {
this.player = player;
this.gang = gang;
}
/**
* Returns the player who joined a gang
*
* @return Player Player who joined a gang
*/
public Player getPlayer() {
return player;
}
/**
* Returns the gang which was joined
*
* @return Gang Gang which was joined
*/
public Gang getGang() {
return gang;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment