From 50f29aef28c287af7eeeea8abbc577a15939e35e Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 27 Apr 2021 18:51:53 +0200 Subject: [PATCH] befehl spawnschutz zapzerap --- .../Commands/AdminCommands.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index d312239c..9216e766 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -545,6 +545,27 @@ namespace ReallifeGamemode.Server.Commands #region Admin + [Command("remspawnschutz", "~m~Benutzung: ~s~/rmss [Target]")] + public void CmdAdminRmss(Player player, String targetname) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + Player target = PlayerService.GetPlayerByNameOrId(targetname); + + if (target == null || !target.IsLoggedIn()) + { + ChatService.PlayerNotFound(player); + return; + } + + target.TriggerEvent("abortSpawnschutz"); + + } + [Command("countdown", "~m~Benutzung: ~s~/countdown [Zeit] [Text]", GreedyArg = true)] public void CmdAdminCountdown(Player player, string timer_string, string text) {