World#getSpawnLocation() returns a Location without an angle

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • This server is running CraftBukkit version 3485-Spigot-b6d12d1-2ac7fa7 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
    • Yes

      World#getSpawnLocation returns a Location without the spawn angle:

      @Override
      public Location getSpawnLocation() {
          BlockPosition spawn = world.getSharedSpawnPos();
          return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ());
      }
      

      As far as I can tell there's no other way to access the spawn angle.

      Should be fixed like so:

      @Override
      public Location getSpawnLocation() {
          BlockPosition spawn = world.getSharedSpawnPos();
          return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ(), world.getSharedSpawnAngle(), 0.0F);
      }
      

       

       

            Assignee:
            Doc
            Reporter:
            Henry Le Grys
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: