diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 297a2ada..532264f9 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -3528,6 +3528,44 @@ namespace ReallifeGamemode.Server.Commands ChatService.SendMessage(player, "~b~[ADMIN]~s~ Die Hanfpflanzen wurden erfolgreich neugeladen."); } + [Command("hanfinfo", "~m~Benutzung:~s~ /hanfinfo")] + public void CmdAdminHanfInfo(Player player) + { + if (!player.GetUser().IsAdmin(AdminLevel.HEADADMIN)) + { + ChatService.NotAuthorized(player); + return; + } + + string str = string.Join(", ", HanfManager.HanfNpcs.Select(h => + { + return $"~b~#{h.Id}~s~ ({h.Type}): ~g~{h.Price.ToMoneyString()}~s~"; + })); + + ChatService.SendMessage(player, "~b~[ADMIN]~s~ " + str); + } + + [Command("tohanfnpc", "~m~Benutzung:~s~ /tohanfnpc", Alias = "thn")] + public void CmdAdminToHanfNpc(Player player, int id) + { + if (!player.GetUser().IsAdmin(AdminLevel.HEADADMIN)) + { + ChatService.NotAuthorized(player); + return; + } + + HanfNpc hanfNpc = HanfManager.GetHanfNpcFromId(id); + if (hanfNpc == null) + { + ChatService.ErrorMessage(player, "Dieses Hanf-NPC existiert nicht"); + return; + } + + player.Position = hanfNpc.Position; + ChatService.SendMessage(player, $"~b~[ADMIN]~s~ Du hast dich zu Hanf-NPC ~b~#{id}~s~ teleportiert"); + logger.LogInformation("Admin {0} teleported to hanf npc {1}", player.Name, id); + } + //[Command("house", "~m~Benutzung: ~s~/house [add / remove / price / type / reloadhouses]", GreedyArg = true)] //public void CmdAdminHouse(Player player, string option1 = null, string option2 = null) //{