Skip to content

Commit

Permalink
add an indication that you joined or left a lobby
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectHSI committed Oct 29, 2023
1 parent 10b1683 commit 89fe1d3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io.github.projecthsi.mobarena.commands.CommandInteractions;
import io.github.projecthsi.mobarena.containers.ArenaContainer;
import io.github.projecthsi.mobarena.containers.PlayerContainer;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -51,6 +52,8 @@ static boolean joinPlayer(@NotNull CommandSender sender, @NotNull String command
players.put(player, arena);
PlayerContainer.setTrackedPlayers(players);

sender.sendMessage(MiniMessage.miniMessage().deserialize("You have joined <bold>" + arena.getName() + "</bold>"));

return true;
}

Expand Down Expand Up @@ -87,6 +90,8 @@ static boolean leavePlayer(@NotNull CommandSender sender, @NotNull String comman
players.remove(player);
PlayerContainer.setTrackedPlayers(players);

sender.sendMessage(MiniMessage.miniMessage().deserialize("You have left <bold>" + arena.getName() + "</bold>"));

return true;
}
}

0 comments on commit 89fe1d3

Please sign in to comment.