Skip to content

Event Request: MapCreateEvent #9073

Closed
Closed

Description

@ZepsiZola

Is your feature request related to a problem?

I wanted to implement something in a plugin that would basically stop the player from creating a map in a certain area if they didn't have permission to do so. I thought "this should be simple, just cancel the MapCreate event, right?", but I found that there is actually no event like that. This means that I would have to go the complicated route by canceling the PlayerInteractEvent, and before that, I would need to do a lot of filtering to make sure that the PlayerInteractEvent is the player creating a map and not the player opening a chest, for example. I also thought canceling the MapInitialiseEvent would work, but apparently, the MapInitialiseEvent is called every time the map is opened and not just when it is created. So this means there is no event in the Bukkit, Spigot, and Paper API that deals specifically with a player initially creating a map.

Describe the solution you'd like.

Can a new event be implemented. Something like "MapCreateEvent", to allow devs to manipulate the way players interact with maps in a simple manner.

Describe alternatives you've considered.

Discussed in the first paragraph...

Other

No response

Activity

  1. added
    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.
    and removed on May 6, 2023
  2. linked a pull request that will close this issueadd PlayerCreateMapEvent #9179on May 6, 2023
  3. locked and limited conversation to collaborators on Apr 28, 2024
  4. converted this issue into a discussion #10569 on Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions