mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-27 01:17:19 +00:00
* PlayerPreLoginEvent, comments for more events * basic plugin events * plugin failed to load event * add docs --------- Co-authored-by: sylvessa <225480449+sylvessa@users.noreply.github.com>
41 lines
1,017 B
C#
41 lines
1,017 B
C#
namespace Minecraft.Server.FourKit.Event.Player;
|
|
|
|
using Minecraft.Server.FourKit.Net;
|
|
|
|
/// <summary>
|
|
/// Stores details for players attempting to log in.
|
|
/// </summary>
|
|
public class PlayerPreLoginEvent : Event, Cancellable
|
|
{
|
|
private string name;
|
|
private InetSocketAddress ipAddress; //bukkit uses InetAddress but we expose port also
|
|
private bool _cancelled;
|
|
|
|
|
|
internal PlayerPreLoginEvent(string name, InetSocketAddress ipAddress) : base()
|
|
{
|
|
this.name = name;
|
|
this.ipAddress = ipAddress;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Gets the player's name.
|
|
/// </summary>
|
|
/// <returns>The player's name.</returns>
|
|
public string getName() => name;
|
|
|
|
|
|
/// <summary>
|
|
/// Gets the player IP address.
|
|
/// </summary>
|
|
/// <returns>The IP address.</returns>
|
|
public InetSocketAddress getAddress() => ipAddress;
|
|
|
|
/// <inheritdoc/>
|
|
public bool isCancelled() => _cancelled;
|
|
|
|
/// <inheritdoc/>
|
|
public void setCancelled(bool cancel) => _cancelled = cancel;
|
|
}
|