Skip to main content

Entity API

Paper provides comprehensive APIs for entity management, customization, and AI control.

Entity Basics

Spawning Entities

Entity Properties

Entity Movement

Living Entities

Health and Attributes

Potion Effects

Equipment

Mob AI

Paper AI API

Paper provides enhanced AI control:

Targeting

Specific Entity Types

Zombies

Creepers

Villagers

Armor Stands

Item Frames

Minecarts

Entity Metadata

Store custom data on entities:

Entity Tracking

Control which players can see entities:

Entity Removal

Best Practices

Use world.spawn(location, Class, Consumer) to configure entities atomically before they’re spawned.
Always check if an entity is a specific type before casting: if (entity instanceof Zombie zombie)
Entities with setAI(false) or setAware(false) won’t move or react to players.

Next Steps

Events API

Handle entity events

World API

World and environment control