/**
 * Bukkit-Plugin-Example by Benjamin Marwell.
 *
 * To the extent possible under law, the person who associated CC0 with
 * Bukkit-Plugin-Example has waived all copyright and related or neighboring rights
 * to Bukkit-Plugin-Example.
 *
 * You should have received a copy of the CC0 legalcode along with this
 * work.  If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
 */

package de.bmarwell.bukkit.listener;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerTeleportEvent;

/**
 * React on player teleport events.
 *
 * @since 0.0.1.
 */
public class PlayerTeleportListener implements Listener {

  @EventHandler
  public void onPlayerTeleport(PlayerTeleportEvent event) {
    event.setCancelled(true);
  }

}

@@ -424,16 +424,77 @@
 tener;%0A%0A
+import org.bukkit.Location;%0Aimport org.bukkit.entity.Player;%0A
 import o
@@ -519,24 +519,24 @@
 entHandler;%0A
-
 import org.b
@@ -817,32 +817,348 @@
     
-event.setCancelled(true)
+// if this event was cancelled, why bother?%0A    if (event.isCancelled()) %7B%0A      return;%0A    %7D%0A%0A    // Undo all teleports manually.%0A    Player teleportedPlayer = event.getPlayer();%0A    Location origin = event.getFrom();%0A    event.getCause();%0A%0A    boolean teleportSuccess = teleportedPlayer.teleport(origin);%0A    // TODO: log teleportSuccess
 ;%0A  

Undo teleport manually.