From 3046d613aab8129bac04bc4b4538fb1a2b9a5b87 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 20 Dec 2010 03:11:15 -0800 Subject: [PATCH] Added exploit prevention to /tpback --- vMinecraftCommands.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vMinecraftCommands.java b/vMinecraftCommands.java index 4108c18d8..7f5a65cac 100644 --- a/vMinecraftCommands.java +++ b/vMinecraftCommands.java @@ -186,6 +186,12 @@ public class vMinecraftCommands{ double y = Double.parseDouble(tpxyz2[1]); double z = Double.parseDouble(tpxyz2[2]); player.teleportTo(x, y, z, 0, 0); + String cx = Double.toString(etc.getServer().getSpawnLocation().x); + String cy = Double.toString(etc.getServer().getSpawnLocation().y); + String cz = Double.toString(etc.getServer().getSpawnLocation().z); + String cxyz = x + "," + y + "," + z; + vMinecraftUsers.getProfile(player).setTpback(cxyz); + player.sendMessage(Colors.Rose + "/tpback data reset to spawn"); return EXIT_SUCCESS; }