Upload folder via GUI - src

This commit is contained in:
Git Manager GUI
2026-04-02 14:19:07 +02:00
parent 1679854a3c
commit aca658ea9f
3 changed files with 12 additions and 10 deletions

View File

@@ -335,7 +335,7 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor, org.b
private volatile boolean playerDataDirty = false;
private volatile boolean saveInProgress = false;
private static final String CONFIG_VERSION = "2.8";
private static final String CONFIG_VERSION = "3.0";
private boolean updateAvailable = false;
private String latestVersion = "";
@@ -2064,12 +2064,12 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor, org.b
}
/** Entfernt einen spezifischen YAML-Target-Slot anhand der Location. */
private void removeTargetChestSlotYaml(UUID playerUUID, String itemName, Location loc) {
if (playerData == null) return;
private boolean removeTargetChestSlotYaml(UUID playerUUID, String itemName, Location loc) {
if (playerData == null) return false;
String base = "players." + playerUUID + ".target-chests." + itemName;
if (!playerData.contains(base)) return;
if (!playerData.contains(base)) return false;
if (isOldTargetFormat(playerUUID, itemName)) migrateOldTargetChestEntry(playerUUID, itemName);
if (!playerData.isConfigurationSection(base)) return;
if (!playerData.isConfigurationSection(base)) return false;
for (String slotKey : new ArrayList<>(playerData.getConfigurationSection(base).getKeys(false))) {
String p = base + "." + slotKey;
if (loc.getWorld().getName().equals(playerData.getString(p + ".world"))
@@ -2082,9 +2082,10 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor, org.b
playerData.set(base, null);
}
savePlayerData();
return;
return true;
}
}
return false;
}
private void setRestChestLocation(UUID playerUUID, Location location) {
@@ -4696,8 +4697,9 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor, org.b
}
} else if (playerData.isConfigurationSection(itemBase)) {
// New slotted format
removeTargetChestSlotYaml(uuid, existingType, loc);
break;
if (removeTargetChestSlotYaml(uuid, existingType, loc)) {
break;
}
}
}
}

View File

@@ -12,7 +12,7 @@
# ============================================================
# Version der Konfigurationsdatei bitte nicht ändern!
version: "2.8"
version: "3.0"
# Debug-Modus: true = Ausführliche Logs in der Konsole (nur zum Entwickeln)
debug: false

View File

@@ -1,5 +1,5 @@
name: AutoSortChest
version: 2.9
version: 3.1
main: com.viper.autosortchest.Main
api-version: 1.21
authors: [M_Viper]