From 3764527d3d390091c4e12f14481cad54b2b0a63d Mon Sep 17 00:00:00 2001 From: Ruby Rose Date: Tue, 11 Jul 2017 16:29:48 +0300 Subject: [PATCH] don't inherit handled event args for them --- TShockAPI/Hooks/PlayerHooks.cs | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/TShockAPI/Hooks/PlayerHooks.cs b/TShockAPI/Hooks/PlayerHooks.cs index 7f2e8601..6e3db3d5 100644 --- a/TShockAPI/Hooks/PlayerHooks.cs +++ b/TShockAPI/Hooks/PlayerHooks.cs @@ -143,7 +143,7 @@ namespace TShockAPI.Hooks /// /// EventArgs used for the event. /// - public class PlayerPermissionEventArgs : HandledEventArgs + public class PlayerPermissionEventArgs { /// /// The player who fired the event. @@ -176,7 +176,7 @@ namespace TShockAPI.Hooks /// /// EventArgs used for the event. /// - public class PlayerItembanPermissionEventArgs : HandledEventArgs + public class PlayerItembanPermissionEventArgs { /// /// The player who fired the event. @@ -209,7 +209,7 @@ namespace TShockAPI.Hooks /// /// EventArgs used for the event. /// - public class PlayerProjbanPermissionEventArgs : HandledEventArgs + public class PlayerProjbanPermissionEventArgs { /// /// The player who fired the event. @@ -242,7 +242,7 @@ namespace TShockAPI.Hooks /// /// EventArgs used for the event. /// - public class PlayerTilebanPermissionEventArgs : HandledEventArgs + public class PlayerTilebanPermissionEventArgs { /// /// The player who fired the event. @@ -472,10 +472,7 @@ namespace TShockAPI.Hooks var args = new PlayerPermissionEventArgs(player, permission); PlayerPermission(args); - if (args.Handled) - return args.Result; - else - return PermissionResult.Inconclusive; + return args.Result; } /// @@ -491,10 +488,7 @@ namespace TShockAPI.Hooks var args = new PlayerItembanPermissionEventArgs(player, bannedItem); PlayerItembanPermission(args); - if (args.Handled) - return args.Result; - else - return PermissionResult.Inconclusive; + return args.Result; } /// @@ -510,10 +504,7 @@ namespace TShockAPI.Hooks var args = new PlayerProjbanPermissionEventArgs(player, bannedProj); PlayerProjbanPermission(args); - if (args.Handled) - return args.Result; - else - return PermissionResult.Inconclusive; + return args.Result; } /// @@ -529,10 +520,7 @@ namespace TShockAPI.Hooks var args = new PlayerTilebanPermissionEventArgs(player, bannedTile); PlayerTilebanPermission(args); - if (args.Handled) - return args.Result; - else - return PermissionResult.Inconclusive; + return args.Result; } }