Add EntitySpawnByEntityEvent
Nobody has claimed this yet.
- 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?
I'm currently making a roguelike plugin. I need to find out whether all the enemies are killed to accomplish a combat, so that's why I need to take those entities spawned by enemies into consideration (They should also be considered as enemies in this combat). So I wonder how can I find the entity who causes a spawn event.
Describe the solution you'd like.
Add EntitySpawnByEntityEvent which inherits EntitySpawnEvent
Describe alternatives you've considered.
- (EDIT:) Refactor
SpawnReasonto make it carry more context - Add a method
getWhoSpawn()inEntitySpawnEvent - Add a method
getWhoSpawn()inEntity
Other
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading EntitySpawnEvent and SpawnReason, then follow the spawn-event dispatch path to understand how the causing entity is represented. Done means a new EntitySpawnByEntityEvent is available with the requested inheritance and exposes the entity responsible for the spawn.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100