Fixed PlayerTeleportEvent so getType() returns Type.PLAYER_TELEPORT

This commit is contained in:
Byron Shelden
2011-03-27 16:08:57 -07:00
committed by Erik Broes
parent 4272e51e00
commit a5b07e7355
2 changed files with 12 additions and 2 deletions

View File

@@ -4,9 +4,10 @@ package org.bukkit.event.player;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
/**
* Holds information for player movement and teleportation events
* Holds information for player movement events
*/
public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
private boolean cancel = false;
@@ -19,6 +20,12 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
this.to = to;
}
PlayerMoveEvent(final Event.Type type, final Player player, final Location from, final Location to) {
super(type, player);
this.from = from;
this.to = to;
}
/**
* Gets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins