Upload folder via GUI - src
This commit is contained in:
@@ -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,11 +4697,12 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor, org.b
|
||||
}
|
||||
} else if (playerData.isConfigurationSection(itemBase)) {
|
||||
// New slotted format
|
||||
removeTargetChestSlotYaml(uuid, existingType, loc);
|
||||
if (removeTargetChestSlotYaml(uuid, existingType, loc)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnTransferParticles(Location start, Location end) {
|
||||
if (!config.getBoolean("effects.enabled", true)) return;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: AutoSortChest
|
||||
version: 2.9
|
||||
version: 3.1
|
||||
main: com.viper.autosortchest.Main
|
||||
api-version: 1.21
|
||||
authors: [M_Viper]
|
||||
|
||||
Reference in New Issue
Block a user