mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 01:03:44 +01:00 
			
		
		
		
	Properly convert SQL to Flatfile when UUIDs are null
This commit is contained in:
		| @@ -272,7 +272,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager { | |||||||
|                 while ((line = in.readLine()) != null) { |                 while ((line = in.readLine()) != null) { | ||||||
|                     // Read the line in and copy it to the output if it's not the player we want to edit |                     // Read the line in and copy it to the output if it's not the player we want to edit | ||||||
|                     String[] character = line.split(":"); |                     String[] character = line.split(":"); | ||||||
|                     if (!character[41].equalsIgnoreCase(uuid.toString()) && !character[0].equalsIgnoreCase(playerName)) { |                     if (!(uuid != null && character[41].equalsIgnoreCase(uuid.toString())) && !character[0].equalsIgnoreCase(playerName)) { | ||||||
|                         writer.append(line).append("\r\n"); |                         writer.append(line).append("\r\n"); | ||||||
|                     } |                     } | ||||||
|                     else { |                     else { | ||||||
| @@ -319,7 +319,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager { | |||||||
|                         writer.append(mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()).append(":"); |                         writer.append(mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString()).append(":"); | ||||||
|                         writer.append(profile.getSkillLevel(SkillType.ALCHEMY)).append(":"); |                         writer.append(profile.getSkillLevel(SkillType.ALCHEMY)).append(":"); | ||||||
|                         writer.append(profile.getSkillXpLevel(SkillType.ALCHEMY)).append(":"); |                         writer.append(profile.getSkillXpLevel(SkillType.ALCHEMY)).append(":"); | ||||||
|                         writer.append(uuid.toString()).append(":"); |                         writer.append(uuid != null ? uuid.toString() : "NULL").append(":"); | ||||||
|                         writer.append(profile.getScoreboardTipsShown()).append(":"); |                         writer.append(profile.getScoreboardTipsShown()).append(":"); | ||||||
|                         writer.append("\r\n"); |                         writer.append("\r\n"); | ||||||
|                     } |                     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 t00thpick1
					t00thpick1