From 13e1610f6180246cd05099e9e2e92ad6ddd4223c Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 19 Aug 2023 11:12:22 +0200 Subject: [PATCH] Move Spawnoffset to GameMode config Signed-off-by: Lixfel --- FightSystem_Core/src/config.yml | 10 +++++----- .../src/de/steamwar/fightsystem/Config.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/FightSystem_Core/src/config.yml b/FightSystem_Core/src/config.yml index 350f6df..e2fffe4 100644 --- a/FightSystem_Core/src/config.yml +++ b/FightSystem_Core/src/config.yml @@ -37,6 +37,11 @@ Arena: Schem2Border: x: 24 # defaults to 24 if missing z: 24 # defaults to 24 if missing + # The offset the teams spawn relative to the center of their area + SpawnOffset: + x: 0 # defaults to 0 if missing + y: 0 # defaults to Schematic.Size.y if missing + z: 0 # defaults to 0 if missing # The size of the team areas are expanded around the schematics BorderFromSchematic: 12 # defaults to 12 if missing # If ground walkable, teams can walk below the lower arena border during setup @@ -165,8 +170,3 @@ Techhider: # x: 0 # defaults to 0 if missing # y: 0 # defaults to 0 if missing # z: 0 # defaults to Schematic.Size.z + 50 if missing -# # The offset the teams spawn relative to the center of their area -# SpawnOffset: -# x: 0 # defaults to 0 if missing -# y: 0 # defaults to Schematic.Size.y if missing -# z: 0 # defaults to 0 if missing diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/Config.java b/FightSystem_Core/src/de/steamwar/fightsystem/Config.java index 2632f0b..9b8bf6d 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/Config.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/Config.java @@ -227,9 +227,9 @@ public class Config { BlueToRedX = worldconfig.getInt("BlueToRed.x", 0); BlueToRedY = worldconfig.getInt("BlueToRed.y", 0); BlueToRedZ = worldconfig.getInt("BlueToRed.z", schemsizeZ + 50); - double teamBlueSpawnOffsetX = worldconfig.getDouble("SpawnOffset.x", 0); - double teamBlueSpawnOffsetY = worldconfig.getDouble("SpawnOffset.y", schemsizeY); - double teamBlueSpawnOffsetZ = worldconfig.getDouble("SpawnOffset.z", 0); + double teamBlueSpawnOffsetX = config.getDouble("Arena.SpawnOffset.x", 0); + double teamBlueSpawnOffsetY = config.getDouble("Arena.SpawnOffset.y", schemsizeY); + double teamBlueSpawnOffsetZ = config.getDouble("Arena.SpawnOffset.z", 0); int teamRedCornerX = BlueToRedX + blueCornerX; int teamRedCornerY = BlueToRedY + blueCornerY;