Fixed /goto and /gethere

This commit is contained in:
hydrant
2018-09-19 15:50:05 +02:00
parent 5a816c4201
commit b996bf3b4d

View File

@@ -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)
{