mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 06:48:50 +02:00
Enabled Geolocation setting on Bungee and Bukkit, Version bump to 4.3.0
This commit is contained in:
parent
71098e59f4
commit
b5cf501010
@ -23,7 +23,7 @@ import org.spongepowered.api.plugin.Plugin;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
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 {
|
public class PlanSponge extends SpongePlugin implements PlanPlugin {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -4,7 +4,6 @@ import com.djrapitops.plan.api.exceptions.EnableException;
|
|||||||
import com.djrapitops.plan.system.SubSystem;
|
import com.djrapitops.plan.system.SubSystem;
|
||||||
import com.djrapitops.plan.system.file.FileSystem;
|
import com.djrapitops.plan.system.file.FileSystem;
|
||||||
import com.djrapitops.plan.system.settings.Settings;
|
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.api.utility.log.Log;
|
||||||
import com.djrapitops.plugin.utilities.Verify;
|
import com.djrapitops.plugin.utilities.Verify;
|
||||||
import com.google.common.cache.Cache;
|
import com.google.common.cache.Cache;
|
||||||
@ -47,7 +46,7 @@ public class GeolocationCache implements SubSystem {
|
|||||||
@Override
|
@Override
|
||||||
public void enable() throws EnableException {
|
public void enable() throws EnableException {
|
||||||
geolocationDB = new File(FileSystem.getDataFolder(), "GeoIP.dat");
|
geolocationDB = new File(FileSystem.getDataFolder(), "GeoIP.dat");
|
||||||
if (!Check.isSpongeAvailable() || Settings.DATA_GEOLOCATIONS.isTrue()) {
|
if (Settings.DATA_GEOLOCATIONS.isTrue()) {
|
||||||
try {
|
try {
|
||||||
GeolocationCache.checkDB();
|
GeolocationCache.checkDB();
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
|
@ -10,7 +10,6 @@ import com.djrapitops.plan.system.cache.GeolocationCache;
|
|||||||
import com.djrapitops.plan.system.database.databases.Database;
|
import com.djrapitops.plan.system.database.databases.Database;
|
||||||
import com.djrapitops.plan.system.processing.CriticalRunnable;
|
import com.djrapitops.plan.system.processing.CriticalRunnable;
|
||||||
import com.djrapitops.plan.system.settings.Settings;
|
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.api.utility.log.Log;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@ -36,7 +35,7 @@ public class IPUpdateProcessor implements CriticalRunnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!Check.isSpongeAvailable() || Settings.DATA_GEOLOCATIONS.isTrue()) {
|
if (Settings.DATA_GEOLOCATIONS.isTrue()) {
|
||||||
String country = GeolocationCache.getCountry(ip);
|
String country = GeolocationCache.getCountry(ip);
|
||||||
try {
|
try {
|
||||||
Database.getActive().save().geoInfo(uuid, new GeoInfo(ip, country, time));
|
Database.getActive().save().geoInfo(uuid, new GeoInfo(ip, country, time));
|
||||||
|
@ -147,7 +147,8 @@ public class NetworkSettings {
|
|||||||
Settings.MAX_PLAYERS_PLAYERS_PAGE, Settings.PLAYERTABLE_FOOTER, Settings.FORMAT_DATE_RECENT_DAYS,
|
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_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.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..");
|
Log.debug("NetworkSettings: Adding Config Values..");
|
||||||
for (Settings setting : sameStrings) {
|
for (Settings setting : sameStrings) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: Plan
|
name: Plan
|
||||||
author: Rsl1122
|
author: Rsl1122
|
||||||
main: com.djrapitops.plan.PlanBungee
|
main: com.djrapitops.plan.PlanBungee
|
||||||
version: 4.2.0-b1
|
version: 4.3.0
|
@ -65,6 +65,7 @@ Data:
|
|||||||
Commands:
|
Commands:
|
||||||
LogUnknownCommands: false
|
LogUnknownCommands: false
|
||||||
CombineCommandAliases: true
|
CombineCommandAliases: true
|
||||||
|
Geolocations: true
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
Customization:
|
Customization:
|
||||||
UseServerTime: true
|
UseServerTime: true
|
||||||
|
@ -79,6 +79,7 @@ Data:
|
|||||||
Commands:
|
Commands:
|
||||||
LogUnknownCommands: false
|
LogUnknownCommands: false
|
||||||
CombineCommandAliases: true
|
CombineCommandAliases: true
|
||||||
|
Geolocations: true
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
Customization:
|
Customization:
|
||||||
UseServerTime: true
|
UseServerTime: true
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: Plan
|
name: Plan
|
||||||
author: Rsl1122
|
author: Rsl1122
|
||||||
main: com.djrapitops.plan.Plan
|
main: com.djrapitops.plan.Plan
|
||||||
version: 4.2.0-b1
|
version: 4.3.0
|
||||||
softdepend:
|
softdepend:
|
||||||
- EssentialsX
|
- EssentialsX
|
||||||
- Towny
|
- Towny
|
||||||
|
Loading…
Reference in New Issue
Block a user