mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-23 09:37:54 +01:00
Removes private at Enum constructors (because they aren't needed at all)
This commit is contained in:
parent
0b0c9c6610
commit
28c3db5da0
@ -29,7 +29,7 @@ public enum Permissions {
|
||||
|
||||
private final String permission;
|
||||
|
||||
private Permissions(String permission) {
|
||||
Permissions(String permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
|
@ -177,12 +177,12 @@ public enum Phrase {
|
||||
private String text;
|
||||
private ChatColor color;
|
||||
|
||||
private Phrase(String text) {
|
||||
Phrase(String text) {
|
||||
this.text = text;
|
||||
this.color = null;
|
||||
}
|
||||
|
||||
private Phrase(ChatColor color) {
|
||||
Phrase(ChatColor color) {
|
||||
this.color = color;
|
||||
this.text = "";
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public enum Settings {
|
||||
private final String configPath;
|
||||
private Boolean value;
|
||||
|
||||
private Settings(String path) {
|
||||
Settings(String path) {
|
||||
this.configPath = path;
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,7 @@ public class KillData {
|
||||
if (this.date != other.date) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.weapon, other.weapon)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.victim, other.victim);
|
||||
return Objects.equals(this.weapon, other.weapon) && Objects.equals(this.victim, other.victim);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -106,10 +106,7 @@ public class SessionData {
|
||||
return false;
|
||||
}
|
||||
final SessionData other = (SessionData) obj;
|
||||
if (this.sessionStart != other.sessionStart) {
|
||||
return false;
|
||||
}
|
||||
return this.sessionEnd == other.sessionEnd;
|
||||
return this.sessionStart == other.sessionStart && this.sessionEnd == other.sessionEnd;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,10 +81,7 @@ public class TPS {
|
||||
if (this.date != other.date) {
|
||||
return false;
|
||||
}
|
||||
if (Double.doubleToLongBits(this.tps) != Double.doubleToLongBits(other.tps)) {
|
||||
return false;
|
||||
}
|
||||
return this.players == other.players;
|
||||
return Double.doubleToLongBits(this.tps) == Double.doubleToLongBits(other.tps) && this.players == other.players;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -806,10 +806,7 @@ public class UserData {
|
||||
if (!Objects.equals(this.gmTimes, other.gmTimes)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.playerKills, other.playerKills)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.sessions, other.sessions);
|
||||
return Objects.equals(this.playerKills, other.playerKills) && Objects.equals(this.sessions, other.sessions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,17 +104,17 @@ public enum AnalysisType {
|
||||
private final String modifier;
|
||||
private final String placeholderModifier;
|
||||
|
||||
private AnalysisType(String placeholderModifier, String modifier) {
|
||||
AnalysisType(String placeholderModifier, String modifier) {
|
||||
this.placeholderModifier = placeholderModifier;
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
private AnalysisType(String placeholderModifier) {
|
||||
AnalysisType(String placeholderModifier) {
|
||||
this.placeholderModifier = placeholderModifier;
|
||||
this.modifier = "";
|
||||
}
|
||||
|
||||
private AnalysisType() {
|
||||
AnalysisType() {
|
||||
this.placeholderModifier = "";
|
||||
this.modifier = "";
|
||||
}
|
||||
|
@ -300,10 +300,7 @@ public abstract class PluginData {
|
||||
if (!Objects.equals(this.placeholder, other.placeholder)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.sourcePlugin, other.sourcePlugin)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.analysisTypes, other.analysisTypes);
|
||||
return Objects.equals(this.sourcePlugin, other.sourcePlugin) && Objects.equals(this.analysisTypes, other.analysisTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -362,7 +362,7 @@ public class DataCacheHandler extends SessionCache {
|
||||
if (unsavedTPSHistory.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<List<TPS>> copy = new ArrayList<>(unsavedTPSHistory);;
|
||||
List<List<TPS>> copy = new ArrayList<>(unsavedTPSHistory);
|
||||
for (List<TPS> history : copy) {
|
||||
final long lastdate = history.get(history.size() - 1).getDate();
|
||||
final double averageTPS = MathUtils.averageDouble(history.stream().map(TPS::getTps));
|
||||
|
@ -49,5 +49,5 @@ public enum InfoType {
|
||||
*
|
||||
* @since 3.1.1
|
||||
*/
|
||||
OTHER;
|
||||
OTHER
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public enum Html {
|
||||
|
||||
private String html;
|
||||
|
||||
private Html(String html) {
|
||||
Html(String html) {
|
||||
this.html = html;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user