From 897ee54bc1bbe6c105527759b7a9ab2be986aca8 Mon Sep 17 00:00:00 2001 From: xSprite Date: Mon, 15 Oct 2018 22:03:15 +0200 Subject: [PATCH] Add /gotohelp --- Server/Commands/Admin.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 30c34f08..d1734a27 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -201,6 +201,24 @@ namespace reallife_gamemode.Server.Commands player.MovePosition(new Vector3(p.X, p.Y, p.Z), 0); } } + [Command("gotohelp", "~m~Benutzung: ~s~/gotohelp")] + public void CmdAdminGotolist(Client player) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + using (var dbContext = new DatabaseContext()) + { + player.SendChatMessage("~m~__________ ~s~Goto ~m~__________"); + foreach (Entities.GotoPoint f in dbContext.GotoPoints) + { + player.SendChatMessage("/goto "+f.Description+""); + } + } + } [Command("gotox", "~m~Benutzung: ~s~/gotox [X] [Y] [Z]")] public void CmdAdminGotoxyz(Client player, float x, float y, float z)