mirror of
https://github.com/SimplexDevelopment/FreedomNetworkSuite.git
synced 2024-11-25 10:05:01 +00:00
Merge pull request #6 from AtlasMediaGroup/videos-stupid-contributions
Removes old unused UserData methods
This commit is contained in:
commit
ef3acca330
@ -26,9 +26,7 @@ public class SimpleUserData implements UserData
|
||||
private final UserDataUpdateEvent event = new UserDataUpdateEvent(this);
|
||||
private Group group;
|
||||
private long playtime;
|
||||
private boolean frozen;
|
||||
private boolean canInteract;
|
||||
private boolean caged;
|
||||
private AtomicLong balance;
|
||||
private boolean transactionsFrozen;
|
||||
|
||||
@ -49,9 +47,7 @@ public class SimpleUserData implements UserData
|
||||
final User user,
|
||||
final Group group,
|
||||
final long playtime,
|
||||
final boolean frozen,
|
||||
final boolean canInteract,
|
||||
final boolean caged,
|
||||
final long balance,
|
||||
final boolean transactionsFrozen)
|
||||
{
|
||||
@ -60,9 +56,7 @@ public class SimpleUserData implements UserData
|
||||
this.user = user;
|
||||
this.group = group;
|
||||
this.playtime = playtime;
|
||||
this.frozen = frozen;
|
||||
this.canInteract = canInteract;
|
||||
this.caged = caged;
|
||||
this.balance = new AtomicLong(balance);
|
||||
this.transactionsFrozen = transactionsFrozen;
|
||||
}
|
||||
@ -84,8 +78,7 @@ public class SimpleUserData implements UserData
|
||||
final Player player = Bukkit.getPlayer(u);
|
||||
|
||||
if (player == null)
|
||||
throw new IllegalStateException(
|
||||
"Player should be online but they are not!");
|
||||
throw new IllegalStateException("Player should be online but they are not!");
|
||||
|
||||
final User user = new FreedomUser(player);
|
||||
final Group group = CommonsBase.getInstance()
|
||||
@ -94,15 +87,12 @@ public class SimpleUserData implements UserData
|
||||
.getGroup(g);
|
||||
|
||||
final long playtime = result.getLong("playtime");
|
||||
final boolean frozen = result.getBoolean("frozen");
|
||||
final boolean canInteract = result.getBoolean("canInteract");
|
||||
final boolean caged = result.getBoolean("caged");
|
||||
final long balance = result.getLong("balance");
|
||||
final boolean transactionsFrozen = result.getBoolean(
|
||||
"transactionsFrozen");
|
||||
return new SimpleUserData(u, username, user, group, playtime, frozen,
|
||||
canInteract, caged, balance,
|
||||
transactionsFrozen);
|
||||
final boolean transactionsFrozen = result.getBoolean("transactionsFrozen");
|
||||
|
||||
return new SimpleUserData(u, username, user, group, playtime,
|
||||
canInteract, balance, transactionsFrozen);
|
||||
}
|
||||
}
|
||||
catch (SQLException ex)
|
||||
@ -121,8 +111,8 @@ public class SimpleUserData implements UserData
|
||||
}
|
||||
|
||||
final Player player = Bukkit.getPlayer(UUID.fromString(uuid));
|
||||
if (player == null) throw new IllegalStateException(
|
||||
"Player should be online but they are not!");
|
||||
if (player == null) throw new IllegalStateException("Player should be online but they are not!");
|
||||
|
||||
return new SimpleUserData(player);
|
||||
}, CommonsBase.getInstance()
|
||||
.getExecutor()
|
||||
@ -188,19 +178,6 @@ public class SimpleUserData implements UserData
|
||||
this.playtime = 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFrozen()
|
||||
{
|
||||
return frozen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrozen(final boolean frozen)
|
||||
{
|
||||
event.ping();
|
||||
this.frozen = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteract()
|
||||
{
|
||||
@ -214,19 +191,6 @@ public class SimpleUserData implements UserData
|
||||
this.canInteract = canInteract;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCaged()
|
||||
{
|
||||
return caged;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCaged(final boolean caged)
|
||||
{
|
||||
event.ping();
|
||||
this.caged = caged;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areTransactionsFrozen()
|
||||
{
|
||||
|
@ -34,8 +34,4 @@ public interface UserData extends EconomicEntityData
|
||||
boolean canInteract();
|
||||
|
||||
void setInteractionState(boolean canInteract);
|
||||
|
||||
boolean isCaged();
|
||||
|
||||
void setCaged(boolean caged);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user