Skip to content

Commit 3adeef7

Browse files
committed
the main configuration now contains the comments, so we don't need example-configuration files anymore
1 parent 039913d commit 3adeef7

File tree

3 files changed

+22
-43
lines changed

3 files changed

+22
-43
lines changed

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,11 @@
9393
import java.io.IOException;
9494
import java.io.InputStreamReader;
9595
import java.net.URISyntaxException;
96-
import java.nio.file.Files;
97-
import java.nio.file.Path;
9896
import java.nio.file.Paths;
9997
import java.util.*;
10098
import java.util.Map.Entry;
10199
import java.util.logging.Level;
102100

103-
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
104-
105101
public class QuickShop extends JavaPlugin implements QuickShopAPI {
106102

107103
/* Public QuickShop API */
@@ -1951,13 +1947,14 @@ private void updateConfig(int selectedVersion) throws IOException {
19511947
//Delete old example configuration files
19521948
new File(getDataFolder(), "example.config.yml").delete();
19531949
new File(getDataFolder(), "example-configuration.txt").delete();
1950+
new File(getDataFolder(), "example-configuration.yml").delete();
19541951

1955-
Path exampleConfigFile = new File(getDataFolder(), "example-configuration.yml").toPath();
1956-
try {
1957-
Files.copy(Objects.requireNonNull(getResource("config.yml")), exampleConfigFile, REPLACE_EXISTING);
1958-
} catch (IOException ioe) {
1959-
getLogger().warning("Error when creating the example config file: " + ioe.getMessage());
1960-
}
1952+
// // Path exampleConfigFile = new File(getDataFolder(), "example-configuration.yml").toPath();
1953+
// try {
1954+
// Files.copy(Objects.requireNonNull(getResource("config.yml")), exampleConfigFile, REPLACE_EXISTING);
1955+
// } catch (IOException ioe) {
1956+
// getLogger().warning("Error when creating the example config file: " + ioe.getMessage());
1957+
// }
19611958
}
19621959

19631960
public void setupBootError(BootError bootError, boolean unregisterListeners) {

src/main/java/org/maxgamer/quickshop/util/config/ConfigurationUpdater.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ private void saveConfig() {
959959
// reloadConfig();
960960
//
961961
// //Delete old example configuration files
962-
// new File(getDataFolder(), "example.config.yml").delete();
962+
// new File(getDataFolder(), "xample.config.yml").delete();
963963
// new File(getDataFolder(), "example-configuration.txt").delete();
964964
//
965965
// Path exampleConfigFile = new File(getDataFolder(), "example-configuration.yml").toPath();

src/main/resources/config.yml

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
1-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
2-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
3-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
4-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
5-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
6-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
7-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
8-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
9-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
10-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
11-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
12-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
13-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
14-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
15-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
16-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
17-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
18-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
19-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
20-
#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin.
21-
#READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE
22-
# TO EDIT QUICKSHOP'S CONFIGURATION, USE THE "config.yml" FILE!
23-
241
#Do not touch this if you don't know what you're doing!
252
config-version: 143
263

27-
#Select the language you want to use, (e.g de), use only supported language codes from the list below.
4+
#Choose which languages should enabled
5+
#Any client connect to server that using disabled language, will fallback to en-US language
6+
#Set to -'*' to enable all available languages
7+
#The language files will automatically update thorough Crowdin OTA system.
8+
#If you want custom the language file, use language override system.
9+
enabled-languages:
10+
- '*'
11+
12+
#Select the language you want to use, (e.g de-DE), use only supported language codes from the list below.
2813
#If you use a not existant/not supported language, then QuickShop will use en_US.
2914
#After you have selected your language, you need to delete the `messages.yml` file and reload the plugin to apply the new language.
3015

@@ -33,16 +18,13 @@ config-version: 143
3318
#Enter the language Code here (e.g English (en-US) -> Language Code = en-US).
3419
game-language: default
3520

36-
# 0=Official
37-
# 1=BMCLAPI (Unofficial China Mirror, https://bmclapidoc.bangbang93.com)
38-
# 2=MCBBSMirror (Another OpenBMCLAPI server, https://www.mcbbs.net)
39-
# You can choose which one you want to use for downloading resources.
40-
# By default, QuickShop use Mojang official servers to downloading resources.
21+
#0=Official
22+
#1=BMCLAPI (Unofficial China Mirror, https://bmclapidoc.bangbang93.com)
23+
#2=MCBBSMirror (Another OpenBMCLAPI server, https://www.mcbbs.net)
24+
#You can choose which one you want to use for downloading resources.
25+
#By default, QuickShop use Mojang official server to downloading resources.
4126
mojangapi-mirror: 0
4227

43-
enabled-languages:
44-
- '*'
45-
4628
#This enables the developer mode, do not touch this if you don't not know what it does!
4729
dev-mode: false
4830

0 commit comments

Comments
 (0)