API Version 13
API version 13 adds entity-spawn lookup support while retaining all API version 12 methods.
| API Details | |
|---|---|
| API Version: | 13 |
| Plugin Version: | v25.0+ |
| Maven: | maven.playpro.com |
Upgrading from API v12
LookupOptionssupports material inclusion/exclusion filters for typed container, item, and inventory lookups, andusers(List<String>)/excludeUsers(List<String>)filters for all typed lookups.LookupOptionssupportscontainerActions(List<ContainerAction>),itemActions(List<ItemAction>), andinventoryActions(List<InventoryAction>)to select events returned bycontainerLookup,itemLookup, andinventoryLookup, respectively. Each filter only affects its corresponding lookup. Select multiple actions to match any of them, or omit the filter or pass an empty list to keep the default results.- Added
CoreProtectAction.ENTITY_SPAWNwith action ID13. - Added
CoreProtectPreLogEvent.Action.ENTITY_SPAWN. BlockResult#getEntityType()recognizes entity-spawn results.ParseResult#getEntityType()provides the entity type for legacy entity-kill and entity-spawn result rows.ParseResult#getBlockData()returnsnullfor entity actions.containerLookupandinventoryLookupinclude tracked boat and minecart container transactions.InventoryResultcontinues to report these through the publiccontainersource.
Entity-spawn records are available through normal lookup, rollback, and restore methods by including CoreProtectAction.ENTITY_SPAWN.id() in the action list. For backwards compatibility, a null or empty action list passed to the legacy API methods remains limited to block breaks and placements; command rollbacks and restores with no action filter include entity spawns when rollback-entities is enabled.
Radius lookups match entity spawns at either their original spawn location or their tracked current/final location. Whole-world lookups likewise match either the original or tracked current/final world, while rollback and restore selection uses the tracked current/final world.
Command filters present boats and minecarts as block changes: a:+block includes placements, a:-block includes destruction, and a:block includes both. The corresponding a:spawn and a:kill filters exclude those aliased vehicle records. This is a command and display alias only; API results and action lists continue to identify the rows as CoreProtectAction.ENTITY_SPAWN (action ID 13) and CoreProtectAction.ENTITY_KILL (action ID 3).
Entity-container location filters match either the transaction's immutable original location or the entity's persisted current/final location, and typed results expose the persisted current/final location. The persisted position is checkpointed when a transaction is logged and during relevant entity lifecycle changes; the synchronous typed APIs do not schedule blocking live-entity scans.
To find items deposited into containers, use containerActions(List.of(ContainerAction.ADD)). For inventory lookups, select InventoryAction.CONTAINER_ADD for deposits or InventoryAction.BLOCK_PLACE for block placement. Container filters also cover tracked boat and minecart transactions.
For example, itemActions(List.of(ItemAction.DROP, ItemAction.PICKUP)) selects dropped and picked-up items. To query ItemAction.BREAK, DESTROY, CREATE, SELL, or BUY, select them explicitly with itemActions; these events are not included by default.
API rollback and restore methods return an empty result without performing any changes while a database purge is in progress.