- Add proper javadoc to all events - Use proper handling of the Eventlist in all events: each event has its own EventList and its static method, as specified by Bukkit's Event class - Add common supertype to all AuthMe events - Remove unused events - Remove unused methods (setters to fields that we ignore entirely)
40 lines
933 B
Java
40 lines
933 B
Java
package fr.xephi.authme.events;
|
|
|
|
import org.bukkit.Location;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
/**
|
|
* This event is fired before AuthMe teleports a player for general purposes.
|
|
*/
|
|
public class AuthMeTeleportEvent extends AbstractTeleportEvent {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param player The player
|
|
* @param to The teleport destination
|
|
*/
|
|
public AuthMeTeleportEvent(Player player, Location to) {
|
|
super(false, player, to);
|
|
}
|
|
|
|
/**
|
|
* Return the list of handlers, equivalent to {@link #getHandlers()} and required by {@link Event}.
|
|
*
|
|
* @return The list of handlers
|
|
*/
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
}
|