mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2025-06-26 19:44:27 +00:00
Add financial transaction classes
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
package me.totalfreedom.economy;
|
||||
|
||||
public interface CompletedTransaction
|
||||
{
|
||||
Transaction getTransaction();
|
||||
|
||||
TransactionResult getResult();
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package me.totalfreedom.economy;
|
||||
|
||||
public interface Transaction
|
||||
{
|
||||
Transaction copy();
|
||||
|
||||
EconomicEntity getSource();
|
||||
|
||||
EconomicEntity getDestination();
|
||||
|
||||
long getTransferAmount();
|
||||
|
||||
long addBalance(final long amount);
|
||||
|
||||
long removeBalance(final long amount);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package me.totalfreedom.economy;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
public interface TransactionResult
|
||||
{
|
||||
String getMessage();
|
||||
|
||||
boolean isSuccessful();
|
||||
|
||||
Component getComponent();
|
||||
}
|
Reference in New Issue
Block a user