PaperMC / PaperMC/Paper

Add SpearChargeDismountEvent

Open
#13,883 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: needs triage
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Is your feature request related to a problem?

When the attack event caused by SpearCharge is cancelled, the entity will still dismount from boat and minecart.
https://github.com/PaperMC/Paper/issues/13583

Many players trap various mobs inside minecarts and boats for display purposes, and some mob farms also rely on this mechanic. However, SpearCharge can now bypass protection in these areas; while it cannot deal damage to the mobs, it is able to force them to dismount.

Describe the solution you'd like.

Added SpearChargeDismountEvent, which provides access to the SpearCharge attacker. Region protection plugins can perform fine-grained permission checks to allow or prevent the dismount event

Describe alternatives you've considered.

Or make EntityDismountEvent able to capture the attacker, if an attacker exists.

Other

No response

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 reading related issue #13583 and reviewing the existing SpearCharge attack handling and EntityDismountEvent API. Determine where a cancellable SpearCharge-specific dismount event would fit and how the attacker is exposed; done means protection plugins can distinguish and allow or prevent these dismounts.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.