Team Module


The team module will allow you to interact with the Team View mod in Lunar Client.

  • Interact with the Team View mod
    • Create, delete and update teams
    • Enables displaying a marker above the head of teammates
    • Set custom team marker color

Team Module Example

Teammates will have markers over their head, appear on Minimap Mod, and appear in the Direction HUD mod!


Sample Code

private final Map<UUID, Team> teamsByTeamId = Maps.newHashMap();
private final Map<UUID, Team> teamsByPlayerUuid = Maps.newHashMap();
public TeamExample() {
    new TeamUpdateTask();
    Bukkit.getPluginManager().registerEvents(this, ApolloExamplePlugin.getPlugin());
private void onPlayerQuit(PlayerQuitEvent event) {
    Player player = event.getPlayer();
    this.getByPlayerUuid(player.getUniqueId()).ifPresent(team -> {
        if (team.getMembers().size() == 1) {
public Optional<Team> getByPlayerUuid(UUID playerUuid) {
    return Optional.ofNullable(this.teamsByPlayerUuid.get(playerUuid));
public Optional<Team> getByTeamId(UUID teamId) {
    return Optional.ofNullable(this.teamsByTeamId.get(teamId));
public Team createTeam() {
    Team team = new Team();
    this.teamsByTeamId.put(team.getTeamId(), team);
    return team;
public void deleteTeam(UUID teamId) {
    Team team = this.teamsByTeamId.remove(teamId);
    if (team != null) {
public class Team {
    private final UUID teamId;
    private final Set<Player> members;
    public Team() {
        this.teamId = UUID.randomUUID();
        this.members = Sets.newHashSet();
    public void addMember(Player player) {
        TeamExample.this.teamsByPlayerUuid.put(player.getUniqueId(), this);
    public void removeMember(Player player) {
    private TeamMember createTeamMember(Player member) {
        Location location = member.getLocation();
        return TeamMember.builder()
    // The refresh method used for updating members locations
    public void refresh() {
        List<TeamMember> teammates = this.members.stream().filter(Player::isOnline)
        this.members.forEach(member -> Apollo.getPlayerManager().getPlayer(member.getUniqueId())
            .ifPresent(apolloPlayer -> TeamExample.this.teamModule.updateTeamMembers(apolloPlayer, teammates)));
    public UUID getTeamId() {
        return this.teamId;
    public Set<Player> getMembers() {
        return this.members;
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        if (other == null || other.getClass() != this.getClass()) {
            return false;
        Team team = (Team) other;
        return this.teamId.equals(team.getTeamId());
    public int hashCode() {
        return this.teamId.hashCode();
// Updates players location every 1 tick (50ms)
public class TeamUpdateTask extends BukkitRunnable {
    public TeamUpdateTask() {
        this.runTaskTimerAsynchronously(ApolloExamplePlugin.getPlugin(), 1L, 1L);
    public void run() {

TeamMember Options

.playerUuid(java.util.UUID) member UUID.


.displayName(Component) is the display name that will be shown whenever the observer is outside view distance, but hovers over the player marker. See the chat components (opens in a new tab) page for more.


.markerColor(java.awt.Color) is how you dictate the color of the marker. See the colors page for more.

Color Types

The java.awt.Color class statically exposes some colors, although they do not correspond to any existing colors used in Minecraft.


.location(ApolloLocation) is using the ApolloLocation builder to create the location. See the locations page for more.