From 15ab2dbfd266ed73658447b375bd5ed891a4629c Mon Sep 17 00:00:00 2001 From: creatorfromhell Date: Sat, 2 Dec 2023 20:58:18 -0500 Subject: [PATCH] Fix bug with /setspawn writing incorrect values to data.yml --- .../phantomworlds/parameters/sub/SetSpawnCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/lokka30/phantomworlds/commands/phantomworlds/parameters/sub/SetSpawnCommand.java b/src/main/java/me/lokka30/phantomworlds/commands/phantomworlds/parameters/sub/SetSpawnCommand.java index 909a5dd..16ddf22 100644 --- a/src/main/java/me/lokka30/phantomworlds/commands/phantomworlds/parameters/sub/SetSpawnCommand.java +++ b/src/main/java/me/lokka30/phantomworlds/commands/phantomworlds/parameters/sub/SetSpawnCommand.java @@ -70,10 +70,10 @@ public static void onCommand(final BukkitCommandActor actor, Double x, Double y, if(PhantomWorlds.instance().data.getConfig().contains(cfgPath)) { //PhantomWorlds manages this world so let's set the spawn here for better accuracy. PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.x", finalX); - PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.y", finalX); - PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.z", finalX); - PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.yaw", finalX); - PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.pitch", finalX); + PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.y", finalY); + PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.z", finalZ); + PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.yaw", finalYaw); + PhantomWorlds.instance().data.getConfig().set(cfgPath + ".spawn.pitch", finalPitch); try { PhantomWorlds.instance().data.save();