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

  • Added CoreProtectAction.ENTITY_SPAWN with action ID 13.
  • 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() returns null for entity actions.
  • containerLookup and inventoryLookup include tracked boat and minecart container transactions. InventoryResult continues to report these through the public container source.

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.

API rollback and restore methods return an empty result without performing any changes while a database purge is in progress.