001 package org.bukkit.event.player; 002 003 import org.bukkit.entity.Player; 004 import org.bukkit.event.Event; 005 006 /** 007 * Represents a player related event 008 */ 009 public abstract class PlayerEvent extends Event { 010 protected Player player; 011 012 public PlayerEvent(final Player who) { 013 player = who; 014 } 015 016 PlayerEvent(final Player who, boolean async) { 017 super(async); 018 player = who; 019 020 } 021 022 /** 023 * Returns the player involved in this event 024 * 025 * @return Player who is involved in this event 026 */ 027 public final Player getPlayer() { 028 return player; 029 } 030 }