Commit Graph

65 Commits

Author SHA1 Message Date
Henri Schubin c49276369f
Component API by Vankka (#2665)
Adds a new Component API that allows converting between color code representations in Strings
2022-10-16 13:21:49 +03:00
Aurora Lahtela 7b41165af5 Add /plan db migrate_to_online_uuids command 2022-08-21 12:19:52 +03:00
Aurora Lahtela 703c1bdbba Fix Velocity not loading slf4j logger properly
- Applied relocation hack suggested by Vankka
- Removed metrics for velocity (They were using the unrelocated logger, but there was no way to unrelocate it)

Affects issues:
- Fixed #2497
2022-08-17 13:41:59 +03:00
Aurora Lahtela b0be4f296d Use plugin classloader for thread context when initializing system
This allows ServiceLoader to find slf4j-nop provider for Jetty
preventing SLF4J "No provider" error

Affects issues:
- Fixed #2438
2022-07-15 08:21:23 +03:00
Aurora Lahtela 8f239b010c
Add Swagger & Swagger UI (#2470)
* Adds swagger dependencies and annotations for json endpoints for documentation
* Add swagger ui to react project
* Access control to swagger endpoints
* Include swagger.json in jars using custom configuration

Also:
* Reworked project shadow configurations to avoid shadowing shadow versions of modules

Why: Extra dependencies were being included when using shadow scope

What:
- modules no longer depend on shadow configurations,
  which speeds up IDEA indexing after build considerably
  (No need to index *-all.jars)
- 'shadow' scope is now used for artifacts that need to be included
- 'shadow' scope is also 'api' so that modules that depend on common
  can import the libraries. This may cause issues in projects
  depending on Plan so this may need to be reconsidered
- Relocations and exclusions were moved to plugin module
  org.slf4j is now included in 2 locations which may cause issues.
  Needs testing with servers
- Found out that all Extension dependencies include junit as compile
  scope which caused it to be included.

Affects issues:
- Close #1890
2022-07-13 21:21:20 +03:00
Rsl1122 aa67794881 Remove unnecessary files from jar and relocate Jetty 2022-07-03 10:54:01 +03:00
Henri Schubin bab0f273a2
Sponge API 8 port (#2119)
* Initial commit for Sponge API 8 port
* Change Sponge PAL version to include -sponge version suffix
* Comment out Nucleus w/ needs a update in ExtensionRegister
* Fix error with ArtifactVersion (from org.apache.maven) being relocated
* Correct todos related to getting values from ResourceKeys
* Cleanup sponge buildscript a bit
* Remove sout
* Update Extension-Sponge-Economy to 8.0.0-R0.3
* Convert to Sponge's new preferred way to load in jar resources
* Convert SpongeMessageBuilder and VelocityMessageBuilder into AdventureMessageBuilder
* Add back the command
* Update bStats to 3.0.0, re-enable bStats for Sponge
* Implement gamemode change mixin
* Remove unused import
* Update SpongeGMChangeListener's error logging as suggested

Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>

* PAL 5.1.0
* Add a check in SpongeCommand to update the ErrorLogger and Subcommand if the PlanSpongeComponent changes
* Combine try-with-resources in SpongePlanFiles#asStringResource

Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
2022-05-29 17:08:50 +03:00
Henri S efd3b75a29
Database Driver downloading (#2144)
Affects issues:
- Fixed #1944
2021-10-31 13:16:47 +02:00
Risto Lahtela fb998fdc90 Changed mysql and sqlite to use implementation instead of shadow
this is to exclude things like google/protobuf folder properly
The sql drivers are still included
2021-10-30 10:07:06 +03:00
Aurora Lahtela ebb1108969
Comment out slimjar related configuration (#2138) 2021-10-27 18:43:14 +03:00
Antti Koponen d29a94e6a4
Implement SlimJar as a runtime dependency downloader (#1990)
MySQL & SQLite are dynamically (down)loaded to the classpath instead of being shaded.

Affects issues:
- Close #1944
2021-08-07 15:29:54 +03:00
Risto Lahtela fa4a2e6595
Gradle 7 Update by Kopo (#1931)
Updates gradle to version 7 and sorts out all the deprecated stuff

Affects issues:
- Clsoe #1871

Co-authored-by: Antti Koponen <koponen942@outlook.com>
2021-06-12 08:24:24 +03:00
Risto Lahtela 2767c0ff65 Remove duplicate mysql relocation line 2021-03-15 18:25:16 +02:00
Risto Lahtela 7e08ea8245 Fixed plugin not enabling on Sponge or nukkit
- Removed module-info.class that came from asm
- Don't relocate SQLite since the NativeDB class is not relocated properly
2021-03-15 18:24:40 +02:00
Risto Lahtela bfcb7eea85
Dependency downloading (#1795)
Affects issues:
- Fix #1759
2021-03-15 15:28:36 +02:00
Risto Lahtela 42ecfa7298 Removed unnecessary libraries from the jar
- Removed http client dependency
- Removed html compressor dependency

- No longer shadowing http client from geolite2 dependencies
2021-03-15 13:56:36 +02:00
Risto Lahtela 4604bd930e Relocated Caffeine library later
Affects issues:
- Fixed #1756
2021-02-14 19:46:21 +02:00
Risto Lahtela eedd432994 Relocated apache packages later
Affects issues:
- Fixed #1598
2020-10-12 10:36:15 +03:00
Rsl1122 380c98e8e6 Fixed missing softdepends, relocated javax.inject
Affects issues:
- Fixed #1308
2020-02-04 11:11:35 +02:00
Risto Lahtela 2877fdc5ca
Implemented Nukkit Support (#1244)
- Implemented APF for Nukkit
- Copied Bukkit implementation and modified it for Nukkit
- Fixed SQLite not being present on Nukkit by switching to H2 on boot

Affects issues:
- Close #1020
2019-12-08 10:26:24 +02:00
Rsl1122 3744b1b98b Automatic version incrementing
Build artifact now 5.0-SNAPSHOT

Version is 5.0 build $number where number is amount of commits since
cdb13e3b66
2019-12-07 20:12:45 +02:00
Rsl1122 3a2568d5db Added MySQL-Driver to Plan (Velocity support)
Affects issues:
- Close #739
2019-07-08 12:16:06 +03:00
Rsl1122 7510841ebd Fixed old code smells:
Bug:
- Unused result of orElseThrow in DataStoreQueries
- Missing synchronized keywords in ConfigChange
- PlanConfig#hashCode since equals exists

Blocker:
- Add assertion to BungeeSystemTest, SessionTest, CommonDBTest,
  LocaleSystemTest, FileWatcherTest
- Removed BungeeBukkitConnectionTest (Not executed)

Critical:
- Fix typo in ErrorPageLang.AUTHENTICATION_FAILED_401 name
- Duplicate Exception definition in ConfigValueParser

Major:
- Renamed 'name' to 'playerName' in BukkitImporter
- Non generic exceptions to Reflection
- Extracted tenary to if in TableContainer, ProviderInformation

And some minor smells
2019-05-03 15:11:56 +03:00
Rsl1122 ea8a53029c Set up maven-publish plugin 2019-02-16 14:28:23 +02:00
Rsl1122 28ce49e68f [#885] Relocated dagger classes 2019-01-17 17:50:02 +02:00
Rsl1122 f80faef760 Rename final artifact to 'Plan' instead of 'plugin' 2019-01-08 13:27:08 +02:00
Rsl1122 dd904b84fc Updated missing or outdated license headers 2019-01-03 13:12:19 +02:00
Rsl1122 ea2bc982f2 Moved HTTPWebServerAuthTest from 'plugin' to 'common' module 2019-01-02 17:11:46 +02:00
Rsl1122 31986644f9 Fixed HTTPSWebServerAuthTest 2019-01-02 17:08:53 +02:00
Rsl1122 6dcc02ebb6 Moved database tests from 'plugin' to 'common' module 2019-01-02 16:58:23 +02:00
Rsl1122 722e28005d Made CommonDBTest use PluginComponentMocker instead
- Added H2 to PluginComponent databases
2019-01-02 16:55:19 +02:00
Rsl1122 b540786010 More detailed check for patch failings 2019-01-01 12:36:39 +02:00
Rsl1122 f8391305dc Additional assertions to patch regression tests
- Check that the patches have been properly applied
- Check that removal works
2019-01-01 12:25:31 +02:00
Risto Lahtela f333ae7cc9
Mysql patching test fix (#865)
* Added MySQL to PluginComponentMocker DBSystem

* Enabled the full system on MySQLPatchRegressionTest

* Dropped the database on for each mysql test class to make the
  tests independent on each other
2019-01-01 12:05:33 +02:00
Rsl1122 d59eed039b MySQL Patch Regression Test for 4.5.2 2018-12-31 19:12:27 +02:00
Rsl1122 bd4613339b H2 Patch Regression Test for 4.5.2 2018-12-31 19:11:40 +02:00
Rsl1122 10756185d6 Split SQLitePatchRegressionTest to 2 classes 2018-12-31 19:11:09 +02:00
Rsl1122 7b368a907f Moved database tests to proper package 2018-12-31 17:12:15 +02:00
Rsl1122 844fe2178f 4.5.2 SQLite Patch test 2018-12-31 17:09:45 +02:00
Rsl1122 33b97b0745 Replaced init call with createTables in CommonDBTest#Before 2018-12-27 21:47:34 +02:00
Rsl1122 232ead5f1f Fixed database tests (dropped tables depending on ids) 2018-12-27 21:37:59 +02:00
Rsl1122 3d65e8c745 Unignored 2 BungeeSystem tests
- Caught a PoolInitializationException in MySQL to throw EnableException
  properly.
2018-12-27 18:51:11 +02:00
Rsl1122 217867ab52 Try to fix MySQL Tests
The tests were failing due to missing Session in the database.
The foreign key checks were not enforced on SQLite so the session was
not being saved previously.

- Session now saved in the 3 tests dependending on it
- Removed empty ignored test method
- Flipped an equals in WorldTimes
2018-12-27 18:39:36 +02:00
Rsl1122 5403f78a94 Removed failing test in MySQLTest 2018-12-26 21:44:59 +02:00
Rsl1122 1225902347 Replaced System.getProperty with System.getenv calls in Tests 2018-12-26 21:39:06 +02:00
Rsl1122 0b19adcc74 Failing test to ensure MySQLTest is being run 2018-12-26 21:04:52 +02:00
Rsl1122 131585179d MySQL Test + CIProperties 2018-12-26 20:32:33 +02:00
Rsl1122 187e4b8ce1 Tests for SettingsTable
- Fixed ConfigNode equals method
- Fixed SettingsTable SQL
2018-12-24 13:26:08 +02:00
Rsl1122 940c414f7d Removed 'plan_transfer' table from the database
- Removed TransferTable
- Added a TransferTableRemovalPatch
- Removed TransferOperations (and Database#transfer)
- Removed SQLTransferOps
- Removed UnsupportedTransferDatabaseException
- Removed uses in NetworkSettings and related tests
2018-12-23 15:20:42 +02:00
Rsl1122 a64336803f Bunch of things:
- IntelliJ Inspection fixes.
- Removed some unused code
- Added ConfigNode#getStringMap
- Removed usages of ConfigNode#getChildren
2018-12-20 13:50:40 +02:00