using Oxide.Core.Plugins; using System.Collections.Generic; namespace Oxide.Plugins { [Info("Plugin name", "Author name", "1.0.0", ResourceId = 123)] public class Template : RustPlugin // rename this to how your plugin file is named { #region RustIO Bindings [PluginReference] Plugin RustIO; bool IO() => RustIO != null ? RustIO.Call("IsInstalled") : false; bool HasFriend(string playerId, string friendId) => RustIO != null ? RustIO.Call("HasFriend", playerId, friendId) : false; bool AddFriend(string playerId, string friendId) => RustIO != null ? RustIO.Call("AddFriend", playerId, friendId) : false; bool DeleteFriend(string playerId, string friendId) => RustIO != null ? RustIO.Call("DeleteFriend", playerId, friendId) : false; List GetFriends(string playerId) => RustIO != null ? RustIO.Call>("GetFriends", playerId) : new List(); #endregion [HookMethod("OnServerInitialized")] void OnServerInitialized() { if (!IO()) PrintWarning("This plugin uses the Rust:IO API, but Rust:IO is not installed."); } } }