1.7.9 Support

This commit is contained in:
Olof Larsson
2014-05-14 15:27:27 +02:00
parent 7d252edda1
commit 858b4e5fd1
8 changed files with 152 additions and 26 deletions

View File

@ -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;
}