mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2025-06-26 19:44:27 +00:00
updates 🎱
This commit is contained in:
@ -9,8 +9,8 @@ public class Fossil extends JavaPlugin
|
||||
public void onEnable()
|
||||
{
|
||||
CommonsBase.getInstance()
|
||||
.getRegistrations()
|
||||
.getModuleRegistry()
|
||||
.addModule(this);
|
||||
.getRegistrations()
|
||||
.getModuleRegistry()
|
||||
.addModule(this);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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)
|
||||
|
@ -0,0 +1,5 @@
|
||||
package me.totalfreedom.fossil.shop;
|
||||
|
||||
public class Shoppe
|
||||
{
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user