public void OnPlayerConnected(UnturnedPlayer player)
 {
     if (Configuration.Instance.AlertOnJoin)
     {
         VoteRewards.HandleVote(player, false);
     }
 }
        public void Execute(IRocketPlayer caller, string[] command)
        {
            if (command.Length == 0)
            {
                if (caller is ConsolePlayer)
                {
                    Plugin.VoteRewardsPlugin.Write("<player>", ConsoleColor.Red);
                    return;
                }

                VoteRewards.HandleVote((UnturnedPlayer)caller, true);
            }
            else
            {
                if (caller.HasPermission("voterewards.givereward") || caller is ConsolePlayer)
                {
                    UnturnedPlayer toPlayer = UnturnedPlayer.FromName(command[0]);

                    if (toPlayer != null)
                    {
                        VoteRewards.GiveReward(toPlayer, Plugin.VoteRewardsPlugin.Instance.Configuration.Instance.Services.FirstOrDefault().Name);

                        if (caller is ConsolePlayer)
                        {
                            Plugin.VoteRewardsPlugin.Write(Plugin.VoteRewardsPlugin.Instance.Translate("free_reward", toPlayer.CharacterName));
                        }
                        else
                        {
                            UnturnedChat.Say(caller, Plugin.VoteRewardsPlugin.Instance.Translate("free_reward", toPlayer.CharacterName));
                        }
                    }
                }
            }
        }