Skip to content

Commit

Permalink
HOTFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxikle committed Nov 18, 2024
1 parent ad57a54 commit 9dcb7e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
implementation(project(":v1_20_R1", "reobf"))
}

var pluginVersion = "1.7-pre8"
var pluginVersion = "1.7-pre9"

allprojects {
group = "dev.foxikle"
Expand Down Expand Up @@ -128,7 +128,7 @@ tasks {
archiveClassifier.set("")
relocate("org.bstats", "dev.foxikle.dependencies.bstats")
// This is used to place the file into a test server's plugin directory.
//destinationDirectory.set(file(providers.gradleProperty("plugin_dir").get()))
destinationDirectory.set(file(providers.gradleProperty("plugin_dir").get()))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.time.Instant;
import java.util.*;
import java.util.logging.Level;

Expand Down Expand Up @@ -194,6 +195,7 @@ public boolean createFiles() {
return false;
}
yml.set("version", "1.3");
version = "1.3";

plugin.getLogger().warning("Adding delay to old actions.");
for (UUID u : getNPCIds()) {
Expand Down Expand Up @@ -227,6 +229,7 @@ public boolean createFiles() {
return false;
}
yml.set("version", "1.4");
version = "1.4";

Set<String> npcs = yml.getKeys(false);
for (String npc : npcs) {
Expand Down Expand Up @@ -262,6 +265,7 @@ public boolean createFiles() {
}

yml.set("version", "1.5");
version = "1.5";

Set<String> npcs = yml.getKeys(false);
for (String npc : npcs) {
Expand All @@ -286,6 +290,7 @@ public boolean createFiles() {
}

yml.set("version", "1.6");
version = "1.6";
Set<String> npcs = yml.getKeys(false);
for (String npc : npcs) {
if (npc.equals("version")) continue; // it's a key
Expand All @@ -310,6 +315,7 @@ public boolean createFiles() {
return false;
}
yml.set("version", "1.7");
version = "1.7";

Set<String> npcs = yml.getKeys(false);
for (String npc : npcs) {
Expand Down Expand Up @@ -578,7 +584,7 @@ public void remove(UUID uuid) {

private BackupResult createBackup(File file) {
YamlConfiguration yml = YamlConfiguration.loadConfiguration(file);
File f = new File(PARENT_DIRECTORY, new Date().toString().replace(" ", "_").replace(":", "_") + "_backup_of_" + file.getName());
File f = new File(PARENT_DIRECTORY, new Date().toString().replace(" ", "_").replace(":", "_") + "_backup_of_" + file.getName() + Instant.now().hashCode());
try {
if (f.createNewFile()) {
yml.save(f);
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/npcs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Do not edit this file. Foxikle is not responsible for any data loss.
version: 1.6
version: 1.8
# DO NOT, under ANY circumstances modify the 'version' field. Doing so can cause catastrophic data loss.

0 comments on commit 9dcb7e8

Please sign in to comment.