Skip to content
Permalink
Browse files

- Improve debug messaging on flatfile database load.

  • Loading branch information
LlmDl committed Jan 9, 2020
1 parent 73ac87f commit a8cd61dfc928acc3fc669157685f7924f7e2d854
Showing with 10 additions and 6 deletions.
  1. +1 −1 pom.xml
  2. +1 −1 pom_deb.xml
  3. +2 −1 resources/ChangeLog.txt
  4. +6 −3 src/com/palmergames/bukkit/towny/db/TownyFlatFileSource.java
@@ -7,7 +7,7 @@
<groupId>com.palmergames.bukkit.towny</groupId>
<artifactId>Towny</artifactId>
<packaging>jar</packaging>
<version>0.95.2.7</version>
<version>0.95.2.8</version>

<licenses>
<license>
@@ -12,7 +12,7 @@
<groupId>com.palmergames.bukkit.towny</groupId>
<artifactId>Towny</artifactId>
<packaging>jar</packaging>
<version>0.95.2.7</version>
<version>0.95.2.8</version>

<licenses>
<license>
@@ -4056,4 +4056,5 @@ v0.92.0.11:
- Javadocs should only build on the install phase.
- Github actions should again function properly.
- Change to saving for plotgroups on flatfile, removing now-redundant world.
- Already-made plot groups should load properly and save without a world.
- Already-made plot groups should load properly and save without a world.
- Improve debug messaging on flatfile database load.
@@ -546,6 +546,7 @@ public boolean loadResident(Resident resident) {
String path = getResidentFilename(resident);
File fileResident = new File(path);
if (fileResident.exists() && fileResident.isFile()) {
TownyMessaging.sendDebugMsg("Loading Resident: " + resident.getName());
try {
HashMap<String, String> keys = new HashMap<>();
Properties properties = new Properties();
@@ -646,9 +647,9 @@ public boolean loadTown(Town town) {
String line = null;
String[] tokens;
String path = getTownFilename(town);
File fileTown = new File(path);

File fileTown = new File(path);
if (fileTown.exists() && fileTown.isFile()) {
TownyMessaging.sendDebugMsg("Loading Town: " + town.getName());
try {
HashMap<String, String> keys = new HashMap<>();
Properties properties = new Properties();
@@ -663,7 +664,7 @@ public boolean loadTown(Town town) {
tokens = line.split(",");
for (String token : tokens) {
if (!token.isEmpty()) {
TownyMessaging.sendDebugMsg("Town Fetching Resident: " + token);
TownyMessaging.sendDebugMsg("Town (" + town.getName() + ") Fetching Resident: " + token);
try {
Resident resident = getResident(token);
if (resident != null) {
@@ -984,6 +985,7 @@ public boolean loadNation(Nation nation) {
File fileNation = new File(path);

if (fileNation.exists() && fileNation.isFile()) {
TownyMessaging.sendDebugMsg("Loading Nation: " + nation.getName());
try {
HashMap<String, String> keys = new HashMap<>();
Properties properties = new Properties();
@@ -1160,6 +1162,7 @@ public boolean loadWorld(TownyWorld world) {

File fileWorld = new File(path);
if (fileWorld.exists() && fileWorld.isFile()) {
TownyMessaging.sendDebugMsg("Loading World: " + world.getName());
try {
HashMap<String, String> keys = new HashMap<>();
Properties properties = new Properties();

0 comments on commit a8cd61d

Please sign in to comment.
You can’t perform that action at this time.