diff --git a/CHANGELOG.md b/CHANGELOG.md index 513440d..d78c6af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,2 @@ ### Changes: -- Migrated `data.yml` to use uuids instead of player names. Existing data.yml should migrate to this format. - -### Fixed: -- Bid now button wasn't using the value from the `config.yml` \ No newline at end of file +- Only update the data.yml if the value is not a uuid \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 8c01a79..28fafa4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { val buildNumber: String? = System.getenv("BUILD_NUMBER") -rootProject.version = if (buildNumber != null) "1.4.3-$buildNumber" else "1.4.3" +rootProject.version = if (buildNumber != null) "1.4.4-$buildNumber" else "1.4.4" val isSnapshot = false diff --git a/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java index 9d0cf05..ddd1d40 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java @@ -96,9 +96,11 @@ public class CrazyAuctions extends JavaPlugin { if (uuid != null) { OfflinePlayer player = Methods.getOfflinePlayer(uuid); - configuration.set("Items." + key + ".Seller", player.getUniqueId().toString()); + if (!uuid.equals(player.getUniqueId().toString())) { + configuration.set("Items." + key + ".Seller", player.getUniqueId().toString()); - FileManager.Files.DATA.saveFile(); + FileManager.Files.DATA.saveFile(); + } } final String bidder = configuration.getString("Items." + key + ".TopBidder"); @@ -106,9 +108,11 @@ public class CrazyAuctions extends JavaPlugin { if (bidder != null && !bidder.equals("None")) { OfflinePlayer player = Methods.getOfflinePlayer(bidder); - configuration.set("Items." + key + ".TopBidder", player.getUniqueId().toString()); + if (!bidder.equals(player.getUniqueId().toString())) { + configuration.set("Items." + key + ".TopBidder", player.getUniqueId().toString()); - FileManager.Files.DATA.saveFile(); + FileManager.Files.DATA.saveFile(); + } } } }