Fix Issue #16
This commit is contained in:
parent
e7af45f34b
commit
16a581f397
@ -68,6 +68,8 @@ public class TransactionsStore
|
|||||||
|
|
||||||
File file = new File(this.dataFilePath);
|
File file = new File(this.dataFilePath);
|
||||||
|
|
||||||
|
if(file.exists())
|
||||||
|
{
|
||||||
FileConfiguration config = YamlConfiguration.loadConfiguration(file);
|
FileConfiguration config = YamlConfiguration.loadConfiguration(file);
|
||||||
try {
|
try {
|
||||||
RealEstate.instance.addLogEntry(new String(Files.readAllBytes(FileSystems.getDefault().getPath(this.dataFilePath))));
|
RealEstate.instance.addLogEntry(new String(Files.readAllBytes(FileSystems.getDefault().getPath(this.dataFilePath))));
|
||||||
@ -89,18 +91,23 @@ public class TransactionsStore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(rent != null)
|
if(rent != null)
|
||||||
|
{
|
||||||
for(String key : rent.getKeys(false))
|
for(String key : rent.getKeys(false))
|
||||||
{
|
{
|
||||||
ClaimRent cr = (ClaimRent)rent.get(key);
|
ClaimRent cr = (ClaimRent)rent.get(key);
|
||||||
claimRent.put(key, cr);
|
claimRent.put(key, cr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(lease != null)
|
if(lease != null)
|
||||||
|
{
|
||||||
for(String key : lease.getKeys(false))
|
for(String key : lease.getKeys(false))
|
||||||
{
|
{
|
||||||
ClaimLease cl = (ClaimLease)lease.get(key);
|
ClaimLease cl = (ClaimLease)lease.get(key);
|
||||||
claimLease.put(key, cl);
|
claimLease.put(key, cl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void saveData()
|
public void saveData()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user