mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 00:38:14 +00:00
Add coins to a new player's bank - temporary workaround.
This commit is contained in:
@@ -41,7 +41,9 @@ public final class BinaryPlayerLoader implements PlayerLoader {
|
|||||||
public PlayerLoaderResponse loadPlayer(PlayerCredentials credentials) throws IOException {
|
public PlayerLoaderResponse loadPlayer(PlayerCredentials credentials) throws IOException {
|
||||||
File file = BinaryPlayerUtil.getFile(credentials.getUsername());
|
File file = BinaryPlayerUtil.getFile(credentials.getUsername());
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
return new PlayerLoaderResponse(LoginConstants.STATUS_OK, new Player(credentials, SPAWN_POSITION));
|
Player player = new Player(credentials, SPAWN_POSITION);
|
||||||
|
player.getBank().add(995, 25); // 25 coins
|
||||||
|
return new PlayerLoaderResponse(LoginConstants.STATUS_OK, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
try (DataInputStream in = new DataInputStream(new FileInputStream(file))) {
|
try (DataInputStream in = new DataInputStream(new FileInputStream(file))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user