Enabled Geolocation setting on Bungee and Bukkit, Version bump to 4.3.0

This commit is contained in:
Rsl1122 2018-05-24 14:57:12 +03:00
parent 71098e59f4
commit b5cf501010
8 changed files with 9 additions and 8 deletions

View File

@ -23,7 +23,7 @@ import org.spongepowered.api.plugin.Plugin;
import java.io.File;
import java.io.InputStream;
@Plugin(id = "plan", name = "Plan", version = "4.2.1", description = "Player Analytics Plugin by Rsl1122", authors = {"Rsl1122"})
@Plugin(id = "plan", name = "Plan", version = "4.3.0", description = "Player Analytics Plugin by Rsl1122", authors = {"Rsl1122"})
public class PlanSponge extends SpongePlugin implements PlanPlugin {
@Inject

View File

@ -4,7 +4,6 @@ import com.djrapitops.plan.api.exceptions.EnableException;
import com.djrapitops.plan.system.SubSystem;
import com.djrapitops.plan.system.file.FileSystem;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plugin.api.Check;
import com.djrapitops.plugin.api.utility.log.Log;
import com.djrapitops.plugin.utilities.Verify;
import com.google.common.cache.Cache;
@ -47,7 +46,7 @@ public class GeolocationCache implements SubSystem {
@Override
public void enable() throws EnableException {
geolocationDB = new File(FileSystem.getDataFolder(), "GeoIP.dat");
if (!Check.isSpongeAvailable() || Settings.DATA_GEOLOCATIONS.isTrue()) {
if (Settings.DATA_GEOLOCATIONS.isTrue()) {
try {
GeolocationCache.checkDB();
} catch (UnknownHostException e) {

View File

@ -10,7 +10,6 @@ import com.djrapitops.plan.system.cache.GeolocationCache;
import com.djrapitops.plan.system.database.databases.Database;
import com.djrapitops.plan.system.processing.CriticalRunnable;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plugin.api.Check;
import com.djrapitops.plugin.api.utility.log.Log;
import java.io.UnsupportedEncodingException;
@ -36,7 +35,7 @@ public class IPUpdateProcessor implements CriticalRunnable {
@Override
public void run() {
if (!Check.isSpongeAvailable() || Settings.DATA_GEOLOCATIONS.isTrue()) {
if (Settings.DATA_GEOLOCATIONS.isTrue()) {
String country = GeolocationCache.getCountry(ip);
try {
Database.getActive().save().geoInfo(uuid, new GeoInfo(ip, country, time));

View File

@ -147,7 +147,8 @@ public class NetworkSettings {
Settings.MAX_PLAYERS_PLAYERS_PAGE, Settings.PLAYERTABLE_FOOTER, Settings.FORMAT_DATE_RECENT_DAYS,
Settings.FORMAT_DATE_RECENT_DAYS_PATTERN, Settings.FORMAT_DATE_CLOCK, Settings.FORMAT_DATE_NO_SECONDS,
Settings.FORMAT_DATE_FULL, Settings.DISPLAY_PLAYER_IPS, Settings.ACTIVE_LOGIN_THRESHOLD,
Settings.ACTIVE_PLAY_THRESHOLD, Settings.DISPLAY_GAPS_IN_GRAPH_DATA, Settings.AFK_THRESHOLD_MINUTES
Settings.ACTIVE_PLAY_THRESHOLD, Settings.DISPLAY_GAPS_IN_GRAPH_DATA, Settings.AFK_THRESHOLD_MINUTES,
Settings.DATA_GEOLOCATIONS
};
Log.debug("NetworkSettings: Adding Config Values..");
for (Settings setting : sameStrings) {

View File

@ -1,4 +1,4 @@
name: Plan
author: Rsl1122
main: com.djrapitops.plan.PlanBungee
version: 4.2.0-b1
version: 4.3.0

View File

@ -65,6 +65,7 @@ Data:
Commands:
LogUnknownCommands: false
CombineCommandAliases: true
Geolocations: true
# -----------------------------------------------------
Customization:
UseServerTime: true

View File

@ -79,6 +79,7 @@ Data:
Commands:
LogUnknownCommands: false
CombineCommandAliases: true
Geolocations: true
# -----------------------------------------------------
Customization:
UseServerTime: true

View File

@ -1,7 +1,7 @@
name: Plan
author: Rsl1122
main: com.djrapitops.plan.Plan
version: 4.2.0-b1
version: 4.3.0
softdepend:
- EssentialsX
- Towny