Advertisement
AutismAlex

Untitled

Dec 17th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. using Rocket.Core.Logging;
  2. using Rocket.Core.Plugins;
  3. using UnityEngine;
  4. using Rocket.API;
  5. using Rocket.Unturned.Player;
  6. using Rocket.Unturned;
  7. using Rocket.Unturned.Commands;
  8. using Rocket.Unturned.Chat;
  9. using System;
  10. using System.Collections.Generic;
  11. using Logger = Rocket.Core.Logging.Logger;
  12.  
  13. namespace Sample
  14. {
  15. public class Class1 : RocketPlugin
  16. {
  17. protected override void Load()
  18. {
  19. Logger.LogWarning("Loaded Sample Plugin");
  20. }
  21. protected override void Unload()
  22. {
  23. Logger.LogWarning("Unloaded Sample Plugin");
  24. }
  25. }
  26. public class CommandHello : IRocketCommand
  27. {
  28. public AllowedCaller AllowedCaller => AllowedCaller.Both;
  29.  
  30. public string Name => "hello";
  31.  
  32. public string Help => "A sample command";
  33.  
  34. public string Syntax => "<player>";
  35.  
  36. public List<string> Aliases => new List<string>();
  37.  
  38. public List<string> Permissions => new List<string>() { "myplugin.hello" };
  39.  
  40. public void Execute(IRocketPlayer caller, string[] command)
  41. {
  42. UnturnedChat.Say("Hello!");
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement