public void CheckStatusCommands(IChatMessage message)
        {
            if (message.Sender.IsBroadcaster || message.Sender.IsModerator)
            {
                if (message.Message.ToLower().Contains("!gm reset") && GMPUI.chatIntegration == true)
                {
                    try
                    {
                        Plugin.cooldowns.ResetCooldowns();
                        TwitchPowers.ResetPowers(true);
                        Plugin.twitchPowers.StopAllCoroutines();
                        GameModifiersController.charges = Config.chargesPerLevel;
                        ChatMessageHandler.TryAsyncMessage("Resetting non Permanent Powers");
                    }
                    catch (System.Exception ex)
                    {
                        Plugin.log.Error("Reset Command Failed: " + ex);
                    }
                }
            }

            /*
             * if (message.Message.ToLower().Contains("!gm pp"))
             * {
             *  if (Plugin.currentpp != 0)
             *      ChatMessageHandler.TryAsyncMessage("Streamer Rank: #" + Plugin.currentRank + ". Streamer pp: " + Plugin.currentpp + "pp");
             *  else
             *      ChatMessageHandler.TryAsyncMessage("Currently do not have streamer info");
             * }
             */
            if (message.Message.ToLower().Contains("!gm status"))
            {
                string scopeMessage = "";
                int    scope        = CheckCommandScope();
                switch (scope)
                {
                case 0:
                    scopeMessage = "Everyone has access to commands";
                    break;

                case 1:
                    scopeMessage = "Subscribers have access to commands";
                    break;

                case 2:
                    scopeMessage = "Moderators have access to commands";
                    break;
                }

                GameModifiersController.beepSound.Play();
                if (GMPUI.chatIntegration)
                {
                    ChatMessageHandler.TryAsyncMessage("Chat Integration Enabled. " + scopeMessage);
                }
                else
                {
                    ChatMessageHandler.TryAsyncMessage("Chat Integration Not Enabled. " + scopeMessage);
                }
            }
        }
        public void CheckInfoCommands(IChatMessage message)
        {
            if (message.Message.ToLower().Contains("!gm help"))
            {
                ChatMessageHandler.TryAsyncMessage("Guides: For Regular Users - http://bit.ly/1413ChatUser | For Streamers - http://bit.ly/1413Readme | For moderators also view http://bit.ly/1413Config");
            }
            if (message.Message.ToLower().Contains("!gm currentsong"))
            {
                if (!Plugin.isValidScene)
                {
                    ChatMessageHandler.TryAsyncMessage("No song is currently being played.");
                }
                else
                {
                    ChatMessageHandler.TryAsyncMessage("Current Song: " + Plugin.levelData.GameplayCoreSceneSetupData.difficultyBeatmap.level.songName
                                                       + " - " + Plugin.levelData.GameplayCoreSceneSetupData.difficultyBeatmap.level.songSubName + " mapped by " + Plugin.levelData.GameplayCoreSceneSetupData.difficultyBeatmap.level.levelAuthorName);
                }
            }

            if (message.Message.ToLower().Contains("!gm chargehelp"))
            {
                if (Config.timeForCharges == 0 || Config.chargesOverTime == 0)
                {
                    ChatMessageHandler.TryAsyncMessage("Every " + Config.bitsPerCharge + " bits sent with a message adds a charge, which are used to activate commands! If you add super at the end of a command, it will cost " + Config.chargesForSuperCharge + " Charges but will make the effect last much longer! " + Config.chargesPerLevel + " Charges are generated every song with chat mode on.");
                }
                else
                {
                    ChatMessageHandler.TryAsyncMessage("Every " + Config.bitsPerCharge + " bits sent with a message adds a charge, which are used to activate commands! If you add super at the end of a command, it will cost " + Config.chargesForSuperCharge + " Charges but will make the effect last much longer! " + Config.chargesPerLevel + " Charges are generated every song with chat mode on. Every " + Config.timeForCharges + " seconds, " + Config.chargesOverTime + " are added.");
                }
            }
            if (message.Message.ToLower().Contains("!gm commands"))
            {
                ChatMessageHandler.TryAsyncMessage("Currently supported commands | status: Currrent Status of chat integration | charges: view current charges and costs | chargehelp: Explain charge system");
            }

            if (!Plugin.cooldowns.GetCooldown("chargescommand"))
            {
                if (message.Message.ToLower().Contains("!gm charges"))
                {
                    string output    = "Charges: " + GameModifiersController.charges + " | Commands Per Message: " + Config.commandsPerMessage + " | " + Config.GetChargeCostString();
                    string pasteLink = ""; //await PasteRequests.GetHastebin(output, "GamePlayModifiersPlus Response", $"Charge Info for {ChatMessageHandler.commandChannel.Id}");
                    if (string.IsNullOrEmpty(pasteLink))
                    {
                        output = output.Replace("\n", "");
                        ChatMessageHandler.TryAsyncMessage(output);
                    }

                    else
                    {
                        ChatMessageHandler.TryAsyncMessage($"View Charge Information Here: {pasteLink}");
                    }
                    SharedCoroutineStarter.instance.StartCoroutine(Cooldowns.CommandCoolDown("chargescommand", Config.chargesCommandCoolDown));
                }
            }
        }
        public void CheckChargeMessage(IChatMessage message)
        {
            TwitchMessage twitchMessage = message is TwitchMessage ? message as TwitchMessage : null;

            if (twitchMessage == null)
            {
                return;
            }

            if (twitchMessage.Bits >= Config.bitsPerCharge && Config.bitsPerCharge > 0)
            {
                GameModifiersController.charges += (twitchMessage.Bits / Config.bitsPerCharge);
                ChatMessageHandler.TryAsyncMessage("Current Charges: " + GameModifiersController.charges);
            }
            if (twitchMessage.Sender.UserName.ToLower() == "kyle1413k" && message.Message.ToLower().Contains("!gm admincharge"))
            {
                GameModifiersController.charges += (Config.maxCharges / 2);
                ChatMessageHandler.TryAsyncMessage("Current Charges: " + GameModifiersController.charges);
            }
            if (message.Message.ToLower().Contains("!gm") && message.Message.ToLower().Contains("super"))
            {
                GameModifiersController.trySuper = true;
            }
        }
 public void CheckRotationCommands(IChatMessage message)
 {
     if (GameModifiersController.commandsLeftForMessage == 0)
     {
         return;
     }
     if (!Plugin.cooldowns.GetCooldown("Rotation"))
     {
         if (message.Message.ToLower().Contains("!gm left"))
         {
             if (!GMPUI.chatIntegration360)
             {
                 ChatMessageHandler.TryAsyncMessage("Rotation Based Commands currently disabled. Please turn on chatintegration360 if you would like to use these commands.");
             }
             else if (GameModifiersController.charges >= Config.leftChargeCost)
             {
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.LeftRotation());
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.leftCoolDownn, "Rotation", "Rotating level to the left."));
                 GameModifiersController.charges -= Config.leftChargeCost;
                 GameModifiersController.commandsLeftForMessage -= 1;
                 globalActive = true;
             }
         }
         else if (message.Message.ToLower().Contains("!gm right"))
         {
             if (!GMPUI.chatIntegration360)
             {
                 ChatMessageHandler.TryAsyncMessage("Rotation Based Commands currently disabled. Please turn on chatintegration360 if you would like to use these commands.");
             }
             else if (GameModifiersController.charges >= Config.rightChargeCost)
             {
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.RightRotation());
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.rightCoolDown, "Rotation", "Rotating level to the right."));
                 GameModifiersController.charges -= Config.rightChargeCost;
                 GameModifiersController.commandsLeftForMessage -= 1;
                 globalActive = true;
             }
         }
         else if (message.Message.ToLower().Contains("!gm randomrotation"))
         {
             if (!GMPUI.chatIntegration360)
             {
                 ChatMessageHandler.TryAsyncMessage("Rotation Based Commands currently disabled. Please turn on chatintegration360 if you would like to use these commands.");
             }
             else if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.randomRotationChargeCost)
             {
                 //       GameModifiersController.beepSound.Play();
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.RandomRotation(GameObjects.songAudio.clip.length));
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Rotation", "Super random level rotation active."));
                 GameModifiersController.trySuper = false;
                 GameModifiersController.charges -= Config.chargesForSuperCharge + Config.randomRotationChargeCost;
                 GameModifiersController.commandsLeftForMessage -= 1;
                 globalActive = true;
             }
             else if (GameModifiersController.charges >= Config.randomRotationChargeCost)
             {
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.RandomRotation(Config.randomRotationDuration));
                 Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.randomRotationCoolDown, "Rotation", "Random level rotation active."));
                 GameModifiersController.charges -= Config.randomRotationChargeCost;
                 GameModifiersController.commandsLeftForMessage -= 1;
                 globalActive = true;
             }
         }
     }
 }
Ejemplo n.º 5
0
        public void CheckGameplayCommands(IChatMessage message)
        {
            if (message.Message.ToLower().Contains("!gm da") && !Plugin.cooldowns.GetCooldown("Note") && !Plugin.levelData.GameplayCoreSceneSetupData.gameplayModifiers.disappearingArrows && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.daChargeCost)
                {
                    //       GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.TempDA(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "DA", "Super DA Active."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.daChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.daChargeCost)
                {
                    //      GameModifiersController.beepSound.Play();

                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.TempDA(Config.daDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.daCooldown, "DA", "DA Active."));
                    GameModifiersController.charges -= Config.daChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm njsrandom") && !Plugin.cooldowns.GetCooldown("RandomNJS") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.njsRandomChargeCost)
                {
                    //         GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.NjsRandom(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "NJSRandom", "Super Random Note Jump Speed Active."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.njsRandomChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.njsRandomChargeCost)
                {
                    //         GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.NjsRandom(Config.njsRandomDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.njsRandomCooldown, "NJSRandom", "Random Note Jump Speed Active."));
                    GameModifiersController.charges -= Config.njsRandomChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm offsetrandom") && !Plugin.cooldowns.GetCooldown("OffsetRandom") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.offsetrandomChargeCost)
                {
                    //         GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.OffsetRandom(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "OffsetRandom", "Super Random Note Spawn Offset Active."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.offsetrandomChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.offsetrandomChargeCost)
                {
                    //         GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.OffsetRandom(Config.offsetrandomDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.offsetrandomCooldown, "OffsetRandom", "Random Note Spawn Offset Active."));
                    GameModifiersController.charges -= Config.offsetrandomChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm noarrows") && !Plugin.cooldowns.GetCooldown("NoArrows") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.noArrowsChargeCost)
                {
                    //        GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.TempNoArrows(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "NoArrows", "Super No Arrows Mode Activated."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.noArrowsChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.noArrowsChargeCost)
                {
                    //       GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.TempNoArrows(Config.noArrowsDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.noArrowsCooldown, "NoArrows", "Temporary No Arrows Activated"));
                    GameModifiersController.charges -= Config.noArrowsChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm mirror") && !Plugin.cooldowns.GetCooldown("Mirror") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.mirrorChargeCost)
                {
                    //        GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.TempMirror(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Mirror", "Super Mirror Mode Activated."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.mirrorChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.mirrorChargeCost)
                {
                    //       GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.TempMirror(Config.mirrorDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.mirrorCooldown, "Mirror", "Temporary Mirror Mode Activated."));
                    GameModifiersController.charges -= Config.mirrorChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm reverse") && !Plugin.cooldowns.GetCooldown("Map Swap") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.reverseChargeCost)
                {
                    //        GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Reverse(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Map Swap", "Reversing entire map :)"));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.reverseChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.reverseChargeCost)
                {
                    //       GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Reverse(Config.reverseDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.reverseCooldown, "Map Swap", "Temporary Map Reversal."));
                    GameModifiersController.charges -= Config.reverseChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm funky") && !Plugin.cooldowns.GetCooldown("Funky") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.funkyChargeCost)
                {
                    //         GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Funky(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Funky", "Time to get Funky."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.funkyChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.funkyChargeCost)
                {
                    //           GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Funky(Config.funkyDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.funkyCooldown, "Funky", "Funky Mode Activated"));
                    GameModifiersController.charges -= Config.funkyChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }
            if (message.Message.ToLower().Contains("!gm rainbow") && !Plugin.cooldowns.GetCooldown("Rainbow") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.rainbowChargeCost)
                {
                    //          GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Rainbow(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Rainbow", "RAIIINBOWWS."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.rainbowChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.rainbowChargeCost)
                {
                    //          GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Rainbow(Config.rainbowDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.rainbowCooldown, "Rainbow", "Rainbow Activated"));
                    GameModifiersController.charges -= Config.rainbowChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }

            if (message.Message.ToLower().Contains("!gm bombs") && !Plugin.cooldowns.GetCooldown("Bombs") && GameModifiersController.commandsLeftForMessage > 0 && Config.bombsChance > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.bombsChargeCost)
                {
                    //               GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.RandomBombs(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Bombs", "Bombs Away!"));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.bombsChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.bombsChargeCost)
                {
                    //                GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.RandomBombs(Config.bombsDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.bombsCooldown, "Bombs", "Sneaking Bombs into the map."));
                    GameModifiersController.charges -= Config.bombsChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }
            if (message.Message.ToLower().Contains("!gm tunnel") && !Plugin.cooldowns.GetCooldown("Tunnel") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.trySuper && GameModifiersController.charges >= Config.chargesForSuperCharge + Config.tunnelChargeCost)
                {
                    //               GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Encasement(GameObjects.songAudio.clip.length));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(GameObjects.songAudio.clip.length, "Tunnel", "Entering Tunnel. Estimated time of exit: Unknown."));
                    GameModifiersController.trySuper = false;
                    GameModifiersController.charges -= Config.chargesForSuperCharge + Config.tunnelChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
                else if (GameModifiersController.charges >= Config.tunnelChargeCost)
                {
                    //                GameModifiersController.beepSound.Play();
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.Encasement(Config.tunnelDuration));
                    Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.tunnelCoolDown, "Tunnel", $"Entering Tunnel. Estimated time of exit: {Config.tunnelDuration} seconds."));
                    GameModifiersController.charges -= Config.tunnelChargeCost;
                    GameModifiersController.commandsLeftForMessage -= 1;
                    globalActive = true;
                }
            }
            if (message.Message.ToLower().Contains("!gm gametime") && !Plugin.cooldowns.GetCooldown("Map Swap") && GameModifiersController.commandsLeftForMessage > 0)
            {
                if (GameModifiersController.charges >= Config.gameTimeChargeCost)
                {
                    if (!Plugin.gameSaberPluginInstalled)
                    {
                        ChatMessageHandler.TryAsyncMessage("A compatible version of the GameSaber Plugin is required to use this command.");
                    }
                    else
                    {
                        Plugin.twitchPowers.StartCoroutine(TwitchPowers.GameTime(Config.gameTimeDuration));
                        Plugin.twitchPowers.StartCoroutine(TwitchPowers.CoolDown(Config.gameTimeCoolDown, "Map Swap", $"Game Starting, game will last {Config.gameTimeDuration} seconds. Better not Lose."));
                        GameModifiersController.charges -= Config.gameTimeChargeCost;
                        GameModifiersController.commandsLeftForMessage -= 1;
                        globalActive = true;
                    }
                    //                GameModifiersController.beepSound.Play();
                }
            }
        }