Archiviert
13
0

Merge pull request 'Fix Arenaconfig Command' (#3) from arenaconfig into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #3
Dieser Commit ist enthalten in:
Lixfel 2023-08-19 11:50:57 +02:00
Commit d59e1c96a4

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);
}