mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2025-01-06 19:18:05 +01:00
[build] only update the data.yml if the value is not a uuid
This commit is contained in:
parent
8cfe439830
commit
8cbf7e553f
@ -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`
|
||||
- Only update the data.yml if the value is not a uuid
|
@ -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
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user