Skip to content

Instantly share code, notes, and snippets.

@Geolykt
Created May 20, 2021 20:49
Show Gist options
  • Save Geolykt/4f0998595b747b22f42a420770aad654 to your computer and use it in GitHub Desktop.
Save Geolykt/4f0998595b747b22f42a420770aad654 to your computer and use it in GitHub Desktop.
public class LocationStore {
private static final HashMap<UUID, Location> SPECTATOR_POS = new HashMap<>();
public static Location getLoc(Player player) {
return SPECTATOR_POS.get(player.getUniqueId());
}
public static void setLoc(Player player) {
SPECTATOR_POS.put(player.getUniqueId(), player.getLocation());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment