Fix #45 & small things

- Fixed Equals method for UserData
This commit is contained in:
Rsl1122 2017-03-11 09:31:54 +02:00
parent 446af674b8
commit a35e4fe940
5 changed files with 11 additions and 18 deletions

View File

@ -51,4 +51,9 @@ public class SessionData {
public long getSessionEnd() {
return sessionEnd;
}
@Override
public String toString() {
return "s:" + sessionStart + " e:" + sessionEnd;
}
}

View File

@ -681,15 +681,12 @@ public class UserData {
return false;
}
final UserData other = (UserData) obj;
if (this.accessing != other.accessing) {
return false;
}
if (this.registered != other.registered) {
return false;
}
if (this.lastPlayed != other.lastPlayed) {
return false;
}
// if (this.lastPlayed != other.lastPlayed) {
// return false;
// }
if (this.playTime != other.playTime) {
return false;
}

View File

@ -354,15 +354,6 @@ public class DataCacheHandler {
return killHandler;
}
/**
* Returns the same value as Plan#getDB().
*
* @return Current instance of the Database,
*/
public Database getDB() {
return db;
}
/**
*
* @return

View File

@ -33,7 +33,7 @@ public class ActivityHandler {
* @return true if data is not found.
*/
public boolean isFirstTimeJoin(UUID uuid) {
return !handler.getDB().wasSeenBefore(uuid);
return !plugin.getDB().wasSeenBefore(uuid);
}
/**

View File

@ -43,7 +43,7 @@ public class HtmlUtils {
*/
public static String replacePlaceholders(String html, HashMap<String, String> replaceMap) {
for (String key : replaceMap.keySet()) {
html = html.replaceAll(key, replaceMap.get(key));
html = html.replace(key, replaceMap.get(key));
}
return html;
}
@ -81,7 +81,7 @@ public class HtmlUtils {
return url;
}
static String removeXSS(String string) {
public static String removeXSS(String string) {
return string.replaceAll("<!--", "")
.replaceAll("-->", "")
.replaceAll("<script>", "")