diff --git a/Plan/api/src/main/java/com/djrapitops/plan/extension/icon/Icon.java b/Plan/api/src/main/java/com/djrapitops/plan/extension/icon/Icon.java
index cb0f23465..f881433b5 100644
--- a/Plan/api/src/main/java/com/djrapitops/plan/extension/icon/Icon.java
+++ b/Plan/api/src/main/java/com/djrapitops/plan/extension/icon/Icon.java
@@ -16,6 +16,8 @@
*/
package com.djrapitops.plan.extension.icon;
+import java.util.Objects;
+
/**
* Object that represents an icon on the website.
*
@@ -72,6 +74,19 @@ public class Icon {
return this;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ Icon icon = (Icon) o;
+ return type == icon.type && Objects.equals(getName(), icon.getName()) && getColor() == icon.getColor();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, type, getName(), getColor());
+ }
+
@Override
public String toString() {
return "Icon{" + type.name() + ", '" + name + '\'' + ", " + color.name() + '}';
diff --git a/Plan/api/src/main/java/com/djrapitops/plan/extension/table/Table.java b/Plan/api/src/main/java/com/djrapitops/plan/extension/table/Table.java
index a8f941345..4c0751a43 100644
--- a/Plan/api/src/main/java/com/djrapitops/plan/extension/table/Table.java
+++ b/Plan/api/src/main/java/com/djrapitops/plan/extension/table/Table.java
@@ -21,10 +21,8 @@ import com.djrapitops.plan.extension.icon.Color;
import com.djrapitops.plan.extension.icon.Icon;
import org.apache.commons.lang3.StringUtils;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
+import java.util.stream.Collectors;
/**
* Object for giving Plan table data.
@@ -100,6 +98,52 @@ public final class Table {
return tableColumnFormats;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ Table table = (Table) o;
+ return Arrays.equals(getColumns(), table.getColumns())
+ && Arrays.equals(getIcons(), table.getIcons())
+ && Arrays.equals(getTableColumnFormats(), table.getTableColumnFormats())
+ && valuesEqual(table);
+ }
+
+ private boolean valuesEqual(Table other) {
+ List