# PlayerJoinGangEvent

<pre class="language-java"><code class="lang-java">/**
 * Represents an event that is fired when a player joins a gang.
 *
 * Cancellable = true
 *
 * @author frxq
 * @since 1.0.0
<strong> */
</strong>public class PlayerJoinGangEvent extends Event implements Cancellable {
    private static final HandlerList handlers = new HandlerList();
    private final GangsX plugin;
    private final Player player;
    private final Gang gang;
    private boolean cancelled;

    public PlayerJoinGangEvent(GangsX plugin, Player player, Gang gang) {
        this.plugin = plugin;
        this.player = player;
        this.gang = gang;
    }
    @Override
    public @NotNull HandlerList getHandlers() {
        return handlers;
    }
    public static HandlerList getHandlerList() {
        return handlers;
    }

    @NotNull
    public Player getPlayer() {
        return player;
    }

    public boolean isCancelled() {
        return cancelled;
    }

    public void setCancelled(boolean cancel) {
        cancelled = cancel;
    }

    @NotNull
    public Gang getGang() {
        return gang;
    }
}
</code></pre>
