1.7.9 Support
This commit is contained in:
@ -6,6 +6,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
@ -17,18 +18,18 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class VisualizeUtil
|
||||
{
|
||||
protected static Map<String, Set<Location>> playerLocations = new HashMap<String, Set<Location>>();
|
||||
protected static Map<UUID, Set<Location>> playerLocations = new HashMap<UUID, Set<Location>>();
|
||||
public static Set<Location> getPlayerLocations(Player player)
|
||||
{
|
||||
return getPlayerLocations(player.getName());
|
||||
return getPlayerLocations(player.getUniqueId());
|
||||
}
|
||||
public static Set<Location> getPlayerLocations(String playerName)
|
||||
public static Set<Location> getPlayerLocations(UUID uuid)
|
||||
{
|
||||
Set<Location> ret = playerLocations.get(playerName);
|
||||
Set<Location> ret = playerLocations.get(uuid);
|
||||
if (ret == null)
|
||||
{
|
||||
ret = new HashSet<Location>();
|
||||
playerLocations.put(playerName, ret);
|
||||
playerLocations.put(uuid, ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user