From b996bf3b4d50f73c1141a4f5963beb1725698fd8 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 19 Sep 2018 15:50:05 +0200 Subject: [PATCH] Fixed /goto and /gethere --- Server/Commands/Admin.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 1a16b7b8..6c88e92b 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -104,6 +104,8 @@ namespace reallife_gamemode.Server.Commands ChatService.PlayerNotFound(player); return; } + + player.Position = target.Position; } [Command("gotoxyz", "~m~Benutzung: ~s~/gotoxyz [X] [Y] [Z]")] @@ -118,6 +120,26 @@ namespace reallife_gamemode.Server.Commands player.Position = new Vector3(x, y, z); } + [Command("gethere", "~m~Benutzung: ~s~/goto [Name]")] + public void CmdAdminGethere(Client player, string name) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + Client target = ClientService.GetClientByName(name); + + if (target == null) + { + ChatService.PlayerNotFound(player); + return; + } + + target.Position = player.Position; + } + [Command("ipl", "~m~Benutzung: ~s~/ipl [Load / Remove] [Name]")] public void CmdAdminIpl(Client player, string option, string name) {