[SPIGOT-4608] MapMeta API could be more concrete Created: 05/Feb/19  Updated: 05/Feb/19  Resolved: 05/Feb/19

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: md_5 Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Version: -
Guidelines Read: Yes

 Description   

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.


Generated at Sat Dec 13 15:19:48 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.