Permalink
Browse files

Plugin Created!

  • Loading branch information...
Coopyy committed Apr 29, 2017
1 parent b055ee2 commit 793ddfcddd8b37620bc2f5bc48d06faab2a40bb5
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
Binary file not shown.
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\BuyPermission.sln",
"PreviewInSolutionExplorer": false
}
BIN +328 KB .vs/slnx.sqlite
Binary file not shown.
@@ -0,0 +1,10 @@
{
"version": "0.2.1",
"tasks": [
{
"taskName": "task-Commands",
"appliesTo": "Commands/",
"type": "command"
}
]
}
@@ -0,0 +1,79 @@
using Rocket.API;
using Rocket.API.Extensions;
using Rocket.Core.Logging;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace coolpuppy24.staffhelp
{
public class Command : IRocketCommand
{
public static Main Instance;
public List<string> Aliases
{
get
{
return new List<string>() {"sh"};
}
}
public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Player;
}
}
public string Help
{
get
{
return "";
}
}
public string Name
{
get
{
return "staffhelp";
}
}
public List<string> Permissions
{
get
{
return new List<string>() { "staffhelp.send" };
}
}
public string Syntax
{
get
{
return "<message>";
}
}
public void Execute(IRocketPlayer caller, string[] command)
{
UnturnedPlayer player = (UnturnedPlayer)caller;
string message = command.GetParameterString(0);
foreach (UnturnedPlayer staffmems in Main.Instance.Players())
{
if (staffmems.HasPermission("staffhelp.receive"))
{
UnturnedChat.Say(staffmems, "[StaffHelp] " + player.CharacterName + ": " + message, UnturnedChat.GetColorFromName(Main.Instance.Configuration.Instance.ChatColorName, Color.red));
}
}
}
}
}
@@ -0,0 +1,19 @@
using Rocket.API;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace coolpuppy24.staffhelp
{
public class Configuration : IRocketPluginConfiguration
{
public string ChatColorName;
public void LoadDefaults()
{
ChatColorName = "Blue";
}
}
}
Oops, something went wrong.

0 comments on commit 793ddfc

Please sign in to comment.