Skip to content

5.4 DEV build 1619

Pre-release
Pre-release
Compare
Choose a tag to compare
@AuroraLS3 AuroraLS3 released this 11 Apr 16:12
· 1272 commits to master since this release

5.4 DEV build 1619

This dev release contains beginning of Frontend BETA, breaking database schema changes for optimizations, and small fixes.

Special thanks to Kopo & Pingger for contributions to this update.

⚠️ This update is backwards incompatible due to schema changes.
How to prepare for this update - If you want to go back to previous version you will need to restore from database backup.

Make sure to update all servers that are connected to the database! If an old version starts with the new database schema it will attempt to reverse some of the new changes.

Changes from DEV build 1616

  • Fixed issues with user_id not null constraint violation due to transaction execution order

Change log

Database optimizations (Schema changes)

These schema changes are made in bulk now so that servers unable to update to Java 11 before 5.5 will remain compatible database wise.

  • Schema changes in order to optimize query speed and database size
    image
  • If you're using these columns via Query API you can replace your use case:
    • If you need uuid in ResultSet, use SELECT u.uuid ... JOIN plan_users u on u.id=<table>.user_id
    • If you have uuid or server uuid in WHERE, use server_id=(SELECT id FROM plan_servers WHERE uuid='<server uuid>')
  • Some queries that were identified as slow were optimized to perform better by changing the query
    • Geolocation query
    • Ping / country table query
    • Player table query (/players page loading time improved from 2+ minutes -> 5 seconds with 17k players)
    • Other queries are also sped up by the uuid -> user_id and server_uuid -> server_id changes since MySQL doesn't need to compare Strings
  • Extension data insert was made faster by keeping icon ids in memory
  • MySQL insert performance may be improved since auto-commit was turned off
  • Query page queries now use user ids instead of uuids - this fixes 'Max SQL size exceeded' issues.
  • Added a new index to plan_ping table to speed up ping queries.
  • Removed redundant uuid indexes that are now replaced with foreign key indexes for user_id and server_id

Frontend BETA (Opt-in)

Frontend is being rewritten in React one page at a time. This is to have more control over what is displayed on the website, since a lot of requested features will require more interaction or hiding features partially. - While doable with vanilla javascript, code would quickly become unmaintainable.

The goal is to get feature parity with the current frontend implementation by rewriting one page at a time and then switch over completely.

Some features will not use React frontend until everything is complete.

  • To Opt-in set Plugin.Frontend_BETA to true
  • Player page has been rewritten in React, other pages still use previous implementation.
  • Html Customization is currently incompatible with the beta and is disabled automatically.
  • Export is currently incompatible with the beta and old pages continue to be exported even if beta is enabled.
  • Automated browser testing was improved a lot and all pages are now tested for basic javascript errors.

Config

  • Default Player head image address was changed from cravatar to crafatar. Remove the whole row from the config and reload Plan if you wish to use the new setting.

Locale

Kopo did a massive locale system improvement in order to support translations on the frontend side, implementing yml conversion, namespacing all of the existing locale keys and writing json endpoints for frontend to load locale - as well as the code responsible for loading those using i18next.

  • Locale files now use .yml format. Any locale files you may be using are converted automatically.
  • The new React Frontend allows changing language on the frontend on a per-user basis with a dropdown menu - This is currently only available on the rewritten pages (player page)
    image

Export

  • Players page is now exported more frequently
  • Exported pages should no longer show the Logout button

Extensions

  • Essentials Economy was split from Essentials Extension. Now there are 2 extensions managed separately. This was done since the economy calls were triggering updates too frequently. If you have disabled Essentials Extension you may need to disable EssentialsEco Extension separately
  • Fixed NPE related to LuckPerms Extension
  • Fixed SQL syntax error related to LuckPerms Extension
  • Fixed issues with KingdomsX Extension when using newer version of KingdomsX (They changed names of some of their packages)
  • Pingger added support for 1.18 stone blocks to LogBlock Extension

QoL changes

  • /plan servers command now lists Plan version on each server so it is easier to keep track of servers being out of date.

Bugfixes

  • Fixed negative register dates in player dat files breaking the database
  • Fixed ConcurrentModificationException related to AFK tracker
  • Prevented use of incorrectly formatted WorldAlias regex settings
  • Fixed Plan failing to enable if database query took too long during enable.