From 01d904c7d132d17adfe4474340126ebc91039987 Mon Sep 17 00:00:00 2001
From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
Date: Sat, 23 Sep 2023 22:24:34 +0300
Subject: [PATCH] 2905/remove old web files (#3225)
* Removed Plugin.Use_Legacy_Frontend feature flag
* Remove version modal html generation in Java
* Remove contributor list html generation in Java
* Remove more html generation in Java
* Delete old web file bundle
* Removed locale html/js translation from backend
* Move Html#swapColorsToSpan to the React side
* Reimplement datatables and backend for preferences
* Load preferences from backend
* Usability fixes to the players table
* Delete WebAssetVersionCheckTask
* Add new locale to locale files
* Export defaultPreferences as json on react export
Affects issues:
- Close #2905
---
.../djrapitops/plan/extension/icon/Icon.java | 15 +
.../plan/extension/table/Table.java | 52 +-
.../plan/modules/bukkit/BukkitTaskModule.java | 5 -
.../plan/modules/bungee/BungeeTaskModule.java | 5 -
Plan/common/build.gradle | 5 +
.../domain/datatransfer/PlayerListDto.java | 51 +
.../domain/datatransfer/TablePlayerDto.java | 174 +
.../extension/ExtensionTabDataDto.java | 38 +-
.../datatransfer/extension/TableDto.java | 43 +-
.../preferences/GraphThresholds.java | 70 +
.../datatransfer/preferences/Preferences.java | 212 +
.../datatransfer/preferences/TimeFormat.java | 210 +
.../plan/delivery/export/ExportScheduler.java | 6 -
.../delivery/export/NetworkPageExporter.java | 114 +-
.../delivery/export/PlayerPageExporter.java | 100 +-
.../delivery/export/PlayersPageExporter.java | 107 +-
.../plan/delivery/export/ReactExporter.java | 1 +
.../delivery/export/ServerPageExporter.java | 112 +-
.../plan/delivery/formatting/Formatters.java | 15 +
.../delivery/rendering/html/Contributors.java | 30 +-
.../plan/delivery/rendering/html/Html.java | 137 +-
.../html/structure/DynamicHtmlTable.java | 115 -
.../rendering/html/structure/HtmlTable.java | 122 -
.../structure/HtmlTableWithColoredHeader.java | 99 -
.../rendering/html/structure/NavLink.java | 78 -
.../rendering/html/structure/TabsElement.java | 92 -
.../delivery/rendering/json/JSONFactory.java | 8 +-
.../rendering/json/PlayerJSONCreator.java | 4 +-
.../json/PlayersTableJSONCreator.java | 44 +-
.../rendering/pages/ErrorMessagePage.java | 4 -
.../rendering/pages/InternalErrorPage.java | 4 -
.../delivery/rendering/pages/LoginPage.java | 76 -
.../delivery/rendering/pages/NetworkPage.java | 141 -
.../delivery/rendering/pages/PageFactory.java | 152 +-
.../delivery/rendering/pages/PlayerPage.java | 127 -
.../rendering/pages/PlayerPluginTab.java | 252 -
.../delivery/rendering/pages/PlayersPage.java | 73 -
.../delivery/rendering/pages/QueryPage.java | 64 -
.../delivery/rendering/pages/ServerPage.java | 137 -
.../rendering/pages/ServerPluginTabs.java | 263 -
.../web/WebAssetVersionCheckTask.java | 145 -
.../delivery/webserver/ResponseFactory.java | 42 +-
.../delivery/webserver/WebServerSystem.java | 27 +-
.../plan/delivery/webserver/cache/DataID.java | 1 +
.../resolver/PlayerPageResolver.java | 8 -
.../resolver/json/PlayersJSONResolver.java | 122 +
.../json/PlayersTableJSONResolver.java | 12 +-
.../resolver/json/QueryJSONResolver.java | 5 +-
.../resolver/json/RootJSONResolver.java | 14 +-
.../metadata/PreferencesJSONResolver.java | 86 +
.../StorePreferencesJSONResolver.java | 87 +
.../results/ExtensionComponentData.java | 9 -
.../results/ExtensionStringData.java | 18 +-
.../results/ExtensionTableData.java | 5 -
.../plan/settings/config/PlanConfig.java | 34 +
.../settings/config/ResourceSettings.java | 5 -
.../config/changes/ConfigUpdater.java | 3 +
.../config/paths/CustomizedFileSettings.java | 2 -
.../settings/config/paths/PluginSettings.java | 1 -
.../plan/settings/locale/Locale.java | 103 +-
.../settings/locale/TranslatedString.java | 133 -
.../plan/settings/locale/lang/HtmlLang.java | 4 +
.../database/queries/LargeStoreQueries.java | 17 +
.../queries/objects/WebUserQueries.java | 25 +
.../database/sql/tables/SecurityTable.java | 16 +-
.../sql/tables/WebUserPreferencesTable.java | 58 +
.../transactions/BackupCopyTransaction.java | 1 +
.../StoreWebUserPreferencesTransaction.java | 60 +
.../commands/RemoveEverythingTransaction.java | 1 +
.../init/CreateTablesTransaction.java | 4 +
.../patches/SecurityTableGroupPatch.java | 10 +
.../patches/SecurityTableIdPatch.java | 116 +
.../djrapitops/plan/utilities/java/Maps.java | 4 +-
.../plan/version/VersionChecker.java | 45 -
.../assets/plan/locale/locale_CN.yml | 4 +
.../assets/plan/locale/locale_CS.yml | 4 +
.../assets/plan/locale/locale_DE.yml | 4 +
.../assets/plan/locale/locale_EN.yml | 4 +
.../assets/plan/locale/locale_ES.yml | 4 +
.../assets/plan/locale/locale_FI.yml | 4 +
.../assets/plan/locale/locale_FR.yml | 4 +
.../assets/plan/locale/locale_IT.yml | 4 +
.../assets/plan/locale/locale_JA.yml | 4 +
.../assets/plan/locale/locale_KO.yml | 4 +
.../assets/plan/locale/locale_NL.yml | 4 +
.../assets/plan/locale/locale_PT_BR.yml | 4 +
.../assets/plan/locale/locale_RU.yml | 4 +
.../assets/plan/locale/locale_TR.yml | 4 +
.../assets/plan/locale/locale_ZH_TW.yml | 4 +
.../resources/assets/plan/web/css/noauth.css | 3 -
.../assets/plan/web/css/querybutton.css | 3 -
.../assets/plan/web/css/sb-admin-2.css | 3291 ---------
.../resources/assets/plan/web/css/style.css | 1287 ----
.../main/resources/assets/plan/web/error.html | 77 -
.../resources/assets/plan/web/favicon.ico | Bin 1150 -> 0 bytes
.../assets/plan/web/img/Flaticon_circle.png | Bin 18687 -> 0 bytes
.../assets/plan/web/js/color-selector.js | 498 --
.../resources/assets/plan/web/js/domUtils.js | 38 -
.../resources/assets/plan/web/js/filters.js | 274 -
.../resources/assets/plan/web/js/graphs.js | 831 ---
.../assets/plan/web/js/localeSystem.js | 126 -
.../resources/assets/plan/web/js/logonsine.js | 75 -
.../assets/plan/web/js/network-values.js | 677 --
.../resources/assets/plan/web/js/pingTable.js | 26 -
.../assets/plan/web/js/player-values.js | 236 -
.../resources/assets/plan/web/js/query.js | 541 --
.../assets/plan/web/js/sb-admin-2.js | 138 -
.../assets/plan/web/js/server-values.js | 608 --
.../assets/plan/web/js/sessionAccordion.js | 130 -
.../assets/plan/web/js/xmlhttprequests.js | 136 -
.../main/resources/assets/plan/web/login.html | 241 -
.../resources/assets/plan/web/network.html | 1167 ----
.../resources/assets/plan/web/player.html | 782 ---
.../resources/assets/plan/web/players.html | 312 -
.../main/resources/assets/plan/web/query.html | 376 --
.../resources/assets/plan/web/register.html | 237 -
.../main/resources/assets/plan/web/robots.txt | 2 -
.../resources/assets/plan/web/server.html | 1478 -----
.../web/vendor/datatables/datatables.min.css | 22 -
.../web/vendor/datatables/datatables.min.js | 278 -
.../web/vendor/fontawesome-free/LICENSE.txt | 34 -
.../web/vendor/fontawesome-free/README.md | 38 -
.../web/vendor/fontawesome-free/css/all.css | 5905 -----------------
.../vendor/fontawesome-free/css/all.min.css | 5 -
.../vendor/fontawesome-free/css/v4-shims.css | 2785 --------
.../fontawesome-free/css/v4-shims.min.css | 5 -
.../web/vendor/fontawesome-free/package.json | 84 -
.../webfonts/fa-brands-400.eot | Bin 131930 -> 0 bytes
.../webfonts/fa-brands-400.ttf | Bin 131624 -> 0 bytes
.../webfonts/fa-brands-400.woff | Bin 89100 -> 0 bytes
.../webfonts/fa-brands-400.woff2 | Bin 75936 -> 0 bytes
.../webfonts/fa-regular-400.eot | Bin 34390 -> 0 bytes
.../webfonts/fa-regular-400.ttf | Bin 34092 -> 0 bytes
.../webfonts/fa-regular-400.woff | Bin 16800 -> 0 bytes
.../webfonts/fa-regular-400.woff2 | Bin 13576 -> 0 bytes
.../webfonts/fa-solid-900.eot | Bin 194066 -> 0 bytes
.../webfonts/fa-solid-900.ttf | Bin 193780 -> 0 bytes
.../webfonts/fa-solid-900.woff | Bin 98996 -> 0 bytes
.../webfonts/fa-solid-900.woff2 | Bin 76084 -> 0 bytes
.../vendor/fullcalendar/fullcalendar.min.css | 6 -
.../vendor/fullcalendar/fullcalendar.min.js | 7 -
.../plan/web/vendor/highcharts/highcharts.js | 795 ---
.../web/vendor/highcharts/mapdata/world.js | 2 -
.../vendor/highcharts/modules/drilldown.js | 34 -
.../plan/web/vendor/highcharts/modules/map.js | 153 -
.../highcharts/modules/no-data-to-display.js | 15 -
.../web/vendor/masonry/masonry.pkgd.min.js | 9 -
.../assets/plan/web/vendor/momentjs/ender.js | 1 -
.../assets/plan/web/vendor/momentjs/moment.js | 4204 ------------
.../plan/web/vendor/momentjs/package.js | 11 -
.../delivery/rendering/html/HtmlTest.java | 78 -
.../html/structure/HtmlTableTest.java | 81 -
.../delivery/webserver/AccessControlTest.java | 7 +-
.../AccessControlVisibilityTest.java | 2 +-
.../webserver/HttpAccessControlTest.java | 1 +
.../webserver/JSErrorRegressionTest.java | 25 +-
.../database/DBPatchMySQLRegressionTest.java | 16 +-
.../database/DBPatchSQLiteRegressionTest.java | 9 +-
.../database/queries/DatabaseBackupTest.java | 8 +
.../queries/ExtensionsDatabaseTest.java | 43 +-
.../database/queries/WebUserQueriesTest.java | 33 +-
.../src/test/java/utilities/DBPreparer.java | 51 +-
.../plan/modules/nukkit/NukkitTaskModule.java | 5 -
Plan/react/dashboard/package.json | 5 +-
Plan/react/dashboard/src/App.js | 21 +-
.../components/cards/common/PlayerListCard.js | 101 +-
.../components/cards/player/NicknamesCard.js | 3 +-
.../components/extensions/ExtensionCard.js | 30 +-
.../components/extensions/ExtensionTable.js | 27 +-
.../src/components/input/SearchField.js | 36 +
.../dashboard/src/components/input/Select.js | 6 +-
.../components/layout/CollapseWithButton.js | 11 +-
.../src/components/navigation/Header.js | 3 +-
.../src/components/table/DataTablesTable.js | 299 +-
.../src/components/text/ColoredText.js | 81 +
.../src/components/text/FormattedDate.js | 43 +
.../src/components/text/FormattedTime.js | 29 +
.../dashboard/src/hooks/preferencesHook.js | 59 +
.../dashboard/src/service/metadataService.js | 14 +-
.../dashboard/src/service/serverService.js | 19 +
Plan/react/dashboard/src/style/style.css | 36 +-
.../src/util/format/SimpleDateFormat.js | 362 +
.../src/util/format/TimeAmountFormat.js | 128 +
.../dashboard/src/views/players/AllPlayers.js | 4 +-
.../src/views/server/ServerPlayers.js | 4 +-
Plan/react/dashboard/yarn.lock | 5678 +++++++++-------
.../plan/modules/sponge/SpongeTaskModule.java | 5 -
.../modules/velocity/VelocityTaskModule.java | 5 -
188 files changed, 6223 insertions(+), 33768 deletions(-)
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/datatransfer/PlayerListDto.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/datatransfer/TablePlayerDto.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/datatransfer/preferences/GraphThresholds.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/datatransfer/preferences/Preferences.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/domain/datatransfer/preferences/TimeFormat.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/structure/DynamicHtmlTable.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/structure/HtmlTable.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/structure/HtmlTableWithColoredHeader.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/structure/NavLink.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/structure/TabsElement.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/LoginPage.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/NetworkPage.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/PlayerPage.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/PlayerPluginTab.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/PlayersPage.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/QueryPage.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/ServerPage.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/pages/ServerPluginTabs.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/web/WebAssetVersionCheckTask.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/json/PlayersJSONResolver.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/json/metadata/PreferencesJSONResolver.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/json/metadata/StorePreferencesJSONResolver.java
delete mode 100644 Plan/common/src/main/java/com/djrapitops/plan/settings/locale/TranslatedString.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/storage/database/sql/tables/WebUserPreferencesTable.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/StoreWebUserPreferencesTransaction.java
create mode 100644 Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/patches/SecurityTableIdPatch.java
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/css/noauth.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/css/querybutton.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/css/sb-admin-2.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/css/style.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/favicon.ico
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/img/Flaticon_circle.png
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/color-selector.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/domUtils.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/filters.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/graphs.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/localeSystem.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/logonsine.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/network-values.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/pingTable.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/player-values.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/query.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/sb-admin-2.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/server-values.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/sessionAccordion.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/js/xmlhttprequests.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/login.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/network.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/player.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/players.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/query.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/register.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/robots.txt
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/server.html
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/datatables/datatables.min.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/datatables/datatables.min.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/LICENSE.txt
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/README.md
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/css/all.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/css/all.min.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/css/v4-shims.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/css/v4-shims.min.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/package.json
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-brands-400.eot
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-brands-400.ttf
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-brands-400.woff
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-brands-400.woff2
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-regular-400.eot
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-regular-400.ttf
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-regular-400.woff
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-regular-400.woff2
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-solid-900.eot
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-solid-900.ttf
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-solid-900.woff
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fontawesome-free/webfonts/fa-solid-900.woff2
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fullcalendar/fullcalendar.min.css
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/fullcalendar/fullcalendar.min.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/highcharts/highcharts.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/highcharts/mapdata/world.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/highcharts/modules/drilldown.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/highcharts/modules/map.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/highcharts/modules/no-data-to-display.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/masonry/masonry.pkgd.min.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/momentjs/ender.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/momentjs/moment.js
delete mode 100644 Plan/common/src/main/resources/assets/plan/web/vendor/momentjs/package.js
delete mode 100644 Plan/common/src/test/java/com/djrapitops/plan/delivery/rendering/html/HtmlTest.java
delete mode 100644 Plan/common/src/test/java/com/djrapitops/plan/delivery/rendering/html/structure/HtmlTableTest.java
create mode 100644 Plan/react/dashboard/src/components/input/SearchField.js
create mode 100644 Plan/react/dashboard/src/components/text/ColoredText.js
create mode 100644 Plan/react/dashboard/src/components/text/FormattedDate.js
create mode 100644 Plan/react/dashboard/src/components/text/FormattedTime.js
create mode 100644 Plan/react/dashboard/src/hooks/preferencesHook.js
create mode 100644 Plan/react/dashboard/src/util/format/SimpleDateFormat.js
create mode 100644 Plan/react/dashboard/src/util/format/TimeAmountFormat.js
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