mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
parent
446af674b8
commit
a35e4fe940
@ -51,4 +51,9 @@ public class SessionData {
|
|||||||
public long getSessionEnd() {
|
public long getSessionEnd() {
|
||||||
return sessionEnd;
|
return sessionEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "s:" + sessionStart + " e:" + sessionEnd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -681,15 +681,12 @@ public class UserData {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final UserData other = (UserData) obj;
|
final UserData other = (UserData) obj;
|
||||||
if (this.accessing != other.accessing) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.registered != other.registered) {
|
if (this.registered != other.registered) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.lastPlayed != other.lastPlayed) {
|
// if (this.lastPlayed != other.lastPlayed) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
if (this.playTime != other.playTime) {
|
if (this.playTime != other.playTime) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -354,15 +354,6 @@ public class DataCacheHandler {
|
|||||||
return killHandler;
|
return killHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the same value as Plan#getDB().
|
|
||||||
*
|
|
||||||
* @return Current instance of the Database,
|
|
||||||
*/
|
|
||||||
public Database getDB() {
|
|
||||||
return db;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -33,7 +33,7 @@ public class ActivityHandler {
|
|||||||
* @return true if data is not found.
|
* @return true if data is not found.
|
||||||
*/
|
*/
|
||||||
public boolean isFirstTimeJoin(UUID uuid) {
|
public boolean isFirstTimeJoin(UUID uuid) {
|
||||||
return !handler.getDB().wasSeenBefore(uuid);
|
return !plugin.getDB().wasSeenBefore(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +43,7 @@ public class HtmlUtils {
|
|||||||
*/
|
*/
|
||||||
public static String replacePlaceholders(String html, HashMap<String, String> replaceMap) {
|
public static String replacePlaceholders(String html, HashMap<String, String> replaceMap) {
|
||||||
for (String key : replaceMap.keySet()) {
|
for (String key : replaceMap.keySet()) {
|
||||||
html = html.replaceAll(key, replaceMap.get(key));
|
html = html.replace(key, replaceMap.get(key));
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ public class HtmlUtils {
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
static String removeXSS(String string) {
|
public static String removeXSS(String string) {
|
||||||
return string.replaceAll("<!--", "")
|
return string.replaceAll("<!--", "")
|
||||||
.replaceAll("-->", "")
|
.replaceAll("-->", "")
|
||||||
.replaceAll("<script>", "")
|
.replaceAll("<script>", "")
|
||||||
|
Loading…
Reference in New Issue
Block a user