diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index def49e59..132eaa23 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -56,13 +56,18 @@ namespace ReallifeGamemode.Server.Commands { return; } + + uint dimension = player.Dimension; + PositionManager.eventportDimension = dimension; + Vector3 position = player.Position; - PositionManager.eventportPosition = position; + PositionManager.eventportPosition = player.Position; + PositionManager.eventportActive = true; player.SendChatMessage("~y~Du hast hier erfolgreich einen Eventport gesetzt."); - ChatService.BroadcastAdmin($"~y~[EVENTPORT] ~s~{player.Name} hat den Eventport aktiviert.", AdminLevel.ADMIN); - logger.LogInformation("Admin {0} created the eventport at x: {1}, y: {2}, z: {3}", player.Name, position.X, position.Y, position.Z); + ChatService.BroadcastAdmin($"~y~[EVENTPORT] ~s~{player.Name} hat den Eventport aktiviert (Dimension: {dimension}).", AdminLevel.ADMIN); + logger.LogInformation("Admin {0} created the eventport at x: {1}, y: {2}, z: {3} in dimension {4}", player.Name, position.X, position.Y, position.Z, dimension); return; } @@ -105,6 +110,7 @@ namespace ReallifeGamemode.Server.Commands logger.LogInformation("Player {0} used the eventport to x: {1}, y: {2}, z: {3}", player.Name, currentEventport.X, currentEventport.Y, currentEventport.Z); player.SafeTeleport(teleportPosition); + player.Dimension = PositionManager.eventportDimension; player.SendChatMessage("~y~[EVENTPORT] ~s~Du hast dich zum Event teleportiert"); } diff --git a/ReallifeGamemode.Server/Managers/PositionManager.cs b/ReallifeGamemode.Server/Managers/PositionManager.cs index 63fb7e9d..6ad6f00f 100644 --- a/ReallifeGamemode.Server/Managers/PositionManager.cs +++ b/ReallifeGamemode.Server/Managers/PositionManager.cs @@ -42,6 +42,7 @@ namespace ReallifeGamemode.Server.Managers public static List jailPoints = new List(); public static Vector3 eventportPosition; + public static uint eventportDimension; public static bool eventportActive = false; public static void LoadPositionManager()