mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-25 08:27:28 +00:00
Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
31 lines
839 B
C#
31 lines
839 B
C#
namespace Minecraft.Server.FourKit.Event.Player;
|
|
|
|
using Minecraft.Server.FourKit.Entity;
|
|
|
|
/// <summary>
|
|
/// Called when a player joins a server
|
|
/// </summary>
|
|
public class PlayerJoinEvent : PlayerEvent
|
|
{
|
|
private string _joinMessage;
|
|
internal PlayerJoinEvent(Player player) : base(player)
|
|
{
|
|
_joinMessage = $"{player.getName()} joined the game";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the join message to send to all online players
|
|
/// </summary>
|
|
/// <returns>string join message</returns>
|
|
public string getJoinMessage() => _joinMessage;
|
|
|
|
/// <summary>
|
|
/// Sets the join message to send to all online players
|
|
/// </summary>
|
|
/// <param name="joinMessage">join message.</param>
|
|
public void setJoinMessage(string? joinMessage)
|
|
{
|
|
_joinMessage = joinMessage ?? string.Empty;
|
|
}
|
|
}
|