forTransactionOf

public static EventPlayer forTransactionOf(TransactionalEntity<? extends Object, ? extends Object, ? extends Object> entity)

Creates a transactional EventPlayer for the given entity.

It is expected that the given entity is currently in a transaction. If this condition is not met, an IllegalStateException is thrown.

Return

new instance on EventPlayer

Parameters

entity

the entity for which to create the player

Throws

if the given entity is not currently in transaction

if the entity transaction does not support event playing