Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using UnityEngine;
- using Rocket.API;
- using Rocket.Unturned.Player;
- using Rocket.Unturned;
- using Rocket.Unturned.Commands;
- using Rocket.Unturned.Chat;
- using System.Collections.Generic;
- using Rocket.API.Extensions;
- using Rocket.API.Serialisation;
- using Rocket.Core.Permissions;
- namespace ColorChange
- {
- public class EasyColorChange : IRocketCommand
- {
- IRocketPermissionsProvider permProvider;
- public AllowedCaller AllowedCaller
- {
- get { return AllowedCaller.Both; }
- }
- public string Name
- {
- get { return "changecolor"; }
- }
- public string Help
- {
- get { return "Change a group's color"; }
- }
- public string Syntax
- {
- get { return "<group> <color>"; }
- }
- public List<string> Aliases
- {
- get { return new List<string>(){"cc", "changec", "ccolor"}; }
- }
- public void Execute(IRocketPlayer caller, string[] command)
- {
- string groupName = command.GetStringParameter(0);
- RocketPermissionsGroup permG = new RocketPermissionsGroup();
- RocketPermissions rPerms = new RocketPermissions();
- string hexColor = command.GetStringParameter(1);
- permProvider.GetGroup(groupName);
- permG.Id = Convert.ToString(permProvider);
- permG.Color = hexColor;
- }
- public List<string> Permissions
- {
- get
- {
- return new List<string>
- {
- "milk.changecolor"
- };
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement