mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-13 04:36:44 +00:00
28 lines
460 B
Java
28 lines
460 B
Java
![]() |
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)
|
||
|
{
|
||
|
if (this.name != null)
|
||
|
{
|
||
|
|
||
|
return server.getPlayerExact(name).getLocation();
|
||
|
}
|
||
|
return location;
|
||
|
}
|
||
|
}
|