mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-05 16:30:24 +08:00
Removed comment from Webserver.Disable_Webserver (#1180)
This commit is contained in:
parent
d05ece6106
commit
dcf47f1120
@ -17,6 +17,10 @@
|
||||
package com.djrapitops.plan.settings.config.changes;
|
||||
|
||||
import com.djrapitops.plan.settings.config.Config;
|
||||
import com.djrapitops.plan.settings.config.ConfigNode;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Represents a change made to the config structure.
|
||||
@ -97,4 +101,28 @@ public interface ConfigChange {
|
||||
return "Removed " + oldPath;
|
||||
}
|
||||
}
|
||||
|
||||
class RemovedComment implements ConfigChange {
|
||||
private String path;
|
||||
|
||||
public RemovedComment(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasBeenApplied(Config config) {
|
||||
Optional<ConfigNode> node = config.getNode(path);
|
||||
return !node.isPresent() || node.get().getComment().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Config config) {
|
||||
config.getNode(path).ifPresent(node -> node.setComment(Collections.emptyList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppliedMessage() {
|
||||
return "Removed Comment from " + path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,8 @@ public class ConfigUpdater {
|
||||
new ConfigChange.Removed("Export.Parts.JavaScript_and_CSS"),
|
||||
new ConfigChange.Moved("Plugins.LiteBans", "Plugins.Litebans"),
|
||||
new ConfigChange.Moved("Plugins.BuyCraft", "Plugins.Buycraft"),
|
||||
new ConfigChange.Moved("Plugin.Configuration.Allow_bungeecord_to_manage_settings", "Plugin.Configuration.Allow_proxy_to_manage_settings")
|
||||
new ConfigChange.Moved("Plugin.Configuration.Allow_bungeecord_to_manage_settings", "Plugin.Configuration.Allow_proxy_to_manage_settings"),
|
||||
new ConfigChange.RemovedComment("Webserver.Disable_Webserver"),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -50,10 +50,6 @@ Webserver:
|
||||
Key_pass: default
|
||||
Store_pass: default
|
||||
Alias: alias
|
||||
# For those that want to serve Html from their own WebServer instead.
|
||||
# Set up Html Export (https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/External-WebServer-Use)
|
||||
# ATTENTION: On BungeeCord systems it is not possible to disable the WebServer on the plugin due to connection requirements.
|
||||
# If the WebServer is disabled with this setting BungeeCord systems will cease to function.
|
||||
Disable_Webserver: false
|
||||
External_Webserver_address: "https://www.example.address"
|
||||
# -----------------------------------------------------
|
||||
|
@ -52,10 +52,6 @@ Webserver:
|
||||
Key_pass: default
|
||||
Store_pass: default
|
||||
Alias: alias
|
||||
# For those that want to serve Html from their own WebServer instead.
|
||||
# Set up Html Export (https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/External-WebServer-Use)
|
||||
# ATTENTION: On BungeeCord systems it is not possible to disable the WebServer on the plugin due to connection requirements.
|
||||
# If the WebServer is disabled with this setting BungeeCord systems will cease to function.
|
||||
Disable_Webserver: false
|
||||
External_Webserver_address: https://www.example.address
|
||||
# -----------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user