diff --git a/Commands/ExampleCommand.cs b/Commands/ExampleCommand.cs new file mode 100644 index 0000000..33bd22a --- /dev/null +++ b/Commands/ExampleCommand.cs @@ -0,0 +1,27 @@ +using Rocket.API; +using Rocket.Unturned.Chat; +using System; +using System.Collections.Generic; + +namespace UnturnedExamplePlugin.Commands +{ + public class ExampleCommand : IRocketCommand + { + public AllowedCaller AllowedCaller => AllowedCaller.Player; + + public string Name => "example"; + + public string Help => "Use /example for get example message"; + + public string Syntax => ""; + + public List Aliases => new List(); + + public List Permissions => new List(); + + public void Execute(IRocketPlayer caller, string[] command) + { + UnturnedChat.Say(caller, $"[{DateTime.Now}] {Plugin.Instance.Random.Next(10000)}"); // Say player message with Rocket + } + } +} diff --git a/UnturnedExamplePlugin.csproj b/UnturnedExamplePlugin.csproj index 1b19086..f116631 100644 --- a/UnturnedExamplePlugin.csproj +++ b/UnturnedExamplePlugin.csproj @@ -275,6 +275,7 @@ +