using System.Collections.Generic; using System.Reflection; using Oxide.Core.Plugins; namespace Oxide.Plugins { [Info("WhoUsesGridAPI", "Steenamaroo", "1.0.0", ResourceId = 0)] [Description("")] class WhoUsesGridAPI : RustPlugin { FieldInfo field = typeof(CSharpPlugin).GetField("pluginReferenceFields", BindingFlags.Instance | BindingFlags.NonPublic); void OnServerInitialized() { foreach (var p in plugins.GetAll()) CheckPlug(p); } void OnPluginLoaded(Plugin p) => CheckPlug(p); void CheckPlug(Plugin p) { var plug = p as CSharpPlugin; if (plug == null) return; ; if ((field.GetValue(plug) as Dictionary).ContainsKey("GridAPI")) PrintWarning(p.Name + " references GridAPI."); } } }