Archiviert
13
0

Fix Arenaconfig Command
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2023-08-19 11:31:23 +02:00
Ursprung ae48985aa6
Commit 6d694ef558

Datei anzeigen

@ -28,7 +28,6 @@ import com.sk89q.worldedit.regions.RegionSelector;
import de.steamwar.command.SWCommand;
import de.steamwar.teamserver.Builder;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
@ -59,16 +58,12 @@ public class ArenaconfigCommand extends SWCommand {
YamlConfiguration config = YamlConfiguration.loadConfiguration(file);
config.set("UnderBorder", lowerPlayerBorder);
ConfigurationSection blueCorner = config.getConfigurationSection("BlueCorner");
blueCorner.set("x", pos1.getX());
blueCorner.set("y", pos1.getY());
blueCorner.set("z", pos1.getZ());
ConfigurationSection blueToRed = config.getConfigurationSection("BlueToRed");
blueToRed.set("x", pos2.getX() - pos1.getX());
blueToRed.set("y", pos2.getY() - pos1.getY());
blueToRed.set("z", pos2.getZ() - pos1.getZ());
config.set("BlueCorner.x", pos1.getX());
config.set("BlueCorner.y", pos1.getY());
config.set("BlueCorner.z", pos1.getZ());
config.set("BlueToRed.x", pos2.getX() - pos1.getX());
config.set("BlueToRed.y", pos2.getY() - pos1.getY());
config.set("BlueToRed.z", pos2.getZ() - pos1.getZ());
config.save(file);
}