Search in sources :

Example 1 with PlayerInventoryTransaction

use of org.spongepowered.common.event.tracking.context.transaction.inventory.PlayerInventoryTransaction in project SpongeCommon by SpongePowered.

the class TransactionSink method logPlayerInventoryChangeWithEffect.

default EffectTransactor logPlayerInventoryChangeWithEffect(final Player player, final PlayerInventoryTransaction.EventCreator eventCreator) {
    final PlayerInventoryTransaction transaction = new PlayerInventoryTransaction(player, eventCreator);
    this.logTransaction(transaction);
    return this.pushEffect(new ResultingTransactionBySideEffect(InventoryEffect.getInstance()));
}
Also used : PlayerInventoryTransaction(org.spongepowered.common.event.tracking.context.transaction.inventory.PlayerInventoryTransaction) DropFromPlayerInventoryTransaction(org.spongepowered.common.event.tracking.context.transaction.inventory.DropFromPlayerInventoryTransaction)

Example 2 with PlayerInventoryTransaction

use of org.spongepowered.common.event.tracking.context.transaction.inventory.PlayerInventoryTransaction in project SpongeCommon by SpongePowered.

the class TransactionSink method logPlayerInventoryChange.

default void logPlayerInventoryChange(final Player player, final PlayerInventoryTransaction.EventCreator eventCreator) {
    final PlayerInventoryTransaction transaction = new PlayerInventoryTransaction(player, eventCreator);
    this.logTransaction(transaction);
}
Also used : PlayerInventoryTransaction(org.spongepowered.common.event.tracking.context.transaction.inventory.PlayerInventoryTransaction) DropFromPlayerInventoryTransaction(org.spongepowered.common.event.tracking.context.transaction.inventory.DropFromPlayerInventoryTransaction)

Aggregations

DropFromPlayerInventoryTransaction (org.spongepowered.common.event.tracking.context.transaction.inventory.DropFromPlayerInventoryTransaction)2 PlayerInventoryTransaction (org.spongepowered.common.event.tracking.context.transaction.inventory.PlayerInventoryTransaction)2