mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-11-22 16:55:01 +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 canInteract;
|
||||||
private boolean caged;
|
private boolean caged;
|
||||||
private long balance;
|
private long balance;
|
||||||
|
private boolean transactionsFrozen;
|
||||||
|
|
||||||
public SimpleUserData(final Player player)
|
public SimpleUserData(final Player player)
|
||||||
{
|
{
|
||||||
@ -44,7 +45,8 @@ public class SimpleUserData implements UserData
|
|||||||
final boolean frozen,
|
final boolean frozen,
|
||||||
final boolean canInteract,
|
final boolean canInteract,
|
||||||
final boolean caged,
|
final boolean caged,
|
||||||
final long balance)
|
final long balance,
|
||||||
|
final boolean transactionsFrozen)
|
||||||
{
|
{
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
@ -55,6 +57,7 @@ public class SimpleUserData implements UserData
|
|||||||
this.canInteract = canInteract;
|
this.canInteract = canInteract;
|
||||||
this.caged = caged;
|
this.caged = caged;
|
||||||
this.balance = balance;
|
this.balance = balance;
|
||||||
|
this.transactionsFrozen = transactionsFrozen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SimpleUserData fromSQL(SQL sql, String uuid)
|
public static SimpleUserData fromSQL(SQL sql, String uuid)
|
||||||
@ -86,7 +89,8 @@ public class SimpleUserData implements UserData
|
|||||||
boolean canInteract = result.getBoolean("canInteract");
|
boolean canInteract = result.getBoolean("canInteract");
|
||||||
boolean caged = result.getBoolean("caged");
|
boolean caged = result.getBoolean("caged");
|
||||||
long balance = result.getLong("balance");
|
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)
|
} catch (SQLException ex)
|
||||||
{
|
{
|
||||||
@ -202,6 +206,12 @@ public class SimpleUserData implements UserData
|
|||||||
this.caged = caged;
|
this.caged = caged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean areTransactionsFrozen()
|
||||||
|
{
|
||||||
|
return this.transactionsFrozen;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getBalance()
|
public long getBalance()
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,8 @@ package me.totalfreedom.economy;
|
|||||||
|
|
||||||
public interface EconomicEntityData
|
public interface EconomicEntityData
|
||||||
{
|
{
|
||||||
|
boolean areTransactionsFrozen();
|
||||||
|
|
||||||
long getBalance();
|
long getBalance();
|
||||||
|
|
||||||
void addToBalance(final long amount);
|
void addToBalance(final long amount);
|
||||||
|
Loading…
Reference in New Issue
Block a user