Skip to content

Commit

Permalink
* Buildable changes, command base
Browse files Browse the repository at this point in the history
+ Add example command
  • Loading branch information
vse3211 committed Jun 30, 2022
1 parent b6368cd commit 06d09e8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Commands/ExampleCommand.cs
Original file line number Diff line number Diff line change
@@ -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<string> Aliases => new List<string>();

public List<string> Permissions => new List<string>();

public void Execute(IRocketPlayer caller, string[] command)
{
UnturnedChat.Say(caller, $"[{DateTime.Now}] {Plugin.Instance.Random.Next(10000)}"); // Say player message with Rocket
}
}
}
1 change: 1 addition & 0 deletions UnturnedExamplePlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Commands\ExampleCommand.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="PluginConfiguration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down

0 comments on commit 06d09e8

Please sign in to comment.