From 807453942ea75351f3af2ec862f3641d8e3d5078 Mon Sep 17 00:00:00 2001 From: galaxy119 Date: Sun, 5 Apr 2020 02:55:26 -0700 Subject: [PATCH] Fix permission extension class name to not break plugins. --- EXILED_Events/Plugin.cs | 2 +- EXILED_Main/Extensions/Player.cs | 1 + EXILED_Permissions/Extensions.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EXILED_Events/Plugin.cs b/EXILED_Events/Plugin.cs index 5a6a2c8687..e017b3f5c4 100644 --- a/EXILED_Events/Plugin.cs +++ b/EXILED_Events/Plugin.cs @@ -20,7 +20,7 @@ public class EventPlugin : Plugin internal static Random Gen = new Random(); public static bool WarheadLocked; public static string VersionUpdateUrl = "none"; - public static ExiledVersion Version = new ExiledVersion { Major = 1, Minor = 9, Patch = 12 }; + public static ExiledVersion Version = new ExiledVersion { Major = 1, Minor = 9, Patch = 14 }; //The below variables are used to disable the patch for any particular event, allowing devs to implement events themselves. #region Patch Disable diff --git a/EXILED_Main/Extensions/Player.cs b/EXILED_Main/Extensions/Player.cs index e12051fcb6..cf0618b018 100644 --- a/EXILED_Main/Extensions/Player.cs +++ b/EXILED_Main/Extensions/Player.cs @@ -251,6 +251,7 @@ private static IEnumerator BlinkTag(ReferenceHub player) /// 0 is no sight, 1 is the first sight in the Weapon Manager /// 0 is no custom barrel, 1 is the first barrel in the Weapon Manager /// 0 is no extra attachment, other numbers are the ammo counter, flashlight, etc. + [Obsolete("Use AddItem instead.", true)] public static void GiveItem(this ReferenceHub player, ItemType itemType, float duration = float.NegativeInfinity, int sight = 0, int barrel = 0, int other = 0) => player.inventory.AddNewItem(itemType, duration, sight, barrel, other); // Adapted from https://github.com/galaxy119/SamplePlugin/blob/master/SamplePlugin/Extensions.cs diff --git a/EXILED_Permissions/Extensions.cs b/EXILED_Permissions/Extensions.cs index 9e33678e06..593fd1ee4f 100644 --- a/EXILED_Permissions/Extensions.cs +++ b/EXILED_Permissions/Extensions.cs @@ -1,6 +1,6 @@ using EXILED; -public static class Extensions +public static class Extenstions { public static bool CheckPermission(this ReferenceHub rh, string permission) => rh.gameObject == PlayerManager.localPlayer || PermissionPlugin.CheckPermission(rh, permission); } \ No newline at end of file