mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-21 23:51:29 +01:00
Changed all incorrect package names + Bugfixes, small things
- Removed remaints of ServerData - Named a few tasks - Empty nickname no longer added to Nicknames - SessionData no longer cleared when DataCache clears data from cache - Moved all imports and package declerations to correct form (Should have done this ages ago) main.java.com.djrapitops.plan....
This commit is contained in:
parent
a2cd3af688
commit
ded1ef53bf
@ -1,9 +1,8 @@
|
|||||||
package com.djrapitops.plan;
|
package main.java.com.djrapitops.plan;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* License for more details.
|
* License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the License
|
* You should have received a copy of the License
|
||||||
* along with this program.
|
* along with this program.
|
||||||
* If not it should be visible on the distribution page.
|
* If not it should be visible on the distribution page.
|
||||||
@ -18,16 +18,16 @@
|
|||||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/licence.yml
|
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/licence.yml
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.djrapitops.plan;
|
package main.java.com.djrapitops.plan;
|
||||||
|
|
||||||
import com.djrapitops.plan.command.PlanCommand;
|
import main.java.com.djrapitops.plan.command.PlanCommand;
|
||||||
import com.djrapitops.plan.api.API;
|
import main.java.com.djrapitops.plan.api.API;
|
||||||
import com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
||||||
import com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import com.djrapitops.plan.database.databases.*;
|
import main.java.com.djrapitops.plan.database.databases.*;
|
||||||
import com.djrapitops.plan.data.cache.*;
|
import main.java.com.djrapitops.plan.data.cache.*;
|
||||||
import com.djrapitops.plan.data.listeners.*;
|
import main.java.com.djrapitops.plan.data.listeners.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
@ -41,7 +41,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import main.java.com.djrapitops.plan.Settings;
|
|
||||||
import main.java.com.djrapitops.plan.data.listeners.PlanDeathEventListener;
|
import main.java.com.djrapitops.plan.data.listeners.PlanDeathEventListener;
|
||||||
import main.java.com.djrapitops.plan.ui.Html;
|
import main.java.com.djrapitops.plan.ui.Html;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -56,27 +55,10 @@ Database cleaning
|
|||||||
Play session length
|
Play session length
|
||||||
Location Analysis to view meaningful locations on Dynmap (Investigate dynmap api)
|
Location Analysis to view meaningful locations on Dynmap (Investigate dynmap api)
|
||||||
Integrate PlanLite features to Plan and discontinue PlanLite
|
Integrate PlanLite features to Plan and discontinue PlanLite
|
||||||
Seperate serverdata and userdata saving
|
|
||||||
Database Cleaning of useless data
|
Database Cleaning of useless data
|
||||||
Fix any bugs that come up
|
Fix any bugs that come up
|
||||||
- New Players not counted for some reason.
|
|
||||||
Sortable player table.
|
Sortable player table.
|
||||||
Add -n argument for nickname search.
|
Add -n argument for nickname search.
|
||||||
Online activity revamp
|
|
||||||
- Create new SessionData
|
|
||||||
- Data saved to UserData
|
|
||||||
- Database table
|
|
||||||
- Data saved to database
|
|
||||||
- Data retrieval from db
|
|
||||||
- Remove ServerData
|
|
||||||
-> Move commanduse responsibility to a new handler
|
|
||||||
- Online player analysis
|
|
||||||
- New player analysis (Registered)
|
|
||||||
Kill table
|
|
||||||
- weapon
|
|
||||||
- KillData
|
|
||||||
- Saving
|
|
||||||
- DB
|
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -145,7 +127,7 @@ public class Plan extends JavaPlugin {
|
|||||||
uiServer = new WebSocketServer(this);
|
uiServer = new WebSocketServer(this);
|
||||||
uiServer.initServer();
|
uiServer.initServer();
|
||||||
if (Settings.ANALYSIS_REFRESH_ON_ENABLE.isTrue()) {
|
if (Settings.ANALYSIS_REFRESH_ON_ENABLE.isTrue()) {
|
||||||
startBootRefreshTask();
|
startBootAnalysisTask();
|
||||||
}
|
}
|
||||||
int analysisRefreshMinutes = Settings.ANALYSIS_AUTO_REFRESH.getNumber();
|
int analysisRefreshMinutes = Settings.ANALYSIS_AUTO_REFRESH.getNumber();
|
||||||
if (analysisRefreshMinutes != -1) {
|
if (analysisRefreshMinutes != -1) {
|
||||||
@ -269,7 +251,7 @@ public class Plan extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startAnalysisRefreshTask(int analysisRefreshMinutes) throws IllegalStateException, IllegalArgumentException {
|
private void startAnalysisRefreshTask(int analysisRefreshMinutes) throws IllegalStateException, IllegalArgumentException {
|
||||||
(new BukkitRunnable() {
|
BukkitTask asyncPeriodicalAnalysisTask = (new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!analysisCache.isCached()) {
|
if (!analysisCache.isCached()) {
|
||||||
@ -281,9 +263,9 @@ public class Plan extends JavaPlugin {
|
|||||||
}).runTaskTimerAsynchronously(this, analysisRefreshMinutes * 60 * 20, analysisRefreshMinutes * 60 * 20);
|
}).runTaskTimerAsynchronously(this, analysisRefreshMinutes * 60 * 20, analysisRefreshMinutes * 60 * 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startBootRefreshTask() throws IllegalStateException, IllegalArgumentException {
|
private void startBootAnalysisTask() throws IllegalStateException, IllegalArgumentException {
|
||||||
log(Phrase.ANALYSIS_BOOT_NOTIFY + "");
|
log(Phrase.ANALYSIS_BOOT_NOTIFY + "");
|
||||||
BukkitTask analysis = (new BukkitRunnable() {
|
BukkitTask bootAnalysisTask = (new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
log(Phrase.ANALYSIS_BOOT + "");
|
log(Phrase.ANALYSIS_BOOT + "");
|
||||||
@ -291,7 +273,7 @@ public class Plan extends JavaPlugin {
|
|||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
}).runTaskLater(this, 30 * 20);
|
}).runTaskLater(this, 30 * 20);
|
||||||
bootAnalysisTaskID = analysis.getTaskId();
|
bootAnalysisTaskID = bootAnalysisTask.getTaskId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan;
|
package main.java.com.djrapitops.plan;
|
||||||
|
|
||||||
import com.djrapitops.planlite.PlanLite;
|
import com.djrapitops.planlite.PlanLite;
|
||||||
import com.djrapitops.planlite.api.API;
|
import com.djrapitops.planlite.api.API;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package main.java.com.djrapitops.plan;
|
package main.java.com.djrapitops.plan;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
|
import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,7 +20,6 @@ public enum Settings {
|
|||||||
// Integer
|
// Integer
|
||||||
ANALYSIS_MINUTES_FOR_ACTIVE("Settings.Analysis.MinutesPlayedUntilConsidiredActive"),
|
ANALYSIS_MINUTES_FOR_ACTIVE("Settings.Analysis.MinutesPlayedUntilConsidiredActive"),
|
||||||
SAVE_CACHE_MIN("Settings.Cache.DataCache.SaveEveryXMinutes"),
|
SAVE_CACHE_MIN("Settings.Cache.DataCache.SaveEveryXMinutes"),
|
||||||
SAVE_SERVER_MIN("Settings.Cache.DataCache.SaveServerDataEveryXMinutes"),
|
|
||||||
CLEAR_INSPECT_CACHE("Settings.Cache.InspectCache.ClearFromInspectCacheAfterXMinutes"),
|
CLEAR_INSPECT_CACHE("Settings.Cache.InspectCache.ClearFromInspectCacheAfterXMinutes"),
|
||||||
CLEAR_CACHE_X_SAVES("Settings.Cache.DataCache.ClearCacheEveryXSaves"),
|
CLEAR_CACHE_X_SAVES("Settings.Cache.DataCache.ClearCacheEveryXSaves"),
|
||||||
WEBSERVER_PORT("Settings.WebServer.Port"),
|
WEBSERVER_PORT("Settings.WebServer.Port"),
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.djrapitops.plan.api;
|
package main.java.com.djrapitops.plan.api;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.data.AnalysisData;
|
import main.java.com.djrapitops.plan.data.AnalysisData;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.ui.DataRequestHandler;
|
import main.java.com.djrapitops.plan.ui.DataRequestHandler;
|
||||||
import com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
import com.djrapitops.planlite.UUIDFetcher;
|
import com.djrapitops.planlite.UUIDFetcher;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.api;
|
package main.java.com.djrapitops.plan.api;
|
||||||
|
|
||||||
public enum Gender {
|
public enum Gender {
|
||||||
MALE, FEMALE, OTHER, UNKNOWN;
|
MALE, FEMALE, OTHER, UNKNOWN;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.command;
|
package main.java.com.djrapitops.plan.command;
|
||||||
|
|
||||||
public enum CommandType {
|
public enum CommandType {
|
||||||
CONSOLE,
|
CONSOLE,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.command;
|
package main.java.com.djrapitops.plan.command;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.command.commands.*;
|
import main.java.com.djrapitops.plan.command.commands.*;
|
||||||
import com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.command;
|
package main.java.com.djrapitops.plan.command;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import main.java.com.djrapitops.plan.Settings;
|
import main.java.com.djrapitops.plan.Settings;
|
||||||
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
||||||
@ -14,6 +14,7 @@ import org.bukkit.command.CommandException;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -69,8 +70,7 @@ public class AnalyzeCommand extends SubCommand {
|
|||||||
analysisCache.updateCache();
|
analysisCache.updateCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
(new BukkitRunnable() {
|
BukkitTask analysisMessageSenderTask = (new BukkitRunnable() {
|
||||||
|
|
||||||
private int timesrun = 0;
|
private int timesrun = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
//import com.djrapitops.plan.Phrase;
|
//import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.PlanCommand;
|
import main.java.com.djrapitops.plan.command.PlanCommand;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.utilities.UUIDFetcher;
|
import main.java.com.djrapitops.plan.utilities.UUIDFetcher;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.InspectCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.InspectCacheHandler;
|
||||||
import com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import main.java.com.djrapitops.plan.Settings;
|
import main.java.com.djrapitops.plan.Settings;
|
||||||
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
||||||
@ -20,6 +20,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import static org.bukkit.Bukkit.getOfflinePlayer;
|
import static org.bukkit.Bukkit.getOfflinePlayer;
|
||||||
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -98,7 +99,7 @@ public class InspectCommand extends SubCommand {
|
|||||||
configValue = 4;
|
configValue = 4;
|
||||||
}
|
}
|
||||||
final int available = configValue;
|
final int available = configValue;
|
||||||
(new BukkitRunnable() {
|
BukkitTask inspectMessageSenderTask = (new BukkitRunnable() {
|
||||||
private int timesrun = 0;
|
private int timesrun = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -118,7 +119,7 @@ public class InspectCommand extends SubCommand {
|
|||||||
Bukkit.getServer().dispatchCommand(
|
Bukkit.getServer().dispatchCommand(
|
||||||
Bukkit.getConsoleSender(),
|
Bukkit.getConsoleSender(),
|
||||||
"tellraw " + player.getName() + " [\"\",{\"text\":\""+Phrase.CMD_CLICK_ME+"\",\"underlined\":true,"
|
"tellraw " + player.getName() + " [\"\",{\"text\":\""+Phrase.CMD_CLICK_ME+"\",\"underlined\":true,"
|
||||||
+ "\"clickEvent\":{\"action\":\"open_url\",\"value\":\"" + url + "\"}}]");
|
+ "\"clickEvent\":{\"action\":\"open_url\",\"value\":\"" + url + "\"}}]");
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(Phrase.CMD_RESULTS_AVAILABLE.parse(available+""));
|
sender.sendMessage(Phrase.CMD_RESULTS_AVAILABLE.parse(available+""));
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.djrapitops.plan.command.commands;
|
package main.java.com.djrapitops.plan.command.commands;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.cache.InspectCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.InspectCacheHandler;
|
||||||
import com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import com.djrapitops.plan.database.databases.SQLiteDB;
|
import main.java.com.djrapitops.plan.database.databases.SQLiteDB;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
|
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
|
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import main.java.com.djrapitops.plan.command.commands.ManageCommand;
|
import main.java.com.djrapitops.plan.command.commands.ManageCommand;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
|
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.utilities.UUIDFetcher;
|
import main.java.com.djrapitops.plan.utilities.UUIDFetcher;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
|
|
||||||
import com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import com.djrapitops.plan.database.databases.SQLiteDB;
|
import main.java.com.djrapitops.plan.database.databases.SQLiteDB;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package main.java.com.djrapitops.plan.command.commands.manage;
|
package main.java.com.djrapitops.plan.command.commands.manage;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.command.CommandType;
|
import main.java.com.djrapitops.plan.command.CommandType;
|
||||||
import com.djrapitops.plan.command.SubCommand;
|
import main.java.com.djrapitops.plan.command.SubCommand;
|
||||||
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.data;
|
package main.java.com.djrapitops.plan.data;
|
||||||
|
|
||||||
import main.java.com.djrapitops.plan.data.PlanLiteAnalyzedData;
|
import main.java.com.djrapitops.plan.data.PlanLiteAnalyzedData;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.djrapitops.plan.data;
|
package main.java.com.djrapitops.plan.data;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.api.Gender;
|
import main.java.com.djrapitops.plan.api.Gender;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.djrapitops.plan.data;
|
package main.java.com.djrapitops.plan.data;
|
||||||
|
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -162,17 +162,8 @@ public class UserData {
|
|||||||
this.sessions.addAll(sessions);
|
this.sessions.addAll(sessions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startSession(long startTime) {
|
public void setCurrentSession(SessionData session) {
|
||||||
currentSession = new SessionData(startTime);
|
currentSession = session;
|
||||||
}
|
|
||||||
|
|
||||||
public void endSession(long endTime) {
|
|
||||||
if (currentSession != null) {
|
|
||||||
currentSession.endSession(endTime);
|
|
||||||
addSession(currentSession);
|
|
||||||
} else {
|
|
||||||
System.out.println("Player's session was initialized in a wrong way! (" + name + ")");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateBanned(Player p) {
|
public void updateBanned(Player p) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.cache;
|
package main.java.com.djrapitops.plan.data.cache;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.AnalysisData;
|
import main.java.com.djrapitops.plan.data.AnalysisData;
|
||||||
import com.djrapitops.plan.utilities.Analysis;
|
import main.java.com.djrapitops.plan.utilities.Analysis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.data.cache;
|
package main.java.com.djrapitops.plan.data.cache;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import com.djrapitops.plan.data.*;
|
import main.java.com.djrapitops.plan.data.*;
|
||||||
import com.djrapitops.plan.data.handlers.*;
|
import main.java.com.djrapitops.plan.data.handlers.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -13,11 +13,13 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import main.java.com.djrapitops.plan.Settings;
|
import main.java.com.djrapitops.plan.Settings;
|
||||||
|
import main.java.com.djrapitops.plan.data.handlers.SessionHandler;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import static org.bukkit.Bukkit.getPlayer;
|
import static org.bukkit.Bukkit.getPlayer;
|
||||||
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -37,6 +39,7 @@ public class DataCacheHandler {
|
|||||||
private final CommandUseHandler commandUseHandler;
|
private final CommandUseHandler commandUseHandler;
|
||||||
private final PlanLiteHandler planLiteHandler;
|
private final PlanLiteHandler planLiteHandler;
|
||||||
private final KillHandler killHandler;
|
private final KillHandler killHandler;
|
||||||
|
private final SessionHandler sessionHandler;
|
||||||
private final Database db;
|
private final Database db;
|
||||||
private final NewPlayerCreator newPlayerCreator;
|
private final NewPlayerCreator newPlayerCreator;
|
||||||
|
|
||||||
@ -66,6 +69,7 @@ public class DataCacheHandler {
|
|||||||
planLiteHandler = new PlanLiteHandler(plugin);
|
planLiteHandler = new PlanLiteHandler(plugin);
|
||||||
newPlayerCreator = new NewPlayerCreator(plugin, this);
|
newPlayerCreator = new NewPlayerCreator(plugin, this);
|
||||||
killHandler = new KillHandler(plugin);
|
killHandler = new KillHandler(plugin);
|
||||||
|
sessionHandler = new SessionHandler(plugin);
|
||||||
|
|
||||||
timesSaved = 0;
|
timesSaved = 0;
|
||||||
maxPlayers = plugin.getServer().getMaxPlayers();
|
maxPlayers = plugin.getServer().getMaxPlayers();
|
||||||
@ -74,10 +78,6 @@ public class DataCacheHandler {
|
|||||||
if (minutes <= 0) {
|
if (minutes <= 0) {
|
||||||
minutes = 5;
|
minutes = 5;
|
||||||
}
|
}
|
||||||
int sMinutes = Settings.SAVE_SERVER_MIN.getNumber();
|
|
||||||
if (sMinutes <= 0) {
|
|
||||||
sMinutes = 5;
|
|
||||||
}
|
|
||||||
final int clearAfterXsaves;
|
final int clearAfterXsaves;
|
||||||
int configValue = Settings.CLEAR_CACHE_X_SAVES.getNumber();
|
int configValue = Settings.CLEAR_CACHE_X_SAVES.getNumber();
|
||||||
if (configValue <= 1) {
|
if (configValue <= 1) {
|
||||||
@ -85,7 +85,7 @@ public class DataCacheHandler {
|
|||||||
} else {
|
} else {
|
||||||
clearAfterXsaves = configValue;
|
clearAfterXsaves = configValue;
|
||||||
}
|
}
|
||||||
(new BukkitRunnable() {
|
BukkitTask asyncPeriodicCacheSaveTask = (new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
DataCacheHandler handler = plugin.getHandler();
|
DataCacheHandler handler = plugin.getHandler();
|
||||||
@ -159,27 +159,27 @@ public class DataCacheHandler {
|
|||||||
* Saves all data in the cache to Database with AsyncTasks
|
* Saves all data in the cache to Database with AsyncTasks
|
||||||
*/
|
*/
|
||||||
public void saveCachedUserData() {
|
public void saveCachedUserData() {
|
||||||
List<UserData> data = new ArrayList<>();
|
BukkitTask asyncFullCacheSaveTask = (new BukkitRunnable() {
|
||||||
data.addAll(dataCache.values());
|
@Override
|
||||||
db.saveMultipleUserData(data);
|
public void run() {
|
||||||
timesSaved++;
|
List<UserData> data = new ArrayList<>();
|
||||||
|
data.addAll(dataCache.values());
|
||||||
|
db.saveMultipleUserData(data);
|
||||||
|
timesSaved++;
|
||||||
|
this.cancel();
|
||||||
|
}
|
||||||
|
}).runTaskAsynchronously(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves all data in the cache to Database and closes the database down.
|
* Saves all data in the cache to Database and closes the database down.
|
||||||
*/
|
*/
|
||||||
public void saveCacheOnDisable() {
|
public void saveCacheOnDisable() {
|
||||||
// dataCache.keySet().stream().forEach((uuid) -> {
|
|
||||||
// if (dataCache.get(uuid) != null) {
|
|
||||||
// db.saveUserData(uuid, dataCache.get(uuid));
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
List<UserData> data = new ArrayList<>();
|
List<UserData> data = new ArrayList<>();
|
||||||
data.addAll(dataCache.values());
|
data.addAll(dataCache.values());
|
||||||
long now = new Date().toInstant().getEpochSecond() * (long) 1000;
|
data.parallelStream().forEach((userData) -> {
|
||||||
for (UserData userData : data) {
|
sessionHandler.endSession(userData);
|
||||||
userData.endSession(now);
|
});
|
||||||
}
|
|
||||||
db.saveMultipleUserData(data);
|
db.saveMultipleUserData(data);
|
||||||
db.saveCommandUse(commandUse);
|
db.saveCommandUse(commandUse);
|
||||||
db.close();
|
db.close();
|
||||||
@ -191,7 +191,7 @@ public class DataCacheHandler {
|
|||||||
* @param uuid Player's UUID
|
* @param uuid Player's UUID
|
||||||
*/
|
*/
|
||||||
public void saveCachedData(UUID uuid) {
|
public void saveCachedData(UUID uuid) {
|
||||||
(new BukkitRunnable() {
|
BukkitTask asyncCachedUserSaveTask = (new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (dataCache.get(uuid) != null) {
|
if (dataCache.get(uuid) != null) {
|
||||||
@ -209,7 +209,7 @@ public class DataCacheHandler {
|
|||||||
* Data is saved on a new line with a long value matching current Date
|
* Data is saved on a new line with a long value matching current Date
|
||||||
*/
|
*/
|
||||||
public void saveCommandUse() {
|
public void saveCommandUse() {
|
||||||
(new BukkitRunnable() {
|
BukkitTask asyncCommandUseSaveTask = (new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
db.saveCommandUse(commandUse);
|
db.saveCommandUse(commandUse);
|
||||||
@ -317,6 +317,7 @@ public class DataCacheHandler {
|
|||||||
public void newPlayer(Player player) {
|
public void newPlayer(Player player) {
|
||||||
newPlayerCreator.createNewPlayer(player);
|
newPlayerCreator.createNewPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void newPlayer(OfflinePlayer player) {
|
public void newPlayer(OfflinePlayer player) {
|
||||||
newPlayerCreator.createNewPlayer(player);
|
newPlayerCreator.createNewPlayer(player);
|
||||||
}
|
}
|
||||||
@ -380,7 +381,7 @@ public class DataCacheHandler {
|
|||||||
public KillHandler getKillHandler() {
|
public KillHandler getKillHandler() {
|
||||||
return killHandler;
|
return killHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the same value as Plan#getDB().
|
* Returns the same value as Plan#getDB().
|
||||||
*
|
*
|
||||||
@ -393,7 +394,7 @@ public class DataCacheHandler {
|
|||||||
public HashMap<String, Integer> getCommandUse() {
|
public HashMap<String, Integer> getCommandUse() {
|
||||||
return commandUse;
|
return commandUse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Current instance of ServerDataHandler
|
* @return Current instance of ServerDataHandler
|
||||||
*/
|
*/
|
||||||
@ -401,6 +402,10 @@ public class DataCacheHandler {
|
|||||||
return commandUseHandler;
|
return commandUseHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SessionHandler getSessionHandler() {
|
||||||
|
return sessionHandler;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If /reload is run this treats every online player as a new login.
|
* If /reload is run this treats every online player as a new login.
|
||||||
*
|
*
|
||||||
@ -417,8 +422,8 @@ public class DataCacheHandler {
|
|||||||
activityHandler.handleReload(player, data);
|
activityHandler.handleReload(player, data);
|
||||||
basicInfoHandler.handleReload(player, data);
|
basicInfoHandler.handleReload(player, data);
|
||||||
gamemodeTimesHandler.handleReload(player, data);
|
gamemodeTimesHandler.handleReload(player, data);
|
||||||
saveCachedData(uuid);
|
|
||||||
}
|
}
|
||||||
|
saveCachedUserData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.djrapitops.plan.data.cache;
|
package main.java.com.djrapitops.plan.data.cache;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -63,12 +63,11 @@ public class ActivityHandler {
|
|||||||
* @param data UserData matching the Player
|
* @param data UserData matching the Player
|
||||||
*/
|
*/
|
||||||
public void handleLogin(PlayerJoinEvent event, UserData data) {
|
public void handleLogin(PlayerJoinEvent event, UserData data) {
|
||||||
Date now = new Date();
|
data.setLastPlayed(new Date().getTime());
|
||||||
data.setLastPlayed(now.getTime());
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
data.updateBanned(player);
|
data.updateBanned(player);
|
||||||
data.setLoginTimes(data.getLoginTimes() + 1);
|
data.setLoginTimes(data.getLoginTimes() + 1);
|
||||||
data.startSession(now.toInstant().getEpochSecond() * (long) 1000);
|
|
||||||
// handler.getLocationHandler().addLocation(player.getUniqueId(), player.getLocation());
|
// handler.getLocationHandler().addLocation(player.getUniqueId(), player.getLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +84,7 @@ public class ActivityHandler {
|
|||||||
long timeNow = now.getTime();
|
long timeNow = now.getTime();
|
||||||
data.setPlayTime(data.getPlayTime() + (timeNow - data.getLastPlayed()));
|
data.setPlayTime(data.getPlayTime() + (timeNow - data.getLastPlayed()));
|
||||||
data.setLastPlayed(timeNow);
|
data.setLastPlayed(timeNow);
|
||||||
data.endSession(now.toInstant().getEpochSecond() * (long) 1000);
|
handler.getSessionHandler().endSession(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,6 +100,6 @@ public class ActivityHandler {
|
|||||||
long timeNow = now.getTime();
|
long timeNow = now.getTime();
|
||||||
data.setPlayTime(data.getPlayTime() + (timeNow - data.getLastPlayed()));
|
data.setPlayTime(data.getPlayTime() + (timeNow - data.getLastPlayed()));
|
||||||
data.setLastPlayed(timeNow);
|
data.setLastPlayed(timeNow);
|
||||||
data.startSession(now.toInstant().getEpochSecond() * (long) 1000);
|
handler.getSessionHandler().startSession(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
|
|
||||||
@ -32,9 +32,11 @@ public class BasicInfoHandler {
|
|||||||
*/
|
*/
|
||||||
public void handleLogin(PlayerJoinEvent event, UserData data) {
|
public void handleLogin(PlayerJoinEvent event, UserData data) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
String nick = player.getDisplayName();
|
String nickname = player.getDisplayName();
|
||||||
if (data.addNickname(nick)) {
|
if (!nickname.isEmpty()) {
|
||||||
data.setLastNick(nick);
|
if (data.addNickname(nickname)) {
|
||||||
|
data.setLastNick(nickname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
data.addIpAddress(player.getAddress().getAddress());
|
data.addIpAddress(player.getAddress().getAddress());
|
||||||
}
|
}
|
||||||
@ -46,9 +48,11 @@ public class BasicInfoHandler {
|
|||||||
* @param data UserData matching the Player
|
* @param data UserData matching the Player
|
||||||
*/
|
*/
|
||||||
public void handleReload(Player player, UserData data) {
|
public void handleReload(Player player, UserData data) {
|
||||||
String nick = player.getDisplayName();
|
String nickname = player.getDisplayName();
|
||||||
if (data.addNickname(nick)) {
|
if (!nickname.isEmpty()) {
|
||||||
data.setLastNick(nick);
|
if (data.addNickname(nickname)) {
|
||||||
|
data.setLastNick(nickname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
data.addIpAddress(player.getAddress().getAddress());
|
data.addIpAddress(player.getAddress().getAddress());
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.api.Gender;
|
import main.java.com.djrapitops.plan.api.Gender;
|
||||||
import com.djrapitops.plan.data.DemographicsData;
|
import main.java.com.djrapitops.plan.data.DemographicsData;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
package com.djrapitops.plan.data.handlers;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.Plan;
|
|
||||||
import com.djrapitops.plan.data.UserData;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import main.java.com.djrapitops.plan.data.KillData;
|
import main.java.com.djrapitops.plan.data.KillData;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import com.djrapitops.plan.data.DemographicsData;
|
import main.java.com.djrapitops.plan.data.DemographicsData;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package main.java.com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.InspectCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.InspectCacheHandler;
|
||||||
import com.djrapitops.plan.utilities.PlaceholderUtils;
|
import main.java.com.djrapitops.plan.utilities.PlaceholderUtils;
|
||||||
import com.djrapitops.planlite.UUIDFetcher;
|
import com.djrapitops.planlite.UUIDFetcher;
|
||||||
import com.djrapitops.planlite.api.DataPoint;
|
import com.djrapitops.planlite.api.DataPoint;
|
||||||
import com.djrapitops.planlite.api.DataType;
|
import com.djrapitops.planlite.api.DataType;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
import com.djrapitops.planlite.api.DataPoint;
|
import com.djrapitops.planlite.api.DataPoint;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.handlers;
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerKickEvent;
|
import org.bukkit.event.player.PlayerKickEvent;
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
package main.java.com.djrapitops.plan.data.handlers;
|
||||||
|
|
||||||
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.UUID;
|
||||||
|
import main.java.com.djrapitops.plan.data.SessionData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Rsl1122
|
||||||
|
*/
|
||||||
|
public class SessionHandler {
|
||||||
|
private final HashMap<UUID, SessionData> activeSessions;
|
||||||
|
private final DataCacheHandler handler;
|
||||||
|
private final Plan plugin;
|
||||||
|
|
||||||
|
public SessionHandler(Plan plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
this.handler = plugin.getHandler();
|
||||||
|
this.activeSessions = new HashMap<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startSession(UserData data) {
|
||||||
|
long now = new Date().toInstant().getEpochSecond() * (long) 1000;
|
||||||
|
SessionData session = new SessionData(now);
|
||||||
|
activeSessions.put(data.getUuid(), session);
|
||||||
|
data.setCurrentSession(session);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endSession (UserData data) {
|
||||||
|
UUID uuid = data.getUuid();
|
||||||
|
SessionData currentSession = activeSessions.get(uuid);
|
||||||
|
if (currentSession != null) {
|
||||||
|
long now = new Date().toInstant().getEpochSecond() * (long) 1000;
|
||||||
|
currentSession.endSession(now);
|
||||||
|
data.addSession(currentSession);
|
||||||
|
activeSessions.remove(uuid);
|
||||||
|
} else {
|
||||||
|
System.out.println("Player's session was initialized in a wrong way! (" + data.getName() + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
package main.java.com.djrapitops.plan.data.importing;
|
package main.java.com.djrapitops.plan.data.importing;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.djrapitops.plan.data.listeners;
|
package main.java.com.djrapitops.plan.data.listeners;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.data.handlers.DemographicsHandler;
|
import main.java.com.djrapitops.plan.data.handlers.DemographicsHandler;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -43,7 +43,10 @@ public class PlanChatListener implements Listener {
|
|||||||
}
|
}
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
UserData data = handler.getCurrentData(p.getUniqueId());
|
UserData data = handler.getCurrentData(p.getUniqueId());
|
||||||
data.addNickname(p.getDisplayName());
|
String nickname = p.getDisplayName();
|
||||||
|
if (!nickname.isEmpty()) {
|
||||||
|
data.addNickname(nickname);
|
||||||
|
}
|
||||||
demographicsHandler.handleChatEvent(event, data);
|
demographicsHandler.handleChatEvent(event, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.listeners;
|
package main.java.com.djrapitops.plan.data.listeners;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.data.handlers.CommandUseHandler;
|
import main.java.com.djrapitops.plan.data.handlers.CommandUseHandler;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package main.java.com.djrapitops.plan.data.listeners;
|
package main.java.com.djrapitops.plan.data.listeners;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.data.handlers.KillHandler;
|
import main.java.com.djrapitops.plan.data.handlers.KillHandler;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.djrapitops.plan.data.listeners;
|
package main.java.com.djrapitops.plan.data.listeners;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.data.handlers.GamemodeTimesHandler;
|
import main.java.com.djrapitops.plan.data.handlers.GamemodeTimesHandler;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.djrapitops.plan.data.listeners;
|
package main.java.com.djrapitops.plan.data.listeners;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.data.handlers.*;
|
import main.java.com.djrapitops.plan.data.handlers.*;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.djrapitops.plan.data.listeners;
|
package main.java.com.djrapitops.plan.data.listeners;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.cache.DataCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.DataCacheHandler;
|
||||||
import com.djrapitops.plan.data.handlers.LocationHandler;
|
import main.java.com.djrapitops.plan.data.handlers.LocationHandler;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.djrapitops.plan.database;
|
package main.java.com.djrapitops.plan.database;
|
||||||
|
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.djrapitops.plan.database.databases;
|
package main.java.com.djrapitops.plan.database.databases;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.djrapitops.plan.database.databases;
|
package main.java.com.djrapitops.plan.database.databases;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.api.Gender;
|
import main.java.com.djrapitops.plan.api.Gender;
|
||||||
import com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import com.djrapitops.plan.data.*;
|
import main.java.com.djrapitops.plan.data.*;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
@ -654,8 +654,10 @@ public abstract class SQLDB extends Database {
|
|||||||
lastNick = nickname;
|
lastNick = nickname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nicknames.remove(lastNick);
|
if (!lastNick.isEmpty()) {
|
||||||
nicknames.add(lastNick);
|
nicknames.remove(lastNick);
|
||||||
|
nicknames.add(lastNick);
|
||||||
|
}
|
||||||
set.close();
|
set.close();
|
||||||
statement.close();
|
statement.close();
|
||||||
return nicknames;
|
return nicknames;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.djrapitops.plan.database.databases;
|
package main.java.com.djrapitops.plan.database.databases;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.ui;
|
package main.java.com.djrapitops.plan.ui;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
||||||
import com.djrapitops.plan.data.cache.InspectCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.InspectCacheHandler;
|
||||||
import com.djrapitops.plan.utilities.PlaceholderUtils;
|
import main.java.com.djrapitops.plan.utilities.PlaceholderUtils;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package main.java.com.djrapitops.plan.ui;
|
package main.java.com.djrapitops.plan.ui;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package main.java.com.djrapitops.plan.ui.graphs;
|
package main.java.com.djrapitops.plan.ui.graphs;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.googlecode.charts4j.Color;
|
import com.googlecode.charts4j.Color;
|
||||||
import com.googlecode.charts4j.GCharts;
|
import com.googlecode.charts4j.GCharts;
|
||||||
import com.googlecode.charts4j.PieChart;
|
import com.googlecode.charts4j.PieChart;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.djrapitops.plan.ui.graphs;
|
package main.java.com.djrapitops.plan.ui.graphs;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.googlecode.charts4j.Color;
|
import com.googlecode.charts4j.Color;
|
||||||
import com.googlecode.charts4j.GCharts;
|
import com.googlecode.charts4j.GCharts;
|
||||||
import com.googlecode.charts4j.PieChart;
|
import com.googlecode.charts4j.PieChart;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package main.java.com.djrapitops.plan.ui.graphs;
|
package main.java.com.djrapitops.plan.ui.graphs;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
import com.googlecode.charts4j.AxisLabels;
|
import com.googlecode.charts4j.AxisLabels;
|
||||||
import com.googlecode.charts4j.AxisLabelsFactory;
|
import com.googlecode.charts4j.AxisLabelsFactory;
|
||||||
import com.googlecode.charts4j.Color;
|
import com.googlecode.charts4j.Color;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package main.java.com.djrapitops.plan.ui.tables;
|
package main.java.com.djrapitops.plan.ui.tables;
|
||||||
|
|
||||||
import com.djrapitops.plan.utilities.FormatUtils;
|
import main.java.com.djrapitops.plan.utilities.FormatUtils;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.ui.webserver;
|
package main.java.com.djrapitops.plan.ui.webserver;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.djrapitops.plan.ui.webserver;
|
package main.java.com.djrapitops.plan.ui.webserver;
|
||||||
|
|
||||||
import com.djrapitops.plan.ui.DataRequestHandler;
|
import main.java.com.djrapitops.plan.ui.DataRequestHandler;
|
||||||
import com.djrapitops.plan.utilities.UUIDFetcher;
|
import main.java.com.djrapitops.plan.utilities.UUIDFetcher;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package main.java.com.djrapitops.plan.ui.webserver;
|
package main.java.com.djrapitops.plan.ui.webserver;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.ui.DataRequestHandler;
|
import main.java.com.djrapitops.plan.ui.DataRequestHandler;
|
||||||
import com.djrapitops.plan.ui.webserver.Request;
|
import main.java.com.djrapitops.plan.ui.webserver.Request;
|
||||||
import com.djrapitops.plan.ui.webserver.Response;
|
import main.java.com.djrapitops.plan.ui.webserver.Response;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.data.AnalysisData;
|
import main.java.com.djrapitops.plan.data.AnalysisData;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.AnalysisCacheHandler;
|
||||||
import com.djrapitops.plan.data.cache.InspectCacheHandler;
|
import main.java.com.djrapitops.plan.data.cache.InspectCacheHandler;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -86,10 +86,10 @@ public class Analysis {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Create empty Dataset
|
// Create empty Dataset
|
||||||
final RawAnalysisData raw = new RawAnalysisData();
|
final RawAnalysisData sorted = new RawAnalysisData();
|
||||||
raw.setCommandUse(plugin.getDB().getCommandUse());
|
sorted.setCommandUse(plugin.getDB().getCommandUse());
|
||||||
log(Phrase.ANALYSIS_BEGIN_ANALYSIS + "");
|
log(Phrase.ANALYSIS_BEGIN_ANALYSIS + "");
|
||||||
AnalysisData data = new AnalysisData();
|
AnalysisData analysisData = new AnalysisData();
|
||||||
|
|
||||||
// DEPRECATED - WILL BE REMOVED
|
// DEPRECATED - WILL BE REMOVED
|
||||||
boolean planLiteEnabled = isPlanLiteEnabled();
|
boolean planLiteEnabled = isPlanLiteEnabled();
|
||||||
@ -102,78 +102,78 @@ public class Analysis {
|
|||||||
rawData.parallelStream().forEach((uData) -> {
|
rawData.parallelStream().forEach((uData) -> {
|
||||||
try {
|
try {
|
||||||
HashMap<GameMode, Long> gmTimes = uData.getGmTimes();
|
HashMap<GameMode, Long> gmTimes = uData.getGmTimes();
|
||||||
raw.addToGmZero(gmTimes.get(GameMode.SURVIVAL));
|
sorted.addToGmZero(gmTimes.get(GameMode.SURVIVAL));
|
||||||
raw.addToGmOne(gmTimes.get(GameMode.CREATIVE));
|
sorted.addToGmOne(gmTimes.get(GameMode.CREATIVE));
|
||||||
raw.addToGmTwo(gmTimes.get(GameMode.ADVENTURE));
|
sorted.addToGmTwo(gmTimes.get(GameMode.ADVENTURE));
|
||||||
try {
|
try {
|
||||||
Long gm = gmTimes.get(GameMode.SPECTATOR);
|
Long gm = gmTimes.get(GameMode.SPECTATOR);
|
||||||
if (gm != null) {
|
if (gm != null) {
|
||||||
raw.addGmThree(gm);
|
sorted.addGmThree(gm);
|
||||||
}
|
}
|
||||||
} catch (NoSuchFieldError e) {
|
} catch (NoSuchFieldError e) {
|
||||||
}
|
}
|
||||||
long playTime = uData.getPlayTime();
|
long playTime = uData.getPlayTime();
|
||||||
raw.addTotalPlaytime(playTime);
|
sorted.addTotalPlaytime(playTime);
|
||||||
String playerName = uData.getName();
|
String playerName = uData.getName();
|
||||||
String url = HtmlUtils.getInspectUrl(playerName);
|
String url = HtmlUtils.getInspectUrl(playerName);
|
||||||
String html = Html.BUTTON.parse(url, playerName);
|
String html = Html.BUTTON.parse(url, playerName);
|
||||||
|
|
||||||
raw.getLatestLogins().put(html, uData.getLastPlayed());
|
sorted.getLatestLogins().put(html, uData.getLastPlayed());
|
||||||
raw.addTotalLoginTimes(uData.getLoginTimes());
|
sorted.addTotalLoginTimes(uData.getLoginTimes());
|
||||||
int age = uData.getDemData().getAge();
|
int age = uData.getDemData().getAge();
|
||||||
if (age != -1) {
|
if (age != -1) {
|
||||||
raw.getAges().add(age);
|
sorted.getAges().add(age);
|
||||||
}
|
}
|
||||||
if (uData.isOp()) {
|
if (uData.isOp()) {
|
||||||
raw.addOps(1);
|
sorted.addOps(1);
|
||||||
}
|
}
|
||||||
if (uData.isBanned()) {
|
if (uData.isBanned()) {
|
||||||
raw.addTotalBanned(1);
|
sorted.addTotalBanned(1);
|
||||||
} else if (uData.getLoginTimes() == 1) {
|
} else if (uData.getLoginTimes() == 1) {
|
||||||
raw.addJoinleaver(1);
|
sorted.addJoinleaver(1);
|
||||||
} else if (AnalysisUtils.isActive(uData.getLastPlayed(), playTime, uData.getLoginTimes())) {
|
} else if (AnalysisUtils.isActive(uData.getLastPlayed(), playTime, uData.getLoginTimes())) {
|
||||||
raw.addActive(1);
|
sorted.addActive(1);
|
||||||
raw.getPlaytimes().put(html, playTime);
|
sorted.getPlaytimes().put(html, playTime);
|
||||||
} else {
|
} else {
|
||||||
raw.addInactive(1);
|
sorted.addInactive(1);
|
||||||
}
|
}
|
||||||
raw.addTotalKills(uData.getPlayerKills().size());
|
sorted.addTotalKills(uData.getPlayerKills().size());
|
||||||
raw.addTotalMobKills(uData.getMobKills());
|
sorted.addTotalMobKills(uData.getMobKills());
|
||||||
raw.addTotalDeaths(uData.getDeaths());
|
sorted.addTotalDeaths(uData.getDeaths());
|
||||||
raw.getSessiondata().addAll(uData.getSessions());
|
sorted.getSessiondata().addAll(uData.getSessions());
|
||||||
raw.getRegistered().add(uData.getRegistered());
|
sorted.getRegistered().add(uData.getRegistered());
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
plugin.logError(Phrase.DATA_CORRUPTION_WARN.parse(uData.getUuid() + ""));
|
plugin.logError(Phrase.DATA_CORRUPTION_WARN.parse(uData.getUuid() + ""));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Analyze & Save RawAnalysisData to AnalysisData
|
// Analyze & Save RawAnalysisData to AnalysisData
|
||||||
createPlayerActivityGraphs(data, raw.getSessiondata(), raw.getRegistered());
|
createPlayerActivityGraphs(analysisData, sorted.getSessiondata(), sorted.getRegistered());
|
||||||
|
|
||||||
data.setTop20ActivePlayers(AnalysisUtils.createActivePlayersTable(raw.getPlaytimes(), 20));
|
analysisData.setTop20ActivePlayers(AnalysisUtils.createActivePlayersTable(sorted.getPlaytimes(), 20));
|
||||||
data.setRecentPlayers(AnalysisUtils.createListStringOutOfHashMapLong(raw.getLatestLogins(), 20));
|
analysisData.setRecentPlayers(AnalysisUtils.createListStringOutOfHashMapLong(sorted.getLatestLogins(), 20));
|
||||||
|
|
||||||
addPlanLiteToData(planLiteEnabled, plData, factionMap, townMap, totalVotes, totalMoney, data);
|
addPlanLiteToData(planLiteEnabled, plData, factionMap, townMap, totalVotes, totalMoney, analysisData);
|
||||||
|
|
||||||
long totalPlaytime = raw.getTotalPlaytime();
|
long totalPlaytime = sorted.getTotalPlaytime();
|
||||||
data.setTotalPlayTime(totalPlaytime);
|
analysisData.setTotalPlayTime(totalPlaytime);
|
||||||
data.setAveragePlayTime(totalPlaytime / rawData.size());
|
analysisData.setAveragePlayTime(totalPlaytime / rawData.size());
|
||||||
data.setTotalLoginTimes(raw.getTotalLoginTimes());
|
analysisData.setTotalLoginTimes(sorted.getTotalLoginTimes());
|
||||||
|
|
||||||
createActivityVisalization(raw.getTotalBanned(), raw.getActive(), raw.getInactive(), raw.getJoinleaver(), data);
|
createActivityVisalization(sorted.getTotalBanned(), sorted.getActive(), sorted.getInactive(), sorted.getJoinleaver(), analysisData);
|
||||||
|
|
||||||
data.setOps(raw.getOps());
|
analysisData.setOps(sorted.getOps());
|
||||||
|
|
||||||
analyzeAverageAge(raw.getAges(), data);
|
analyzeAverageAge(sorted.getAges(), analysisData);
|
||||||
createGamemodeUsageVisualization(raw.getGmZero(), raw.getGmOne(), raw.getGmTwo(), raw.getGmThree(), data);
|
createGamemodeUsageVisualization(sorted.getGmZero(), sorted.getGmOne(), sorted.getGmTwo(), sorted.getGmThree(), analysisData);
|
||||||
createCommandUseTable(raw, data);
|
createCommandUseTable(sorted, analysisData);
|
||||||
|
|
||||||
data.setTotaldeaths(raw.getTotalDeaths());
|
analysisData.setTotaldeaths(sorted.getTotalDeaths());
|
||||||
data.setTotalkills(raw.getTotalKills());
|
analysisData.setTotalkills(sorted.getTotalKills());
|
||||||
data.setTotalmobkills(raw.getTotalMobKills());
|
analysisData.setTotalmobkills(sorted.getTotalMobKills());
|
||||||
|
|
||||||
data.setRefreshDate(new Date().getTime());
|
analysisData.setRefreshDate(new Date().getTime());
|
||||||
analysisCache.cache(data);
|
analysisCache.cache(analysisData);
|
||||||
plugin.log(Phrase.ANALYSIS_COMPLETE + "");
|
plugin.log(Phrase.ANALYSIS_COMPLETE + "");
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.djrapitops.plan.ui.graphs.GMTimesPieChartCreator;
|
import main.java.com.djrapitops.plan.ui.graphs.GMTimesPieChartCreator;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package main.java.com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.data.DemographicsData;
|
import main.java.com.djrapitops.plan.data.DemographicsData;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import main.java.com.djrapitops.plan.ui.Html;
|
import main.java.com.djrapitops.plan.ui.Html;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package main.java.com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.djrapitops.plan.Phrase;
|
import main.java.com.djrapitops.plan.Phrase;
|
||||||
import com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import com.djrapitops.plan.PlanLiteHook;
|
import main.java.com.djrapitops.plan.PlanLiteHook;
|
||||||
import com.djrapitops.plan.data.AnalysisData;
|
import main.java.com.djrapitops.plan.data.AnalysisData;
|
||||||
import com.djrapitops.plan.data.UserData;
|
import main.java.com.djrapitops.plan.data.UserData;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import main.java.com.djrapitops.plan.Settings;
|
import main.java.com.djrapitops.plan.Settings;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
package com.djrapitops.plan.utilities;
|
package main.java.com.djrapitops.plan.utilities;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
|
@ -13,7 +13,6 @@ Settings:
|
|||||||
ClearFromInspectCacheAfterXMinutes: 5
|
ClearFromInspectCacheAfterXMinutes: 5
|
||||||
DataCache:
|
DataCache:
|
||||||
SaveEveryXMinutes: 2
|
SaveEveryXMinutes: 2
|
||||||
SaveServerDataEveryXMinutes: 1
|
|
||||||
ClearCacheEveryXSaves: 5
|
ClearCacheEveryXSaves: 5
|
||||||
WebServer:
|
WebServer:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Loading…
Reference in New Issue
Block a user