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 playerDataDirty = false;
|
||||||
private volatile boolean saveInProgress = 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 boolean updateAvailable = false;
|
||||||
private String latestVersion = "";
|
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. */
|
/** Entfernt einen spezifischen YAML-Target-Slot anhand der Location. */
|
||||||
private void removeTargetChestSlotYaml(UUID playerUUID, String itemName, Location loc) {
|
private boolean removeTargetChestSlotYaml(UUID playerUUID, String itemName, Location loc) {
|
||||||
if (playerData == null) return;
|
if (playerData == null) return false;
|
||||||
String base = "players." + playerUUID + ".target-chests." + itemName;
|
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 (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))) {
|
for (String slotKey : new ArrayList<>(playerData.getConfigurationSection(base).getKeys(false))) {
|
||||||
String p = base + "." + slotKey;
|
String p = base + "." + slotKey;
|
||||||
if (loc.getWorld().getName().equals(playerData.getString(p + ".world"))
|
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);
|
playerData.set(base, null);
|
||||||
}
|
}
|
||||||
savePlayerData();
|
savePlayerData();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setRestChestLocation(UUID playerUUID, Location location) {
|
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)) {
|
} else if (playerData.isConfigurationSection(itemBase)) {
|
||||||
// New slotted format
|
// New slotted format
|
||||||
removeTargetChestSlotYaml(uuid, existingType, loc);
|
if (removeTargetChestSlotYaml(uuid, existingType, loc)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void spawnTransferParticles(Location start, Location end) {
|
private void spawnTransferParticles(Location start, Location end) {
|
||||||
if (!config.getBoolean("effects.enabled", true)) return;
|
if (!config.getBoolean("effects.enabled", true)) return;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
|
|
||||||
# Version der Konfigurationsdatei – bitte nicht ändern!
|
# 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-Modus: true = Ausführliche Logs in der Konsole (nur zum Entwickeln)
|
||||||
debug: false
|
debug: false
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: AutoSortChest
|
name: AutoSortChest
|
||||||
version: 2.9
|
version: 3.1
|
||||||
main: com.viper.autosortchest.Main
|
main: com.viper.autosortchest.Main
|
||||||
api-version: 1.21
|
api-version: 1.21
|
||||||
authors: [M_Viper]
|
authors: [M_Viper]
|
||||||
|
|||||||
Reference in New Issue
Block a user