updates 🎱

This commit is contained in:
Paul Reilly
2023-05-30 17:39:54 -05:00
parent b95a06fa7c
commit def84bd747
63 changed files with 1469 additions and 1195 deletions

View File

@ -9,8 +9,8 @@ public class Fossil extends JavaPlugin
public void onEnable()
{
CommonsBase.getInstance()
.getRegistrations()
.getModuleRegistry()
.addModule(this);
.getRegistrations()
.getModuleRegistry()
.addModule(this);
}
}

View File

@ -7,9 +7,9 @@ import java.util.concurrent.atomic.AtomicLong;
public class SimpleTransaction implements Transaction
{
protected final AtomicLong balance;
private final EconomicEntity source;
private final EconomicEntity destination;
protected final AtomicLong balance;
public SimpleTransaction(final EconomicEntity source, final EconomicEntity destination, final long balance)
{

View File

@ -1,10 +1,10 @@
package me.totalfreedom.fossil.economy;
import me.totalfreedom.audience.MutableAudienceForwarder;
import me.totalfreedom.economy.TransactionResult;
import me.totalfreedom.economy.CompletedTransaction;
import me.totalfreedom.economy.TransactionLogger;
import me.totalfreedom.economy.EconomicEntity;
import me.totalfreedom.economy.TransactionLogger;
import me.totalfreedom.economy.TransactionResult;
import me.totalfreedom.utils.FreedomLogger;
import net.kyori.adventure.text.Component;
@ -24,17 +24,19 @@ public class SimpleTransactionLogger implements TransactionLogger
final EconomicEntity destination = completedTransaction.getDestination();
final long transactionAmount = completedTransaction.getBalance();
transactionLoggingStatementBuilder.append(resultSuccess ? "Successful" : "Unsuccessful")
.append(" (")
.append(resultMessage)
.append(") ")
.append(" transaction between ")
.append(source.getName())
.append(" ")
.append(destination.getName())
.append(" where the volume of currency transferred was $")
.append(transactionAmount)
.append(".");
transactionLoggingStatementBuilder.append(resultSuccess
? "Successful"
: "Unsuccessful")
.append(" (")
.append(resultMessage)
.append(") ")
.append(" transaction between ")
.append(source.getName())
.append(" ")
.append(destination.getName())
.append(" where the volume of currency transferred was $")
.append(transactionAmount)
.append(".");
final Component message = Component.text(transactionLoggingStatementBuilder.toString());

View File

@ -7,16 +7,21 @@ import net.kyori.adventure.text.format.NamedTextColor;
public class SimpleTransactionResult implements TransactionResult
{
public static final TransactionResult SUCCESSFUL = new SimpleTransactionResult("Successful transaction.", true);
public static final TransactionResult UNAUTHORIZED = new SimpleTransactionResult("Unauthorized transaction.", false);
public static final TransactionResult AMOUNT_TOO_SMALL = new SimpleTransactionResult("Transaction balance too small.", false);
public static final TransactionResult INSUFFICIENT_FUNDS = new SimpleTransactionResult("The source has an insufficient balance to carry out this transaction.", false);
public static final TransactionResult UNAUTHORIZED = new SimpleTransactionResult("Unauthorized transaction.",
false);
public static final TransactionResult AMOUNT_TOO_SMALL = new SimpleTransactionResult(
"Transaction balance too small.", false);
public static final TransactionResult INSUFFICIENT_FUNDS = new SimpleTransactionResult(
"The source has an insufficient balance to carry out this transaction.", false);
private final String message;
private final Component component;
private final boolean successful;
public SimpleTransactionResult(final String message, final boolean successful)
{
this(message, Component.text(message, successful ? NamedTextColor.GREEN : NamedTextColor.RED), successful);
this(message, Component.text(message, successful
? NamedTextColor.GREEN
: NamedTextColor.RED), successful);
}
public SimpleTransactionResult(final String message, final Component component, final boolean successful)

View File

@ -0,0 +1,5 @@
package me.totalfreedom.fossil.shop;
public class Shoppe
{
}

View File

@ -0,0 +1,11 @@
package me.totalfreedom.fossil.shop.menus;
import me.totalfreedom.display.AbstractMenu;
public final class MainMenu extends AbstractMenu
{
protected MainMenu(final int size)
{
super(size);
}
}