Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4608

MapMeta API could be more concrete

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • -
    • Yes

      Reported from https://bugs.mojang.com/browse/MC-142138 :

      The problem is that `MapMeta.setMapId` might not behave as expected when you provide an ID which is not assigned yet. The game then uses the next available ID.
      Therefore it would be good to either

      • include that in the documentation of the method
      • prevent the method from accepting unassigned IDs (throw exception)
      • remove the method and provide a `setMapView(MapView)` method instead, since this is the common use case

      The last suggestions are more restrictive and I do not know if there are use cases which require using unassigned IDs.
      However without any of this, users like the reporter of MC-142138 might repeatedly use unassigned IDs which the game won't reach very soon (e.g. negative ones) resulting in performance decrease and a possible server crash in the end.

            Unassigned Unassigned
            md_5 md_5
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: