mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Changed resource settings to not use dot
This commit is contained in:
parent
dae96ef53d
commit
7860557a2d
@ -16,6 +16,8 @@
|
||||
*/
|
||||
package com.djrapitops.plan.settings.config;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
|
||||
@ -32,10 +34,11 @@ public class ResourceSettings {
|
||||
public boolean shouldBeCustomized(String plugin, String fileName) {
|
||||
ConfigNode fileCustomization = config.getNode("Customized_files").orElseGet(() -> config.addNode("Customized_files"));
|
||||
ConfigNode pluginCustomization = fileCustomization.getNode(plugin).orElseGet(() -> fileCustomization.addNode(plugin));
|
||||
if (pluginCustomization.contains(fileName)) {
|
||||
return pluginCustomization.getBoolean(fileName);
|
||||
String fileNameNonPath = StringUtils.replaceChars(fileName, '.', ',');
|
||||
if (pluginCustomization.contains(fileNameNonPath)) {
|
||||
return pluginCustomization.getBoolean(fileNameNonPath);
|
||||
} else {
|
||||
pluginCustomization.set(fileName, false);
|
||||
pluginCustomization.set(fileNameNonPath, false);
|
||||
try {
|
||||
pluginCustomization.save();
|
||||
} catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user