mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-11-14 05:03:33 +00:00
Add transaction freezing
This commit is contained in:
parent
8b692d1b11
commit
57853a37c5
@ -27,6 +27,7 @@ public class SimpleUserData implements UserData
|
||||
private boolean canInteract;
|
||||
private boolean caged;
|
||||
private long balance;
|
||||
private boolean transactionsFrozen;
|
||||
|
||||
public SimpleUserData(final Player player)
|
||||
{
|
||||
@ -44,7 +45,8 @@ public class SimpleUserData implements UserData
|
||||
final boolean frozen,
|
||||
final boolean canInteract,
|
||||
final boolean caged,
|
||||
final long balance)
|
||||
final long balance,
|
||||
final boolean transactionsFrozen)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.username = username;
|
||||
@ -55,6 +57,7 @@ public class SimpleUserData implements UserData
|
||||
this.canInteract = canInteract;
|
||||
this.caged = caged;
|
||||
this.balance = balance;
|
||||
this.transactionsFrozen = transactionsFrozen;
|
||||
}
|
||||
|
||||
public static SimpleUserData fromSQL(SQL sql, String uuid)
|
||||
@ -86,7 +89,8 @@ public class SimpleUserData implements UserData
|
||||
boolean canInteract = result.getBoolean("canInteract");
|
||||
boolean caged = result.getBoolean("caged");
|
||||
long balance = result.getLong("balance");
|
||||
return new SimpleUserData(u, username, user, group, playtime, frozen, canInteract, caged, balance);
|
||||
boolean transactionsFrozen = result.getBoolean("transactionsFrozen");
|
||||
return new SimpleUserData(u, username, user, group, playtime, frozen, canInteract, caged, balance, transactionsFrozen);
|
||||
}
|
||||
} catch (SQLException ex)
|
||||
{
|
||||
@ -202,6 +206,12 @@ public class SimpleUserData implements UserData
|
||||
this.caged = caged;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areTransactionsFrozen()
|
||||
{
|
||||
return this.transactionsFrozen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getBalance()
|
||||
{
|
||||
|
@ -2,6 +2,8 @@ package me.totalfreedom.economy;
|
||||
|
||||
public interface EconomicEntityData
|
||||
{
|
||||
boolean areTransactionsFrozen();
|
||||
|
||||
long getBalance();
|
||||
|
||||
void addToBalance(final long amount);
|
||||
|
Loading…
Reference in New Issue
Block a user