Add financial transaction classes

This commit is contained in:
Allink
2023-05-20 04:57:19 +01:00
parent 2f18e4d8ef
commit 8b692d1b11
6 changed files with 164 additions and 0 deletions

View File

@ -0,0 +1,8 @@
package me.totalfreedom.economy;
public interface CompletedTransaction
{
Transaction getTransaction();
TransactionResult getResult();
}

View File

@ -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);
}

View File

@ -0,0 +1,12 @@
package me.totalfreedom.economy;
import net.kyori.adventure.text.Component;
public interface TransactionResult
{
String getMessage();
boolean isSuccessful();
Component getComponent();
}