mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-27 12:45:25 +01:00
Fixed possible NullPointer on bank save
This commit is contained in:
parent
e60c2f85d7
commit
f73ac5d5ba
@ -80,6 +80,10 @@ public class BankManager {
|
||||
}
|
||||
|
||||
public List<Transaction> getTransactionList(Player player) {
|
||||
return log.get(player.getUniqueId());
|
||||
return getTransactionList(player.getUniqueId());
|
||||
}
|
||||
|
||||
public List<Transaction> getTransactionList(UUID uuid) {
|
||||
return log.get(uuid);
|
||||
}
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ public class PlayerData {
|
||||
}
|
||||
|
||||
public void save() {
|
||||
transactions = BankManager.getInstance().getTransactionList(getPlayer());
|
||||
transactions = BankManager.getInstance().getTransactionList(getPlayerUUID());
|
||||
Config config = getConfig();
|
||||
FileConfiguration configLoad = config.getFileConfiguration();
|
||||
configLoad.set("Statistics.Island.Playtime", getPlaytime());
|
||||
@ -287,6 +287,10 @@ public class PlayerData {
|
||||
return Bukkit.getPlayer(uuid);
|
||||
}
|
||||
|
||||
public UUID getPlayerUUID() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public List<Transaction> getTransactions() {
|
||||
return transactions;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user