mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 15:44:49 +08:00
Fixes Issue #211
This commit is contained in:
parent
c88e7dae2f
commit
8aea50ee6c
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.djrapitops:PlanPluginBridge:3.5.0">
|
||||
<library name="Maven: com.djrapitops:PlanPluginBridge:3.6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/PlanPluginBridge/3.5.0/PlanPluginBridge-3.5.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/PlanPluginBridge/3.6.0/PlanPluginBridge-3.6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/PlanPluginBridge/3.5.0/PlanPluginBridge-3.5.0-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/PlanPluginBridge/3.6.0/PlanPluginBridge-3.6.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/PlanPluginBridge/3.5.0/PlanPluginBridge-3.5.0-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/djrapitops/PlanPluginBridge/3.6.0/PlanPluginBridge-3.6.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>Plan</artifactId>
|
||||
<version>3.5.5</version>
|
||||
<version>3.6.0</version>
|
||||
<build>
|
||||
<sourceDirectory>${basedir}/src</sourceDirectory>
|
||||
<defaultGoal>clean package install</defaultGoal>
|
||||
@ -12,6 +12,8 @@
|
||||
<targetPath>.</targetPath>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>*.keystore</include>
|
||||
<include>*.js</include>
|
||||
<include>*.yml</include>
|
||||
<include>*.html</include>
|
||||
</includes>
|
||||
@ -178,6 +180,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<sonar.language>java</sonar.language>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
@ -25,6 +25,7 @@ public class PluginConfigSectionHandler {
|
||||
if (!section.contains(pluginName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ConfigurationSection pluginSection = section.getConfigurationSection(pluginName);
|
||||
return pluginSection.contains(dataSource.getPlaceholder(""));
|
||||
}
|
||||
@ -38,8 +39,10 @@ public class PluginConfigSectionHandler {
|
||||
ConfigurationSection section = getPluginsSection();
|
||||
String pluginName = dataSource.getSourcePlugin();
|
||||
String source = dataSource.placeholder;
|
||||
|
||||
section.addDefault(pluginName + ".Enabled", true);
|
||||
section.addDefault(pluginName + ".Data." + source, true);
|
||||
|
||||
FileConfiguration config = plan.getConfig();
|
||||
config.set("Customization.Plugins", section);
|
||||
plan.saveConfig();
|
||||
@ -47,9 +50,11 @@ public class PluginConfigSectionHandler {
|
||||
|
||||
public boolean isEnabled(PluginData dataSource) {
|
||||
ConfigurationSection section = getPluginsSection();
|
||||
|
||||
String pluginName = dataSource.getSourcePlugin();
|
||||
if (!section.getBoolean(pluginName + ".Enabled")) {
|
||||
return false;
|
||||
|
||||
}
|
||||
String source = dataSource.placeholder;
|
||||
return section.getBoolean(pluginName + ".Data." + source);
|
||||
|
@ -16,7 +16,7 @@ import java.util.Map;
|
||||
* <p>
|
||||
* It caches all IPs with their matching country.
|
||||
* <p>
|
||||
* This cache uses the Google Guava {@link Cache} and has a capacity of 10.000 entries.
|
||||
* This cache uses the Google Guava {@link Cache}.
|
||||
*
|
||||
* @author Fuzzlemann
|
||||
* @since 3.5.5
|
||||
@ -31,7 +31,6 @@ public class GeolocationCacheHandler {
|
||||
}
|
||||
|
||||
private static final Cache<String, String> geolocationCache = CacheBuilder.newBuilder()
|
||||
.maximumSize(10000)
|
||||
.build();
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user