summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorByron Shelden <byron.shelden@gmail.com>2011-03-27 16:08:57 -0700
committerErik Broes <erikbroes@grum.nl>2011-03-28 01:15:21 +0200
commit2b3698d6b1cb30d9b8bb90a9ec0d2b8f538c4625 (patch)
treee5de9b3c532115ee17147294714e9fa5aa0502e5 /src
parent32b3c771656805c94d5f6f40f9b99c7ad715404b (diff)
downloadbukkit-2b3698d6b1cb30d9b8bb90a9ec0d2b8f538c4625.tar
bukkit-2b3698d6b1cb30d9b8bb90a9ec0d2b8f538c4625.tar.gz
bukkit-2b3698d6b1cb30d9b8bb90a9ec0d2b8f538c4625.tar.lz
bukkit-2b3698d6b1cb30d9b8bb90a9ec0d2b8f538c4625.tar.xz
bukkit-2b3698d6b1cb30d9b8bb90a9ec0d2b8f538c4625.zip
Fixed PlayerTeleportEvent so getType() returns Type.PLAYER_TELEPORT
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerMoveEvent.java9
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java5
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index b89d60e8..967ec56f 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -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
diff --git a/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java b/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java
index 2625edc7..a5765c4a 100644
--- a/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java
@@ -3,8 +3,11 @@ package org.bukkit.event.player;
import org.bukkit.Location;
import org.bukkit.entity.Player;
+/**
+ * Holds information for player teleport events
+ */
public class PlayerTeleportEvent extends PlayerMoveEvent {
public PlayerTeleportEvent(Player player, Location from, Location to) {
- super(player, from, to);
+ super(Type.PLAYER_TELEPORT, player, from, to);
}
}