/setjob nur existierende jobs

This commit is contained in:
hydrant
2020-05-07 19:53:33 +02:00
parent 1f9027c1cd
commit b04ad523f6
2 changed files with 7 additions and 2 deletions

View File

@@ -1005,9 +1005,9 @@ namespace ReallifeGamemode.Server.Commands
ChatService.PlayerNotFound(player);
return;
}
if (JobID < 0)
if (JobManager.GetJob(JobID) == null)
{
ChatService.SendMessage(player, "~r~JobID kann nicht unter 0 sein");
ChatService.ErrorMessage(player, "Dieser job existiert nicht");
return;
}
using (var dbContext = new DatabaseContext())