TF-EssentialsX/Essentials/src/com/earth2me/essentials/PlayerTarget.java
KHobbits 7401608cc5 The /tpahere command now stores the location of 'here' rather than using the current players location.
Cleanup teleport logic - This also fixes exploiting /tpahere to get accesses to restricted areas.
2013-08-11 16:37:21 +01:00

22 lines
387 B
Java

package com.earth2me.essentials;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public class PlayerTarget implements ITarget
{
private final String name;
public PlayerTarget(Player entity)
{
this.name = entity.getName();
}
@Override
public Location getLocation()
{
return Bukkit.getServer().getPlayerExact(name).getLocation();
}
}