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