namespace Minecraft.Server.FourKit.Event.Player;
using Minecraft.Server.FourKit.Entity;
///
/// Called when a player joins a server
///
public class PlayerJoinEvent : PlayerEvent
{
private string _joinMessage;
internal PlayerJoinEvent(Player player) : base(player)
{
_joinMessage = $"{player.getName()} joined the game";
}
///
/// Gets the join message to send to all online players
///
/// string join message
public string getJoinMessage() => _joinMessage;
///
/// Sets the join message to send to all online players
///
/// join message.
public void setJoinMessage(string? joinMessage)
{
_joinMessage = joinMessage ?? string.Empty;
}
}