public static bool TryGetItem(string name, out CustomItem item) { foreach (CustomItem cItem in Plugin.Singleton.ItemManagers) { if (cItem.Name.Equals(name, System.StringComparison.OrdinalIgnoreCase)) { item = cItem; return(true); } } item = null; return(false); }
public static bool TryGetItem(int id, out CustomItem item) { foreach (CustomItem cItem in Plugin.Singleton.ItemManagers) { if (cItem.Id == id) { item = cItem; return(true); } } item = null; return(false); }
public static void GiveItem(this Player player, CustomItem item) => item.GiveItem(player);
public static void SpawnItem(this CustomItem item, Vector3 position) => item.SpawnItem(position);