summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/LocationTarget.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerTarget.java8
2 files changed, 2 insertions, 16 deletions
diff --git a/Essentials/src/com/earth2me/essentials/LocationTarget.java b/Essentials/src/com/earth2me/essentials/LocationTarget.java
index 58e19fe42..1641373af 100644
--- a/Essentials/src/com/earth2me/essentials/LocationTarget.java
+++ b/Essentials/src/com/earth2me/essentials/LocationTarget.java
@@ -1,28 +1,20 @@
package com.earth2me.essentials;
import org.bukkit.Location;
-import org.bukkit.Server;
public class LocationTarget implements ITarget
{
private final Location location;
- private final String name;
LocationTarget(Location location)
{
this.location = location;
- this.name = null;
}
@Override
- public Location getLocation(Server server)
+ public Location getLocation()
{
- if (this.name != null)
- {
-
- return server.getPlayerExact(name).getLocation();
- }
return location;
}
} \ No newline at end of file
diff --git a/Essentials/src/com/earth2me/essentials/PlayerTarget.java b/Essentials/src/com/earth2me/essentials/PlayerTarget.java
index 31aac25bd..867f832d9 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerTarget.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerTarget.java
@@ -7,22 +7,16 @@ import org.bukkit.entity.Player;
public class PlayerTarget implements ITarget
{
- private final Location location;
private final String name;
PlayerTarget(Player entity)
{
this.name = entity.getName();
- this.location = null;
}
@Override
public Location getLocation()
{
- if (this.name != null)
- {
- return Bukkit.getServer().getPlayerExact(name).getLocation();
- }
- return location;
+ return Bukkit.getServer().getPlayerExact(name).getLocation();
}
} \ No newline at end of file