summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java21
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java21
2 files changed, 42 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
index 11713357..239ceca0 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
@@ -113,4 +113,25 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
return getScoreboard();
}
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 31 * hash + (this.objective != null ? this.objective.hashCode() : 0);
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final CraftObjective other = (CraftObjective) obj;
+ return !(this.objective != other.objective && (this.objective == null || !this.objective.equals(other.objective)));
+ }
+
+
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 5584353b..c4db4621 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -194,4 +194,25 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
return getScoreboard();
}
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 43 * hash + (this.team != null ? this.team.hashCode() : 0);
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final CraftTeam other = (CraftTeam) obj;
+ return !(this.team != other.team && (this.team == null || !this.team.equals(other.team)));
+ }
+
+
}