Skip to content

Commit

Permalink
Fix bug with /setspawn writing incorrect values to data.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorfromhell committed Dec 3, 2023
1 parent 0dd853a commit 15ab2db
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 15ab2db

Please sign in to comment.