Package net.citizensnpcs.trait.shop
Class NPCShopAction.Transaction
java.lang.Object
net.citizensnpcs.trait.shop.NPCShopAction.Transaction
- Enclosing class:
NPCShopAction
-
Constructor Summary
ConstructorsConstructorDescriptionTransaction(Supplier<Boolean> isPossible, Runnable execute, Runnable rollback) -
Method Summary
Modifier and TypeMethodDescriptionstatic NPCShopAction.Transactionstatic NPCShopAction.Transactioncompose(NPCShopAction.Transaction... txn) static NPCShopAction.Transactionstatic NPCShopAction.Transactionfail()booleanvoidrollback()voidrun()static NPCShopAction.Transactionsuccess()
-
Constructor Details
-
Transaction
-
-
Method Details
-
isPossible
public boolean isPossible() -
rollback
public void rollback() -
run
public void run() -
compose
-
compose
-
create
public static NPCShopAction.Transaction create(Supplier<Boolean> isPossible, Runnable execute, Runnable rollback) -
fail
-
success
-