mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 11:26:07 +00:00
make sure towerData is not null (#1240)
* make sure towerData is not null * Update Player.java * add notice
This commit is contained in:
parent
ef9d96b6d8
commit
7126b1569e
@ -191,6 +191,7 @@ public class Player {
|
||||
this.nameCardList = new HashSet<>();
|
||||
this.flyCloakList = new HashSet<>();
|
||||
this.costumeList = new HashSet<>();
|
||||
this.towerData = new TowerData();
|
||||
this.unlockedForgingBlueprints = new HashSet<>();
|
||||
this.activeForges = new ArrayList<>();
|
||||
|
||||
@ -483,6 +484,10 @@ public class Player {
|
||||
}
|
||||
|
||||
public TowerData getTowerData() {
|
||||
if(towerData==null){
|
||||
// because of mistake, null may be saved as storage at some machine, this if can be removed in future
|
||||
towerData = new TowerData();
|
||||
}
|
||||
return towerData;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user