From 872cc78386782c85e3ea6321c24ee34375c11a7c Mon Sep 17 00:00:00 2001 From: Tides Date: Sat, 20 Jan 2024 09:36:49 -0500 Subject: [PATCH] Remove overridable name property --- Obsidian.API/Events/BaseMinecraftEventArgs.cs | 2 -- Obsidian.API/Events/BlockBreakEventArgs.cs | 2 -- Obsidian.API/Events/BlockEventArgs.cs | 2 -- Obsidian.API/Events/ContainerClickEventArgs.cs | 2 -- Obsidian.API/Events/ContainerClosedEventArgs.cs | 2 -- Obsidian.API/Events/ContainerEventArgs.cs | 2 -- Obsidian.API/Events/EntityEventArgs.cs | 2 -- Obsidian.API/Events/EntityInteractEventArgs.cs | 2 -- Obsidian.API/Events/IncomingChatMessageEventArgs.cs | 2 -- Obsidian.API/Events/PacketReceivedEventArgs.cs | 2 -- Obsidian.API/Events/PermissionGrantedEventArgs.cs | 2 -- Obsidian.API/Events/PermissionRevokedEventArgs.cs | 2 -- Obsidian.API/Events/PlayerAttackEntityEventArgs.cs | 2 -- Obsidian.API/Events/PlayerEventArgs.cs | 2 -- Obsidian.API/Events/PlayerInteractEventArgs.cs | 2 -- Obsidian.API/Events/PlayerJoinEventArgs.cs | 2 -- Obsidian.API/Events/PlayerLeaveEventArgs.cs | 2 -- Obsidian.API/Events/PlayerTeleportEventArgs.cs | 2 -- Obsidian.API/Events/ServerStatusRequestEventArgs.cs | 2 -- 19 files changed, 38 deletions(-) diff --git a/Obsidian.API/Events/BaseMinecraftEventArgs.cs b/Obsidian.API/Events/BaseMinecraftEventArgs.cs index 24be56a02..0f7a027cb 100644 --- a/Obsidian.API/Events/BaseMinecraftEventArgs.cs +++ b/Obsidian.API/Events/BaseMinecraftEventArgs.cs @@ -5,8 +5,6 @@ /// public abstract class BaseMinecraftEventArgs : AsyncEventArgs { - public virtual string Name => string.Empty; - /// /// Server this event took place in. /// diff --git a/Obsidian.API/Events/BlockBreakEventArgs.cs b/Obsidian.API/Events/BlockBreakEventArgs.cs index 3938597f3..0c11f3ff4 100644 --- a/Obsidian.API/Events/BlockBreakEventArgs.cs +++ b/Obsidian.API/Events/BlockBreakEventArgs.cs @@ -2,8 +2,6 @@ public class BlockBreakEventArgs : BlockEventArgs, ICancellable { - public override string Name => "BlockBreak"; - /// /// Player that has broken the block. /// diff --git a/Obsidian.API/Events/BlockEventArgs.cs b/Obsidian.API/Events/BlockEventArgs.cs index 3ef1c49c6..bfdedb7ca 100644 --- a/Obsidian.API/Events/BlockEventArgs.cs +++ b/Obsidian.API/Events/BlockEventArgs.cs @@ -2,8 +2,6 @@ public abstract class BlockEventArgs : BaseMinecraftEventArgs { - public override string Name => "BlockEvent"; - /// /// The impacted block. /// diff --git a/Obsidian.API/Events/ContainerClickEventArgs.cs b/Obsidian.API/Events/ContainerClickEventArgs.cs index 991227d00..5f017463b 100644 --- a/Obsidian.API/Events/ContainerClickEventArgs.cs +++ b/Obsidian.API/Events/ContainerClickEventArgs.cs @@ -4,8 +4,6 @@ namespace Obsidian.API.Events; public sealed class ContainerClickEventArgs : ContainerEventArgs, ICancellable { - public override string Name => "ContainerClick"; - /// /// Gets the current item that was clicked /// diff --git a/Obsidian.API/Events/ContainerClosedEventArgs.cs b/Obsidian.API/Events/ContainerClosedEventArgs.cs index be3e6c806..75924b67d 100644 --- a/Obsidian.API/Events/ContainerClosedEventArgs.cs +++ b/Obsidian.API/Events/ContainerClosedEventArgs.cs @@ -1,8 +1,6 @@ namespace Obsidian.API.Events; public sealed class ContainerClosedEventArgs : ContainerEventArgs, ICancellable { - public override string Name => "ContainerClosed"; - public bool IsCancelled { get; private set; } internal ContainerClosedEventArgs(IPlayer player, IServer server) : base(player, server) diff --git a/Obsidian.API/Events/ContainerEventArgs.cs b/Obsidian.API/Events/ContainerEventArgs.cs index d0c1bcc80..4babfc1ec 100644 --- a/Obsidian.API/Events/ContainerEventArgs.cs +++ b/Obsidian.API/Events/ContainerEventArgs.cs @@ -2,8 +2,6 @@ public class ContainerEventArgs : PlayerEventArgs { - public override string Name => "ContainerEvent"; - public required BaseContainer Container { get; init; } protected ContainerEventArgs(IPlayer player, IServer server) : base(player, server) diff --git a/Obsidian.API/Events/EntityEventArgs.cs b/Obsidian.API/Events/EntityEventArgs.cs index 39d9f7d82..e810b7a9d 100644 --- a/Obsidian.API/Events/EntityEventArgs.cs +++ b/Obsidian.API/Events/EntityEventArgs.cs @@ -2,8 +2,6 @@ public class EntityEventArgs : BaseMinecraftEventArgs, ICancellable { - public override string Name => "EntityEvent"; - /// /// The entity involved in this event. /// diff --git a/Obsidian.API/Events/EntityInteractEventArgs.cs b/Obsidian.API/Events/EntityInteractEventArgs.cs index 25fd32eb9..957d7299e 100644 --- a/Obsidian.API/Events/EntityInteractEventArgs.cs +++ b/Obsidian.API/Events/EntityInteractEventArgs.cs @@ -2,8 +2,6 @@ public class EntityInteractEventArgs : EntityEventArgs { - public override string Name => "EntityInteract"; - /// /// The player who interacted with the entity. /// diff --git a/Obsidian.API/Events/IncomingChatMessageEventArgs.cs b/Obsidian.API/Events/IncomingChatMessageEventArgs.cs index dfc4c0a37..662acd75d 100644 --- a/Obsidian.API/Events/IncomingChatMessageEventArgs.cs +++ b/Obsidian.API/Events/IncomingChatMessageEventArgs.cs @@ -2,8 +2,6 @@ public class IncomingChatMessageEventArgs : PlayerEventArgs, ICancellable { - public override string Name => "IncomingChatMessage"; - /// /// The message that was sent. /// diff --git a/Obsidian.API/Events/PacketReceivedEventArgs.cs b/Obsidian.API/Events/PacketReceivedEventArgs.cs index 6db13775e..a92f43d54 100644 --- a/Obsidian.API/Events/PacketReceivedEventArgs.cs +++ b/Obsidian.API/Events/PacketReceivedEventArgs.cs @@ -2,8 +2,6 @@ public sealed class PacketReceivedEventArgs : PlayerEventArgs, ICancellable { - public override string Name => "PacketReceived"; - /// /// Id of the received packet. /// diff --git a/Obsidian.API/Events/PermissionGrantedEventArgs.cs b/Obsidian.API/Events/PermissionGrantedEventArgs.cs index 0461f7b0a..7c9f1bf5b 100644 --- a/Obsidian.API/Events/PermissionGrantedEventArgs.cs +++ b/Obsidian.API/Events/PermissionGrantedEventArgs.cs @@ -2,8 +2,6 @@ public class PermissionGrantedEventArgs : PlayerEventArgs { - public override string Name => "PermissionGranted"; - public string Permission { get; } public PermissionGrantedEventArgs(IPlayer player, IServer server, string permission) : base(player, server) diff --git a/Obsidian.API/Events/PermissionRevokedEventArgs.cs b/Obsidian.API/Events/PermissionRevokedEventArgs.cs index a71150611..65b00a48e 100644 --- a/Obsidian.API/Events/PermissionRevokedEventArgs.cs +++ b/Obsidian.API/Events/PermissionRevokedEventArgs.cs @@ -2,8 +2,6 @@ public class PermissionRevokedEventArgs : PlayerEventArgs { - public override string Name => "PermissionRevoked"; - public string Permission { get; } public PermissionRevokedEventArgs(IPlayer player, IServer server, string permission) : base(player, server) diff --git a/Obsidian.API/Events/PlayerAttackEntityEventArgs.cs b/Obsidian.API/Events/PlayerAttackEntityEventArgs.cs index 82f1df84c..ae2539de4 100644 --- a/Obsidian.API/Events/PlayerAttackEntityEventArgs.cs +++ b/Obsidian.API/Events/PlayerAttackEntityEventArgs.cs @@ -3,8 +3,6 @@ //TODO check if player crits and calculate damage public class PlayerAttackEntityEventArgs : EntityEventArgs { - public override string Name => "PlayerAttackEntity"; - /// /// The player who interacted with the entity. /// diff --git a/Obsidian.API/Events/PlayerEventArgs.cs b/Obsidian.API/Events/PlayerEventArgs.cs index cdae03c5d..9769748f6 100644 --- a/Obsidian.API/Events/PlayerEventArgs.cs +++ b/Obsidian.API/Events/PlayerEventArgs.cs @@ -2,8 +2,6 @@ public class PlayerEventArgs : BaseMinecraftEventArgs { - public override string Name => "PlayerEvent"; - /// /// The player involved in this event. /// diff --git a/Obsidian.API/Events/PlayerInteractEventArgs.cs b/Obsidian.API/Events/PlayerInteractEventArgs.cs index 2585397d0..9f30911dd 100644 --- a/Obsidian.API/Events/PlayerInteractEventArgs.cs +++ b/Obsidian.API/Events/PlayerInteractEventArgs.cs @@ -7,8 +7,6 @@ /// public sealed class PlayerInteractEventArgs : PlayerEventArgs, ICancellable { - public override string Name => "PlayerInteract"; - /// /// The item that was being held when interacting. /// diff --git a/Obsidian.API/Events/PlayerJoinEventArgs.cs b/Obsidian.API/Events/PlayerJoinEventArgs.cs index db8510ac1..49a8b8c81 100644 --- a/Obsidian.API/Events/PlayerJoinEventArgs.cs +++ b/Obsidian.API/Events/PlayerJoinEventArgs.cs @@ -2,8 +2,6 @@ public class PlayerJoinEventArgs : PlayerEventArgs { - public override string Name => "PlayerJoin"; - /// /// The date the player joined. /// diff --git a/Obsidian.API/Events/PlayerLeaveEventArgs.cs b/Obsidian.API/Events/PlayerLeaveEventArgs.cs index 455ef482c..ddcf71c91 100644 --- a/Obsidian.API/Events/PlayerLeaveEventArgs.cs +++ b/Obsidian.API/Events/PlayerLeaveEventArgs.cs @@ -2,8 +2,6 @@ public class PlayerLeaveEventArgs : PlayerEventArgs { - public override string Name => "PlayerLeave"; - /// /// The date the player left. /// diff --git a/Obsidian.API/Events/PlayerTeleportEventArgs.cs b/Obsidian.API/Events/PlayerTeleportEventArgs.cs index 00f28235b..2331e3113 100644 --- a/Obsidian.API/Events/PlayerTeleportEventArgs.cs +++ b/Obsidian.API/Events/PlayerTeleportEventArgs.cs @@ -2,8 +2,6 @@ public class PlayerTeleportEventArgs : PlayerEventArgs { - public override string Name => "PlayerTeleport"; - public VectorF OldPosition { get; } public VectorF NewPosition { get; } diff --git a/Obsidian.API/Events/ServerStatusRequestEventArgs.cs b/Obsidian.API/Events/ServerStatusRequestEventArgs.cs index 161d07054..ce363fea7 100644 --- a/Obsidian.API/Events/ServerStatusRequestEventArgs.cs +++ b/Obsidian.API/Events/ServerStatusRequestEventArgs.cs @@ -2,8 +2,6 @@ public class ServerStatusRequestEventArgs : BaseMinecraftEventArgs { - public override string Name => "ServerStatusRequest"; - public IServerStatus Status { get; } internal ServerStatusRequestEventArgs(IServer server, IServerStatus status) : base(server)