Skip to content

Commit e1919ad

Browse files
committed
change the messages.json so make user know we don't use it anymore
1 parent 7ee17fa commit e1919ad

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/maxgamer/quickshop/QuickShop.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
import java.io.InputStreamReader;
9595
import java.net.URISyntaxException;
9696
import java.nio.charset.StandardCharsets;
97+
import java.nio.file.Files;
9798
import java.nio.file.Paths;
9899
import java.util.*;
99100
import java.util.Map.Entry;
@@ -1974,6 +1975,12 @@ private void updateConfig(int selectedVersion) throws IOException {
19741975
new File(getDataFolder(), "example-configuration.txt").delete();
19751976
new File(getDataFolder(), "example-configuration.yml").delete();
19761977

1978+
try {
1979+
if (new File(getDataFolder(), "messages.json").exists())
1980+
Files.move(new File(getDataFolder(), "messages.json").toPath(), new File(getDataFolder(), "messages.json.outdated").toPath());
1981+
} catch (Exception ignore) {
1982+
}
1983+
19771984
// // Path exampleConfigFile = new File(getDataFolder(), "example-configuration.yml").toPath();
19781985
// try {
19791986
// Files.copy(Objects.requireNonNull(getResource("config.yml")), exampleConfigFile, REPLACE_EXISTING);

0 commit comments

Comments
 (0)