IntellectualSites / IntellectualSites/PlotSquared

Vehicle Create Admin Permission

Open
#2,970 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Enhancement Good first issue
Dominant language
Java
Stars
653
Forks
975
Avg merge
2m
Merged PRs (30d)
6

Description

PlotSquared Feature Suggestion:
Adding a permission like plots.admin.vehicle.other to allow vehicles to be placed on other plots (and roads)

How should it be implemented?
In the VehicleCreateEvent don't remove the vehicle, "if the permission is set".
The problem is that the VehicleCreateEvent cannot return the player placing it, specifically because things like Dispensers/Droppers can also place Vehicles.
This means we'd need to capture PlayerInteractEvents or PlayerBlockPlace Events and flag vehicles there (e.g. the vehicle has a unique id, this could be added into a hashmap which is then compared against in the VehicleCreateEvent).

Additional context

Checklist:

  • I made sure there are no duplicates of my suggestion (Use search)
  • I made sure my suggestion does not exist yet (Check the wiki)
  • I made sure my suggestion is useful for the majority of PlotSquared users

I'm not 100% sure about the third check, it's mostly for "fun" (e.g. riding a minecart on users roller coasters), but it's not like having a negative impact on anyone etc

Edit: I think my analysis was wrong, shouldn't vehicle creates be covered by interact.other permissions already?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing VehicleCreateEvent handling and the existing interact.other permission behavior. Review PlayerInteractEvents and PlayerBlockPlaceEvents to determine how a vehicle's placer could be associated with the creation event, including dispenser and dropper cases. Done means the proposed permission behavior is defined and covered for vehicles on other plots and roads without breaking existing protection.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.