Package net.citizensnpcs.trait.shop
Class NPCShopAction.Transaction
java.lang.Object
net.citizensnpcs.trait.shop.NPCShopAction.Transaction
- Enclosing class:
NPCShopAction
-
Constructor Summary
ConstructorDescriptionTransaction
(Supplier<Boolean> isPossible, Runnable execute, Runnable rollback) -
Method Summary
Modifier and TypeMethodDescriptionstatic NPCShopAction.Transaction
static NPCShopAction.Transaction
compose
(NPCShopAction.Transaction... txn) static NPCShopAction.Transaction
static NPCShopAction.Transaction
fail()
boolean
void
rollback()
void
run()
static NPCShopAction.Transaction
success()
-
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
-