-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.Request for a new Feature.
Description
Is your feature request related to a problem?
I'm trying to modify the entities which can be spawned by players, according to certain player bound criteria, for example some nbt data of the item that was used to spawn the entity, or the level of the player.
Describe the solution you'd like.
A generic event which covers all the entities that can be spawned by a player using an item. More specifically:
- All SpawnEggs
- Both ItemFrame variants
- All fish buckets
- Axolotl Bucket
- Armorstand
- Painting
I would also find the following methods very useful:
- getItemStack() → The ItemStack used to spawn the entity
- getEntity() → The Entity being spawned
- getPlayer() → The Player who spawned the entity
- getSpawnReason() → The SpawnReason, to more easily differentiate without necessarily checking the itemstack
Describe alternatives you've considered.
Listening to the player interact event, and either cancelling it, and spawning the entity myself, or trying to match it to the next entity spawn event. Both ways aren't ideal in my opinion.
Other
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.Request for a new Feature.