Commit Graph

934 Commits

Author SHA1 Message Date
Christian Koop
e2194e0dec
GitHub Actions: Adds missing empty line between steps in sonarcloud.yml 2022-11-26 20:26:01 +01:00
Christian Koop
8e91cc18eb
Makes SongodaYamlConfig#cannotCreateBackupCopyExceptionPrefix static
It already is `final`.
By making it static we reduce the memory required by each instance of the class.
2022-11-26 20:25:11 +01:00
Christian Koop
bba5fa5f3e
Adds additional information for deprecations as JavaDocs 2022-11-26 20:24:14 +01:00
Christian Koop
bc56347727
Fix order of modifiers in SongodaCore-class 2022-11-26 20:23:45 +01:00
Christian Koop
75b497a163
Add private constructor to SongodaCoreConstants to hide implicit one
The utility class only has static members - Nothing to gain from instantiating it other than confusion
2022-11-26 20:23:08 +01:00
Christian Koop
59f4adfc6f
GitHub Actions: Skip automated tests when running SonarCloud
The build pipeline already runs the tests. I think it makes sense to run SonarCloud's static
code analysis when the project can be compiled without errors.
2022-11-26 15:36:29 +01:00
Christian Koop
67a69e34e8
Make unit tests in LocaleFileManagerTest deterministic
The order in which files inside of a given directory are listed is not guaranteed in any way.
This causes tests to work on my machine but fail on out GitHub Actions CI/CD pipeline.
2022-11-26 15:31:43 +01:00
Christian Koop
6c6c3e950c
GitHub Actions: Enable build and sonarcloud workflow for v3-dev-branch 2022-11-26 00:01:00 +01:00
Christian Koop
5a7a3d052d
Cleanup YAML in .github/dependabot.yml 2022-11-25 23:59:56 +01:00
Christian Koop
d710b2d2d5
Add unit test for SongodaYamlConfig persisting comments on key-upgrades 2022-11-16 02:29:41 +01:00
Christian Koop
02330b5ca7
Improve temporary file deletion in YamlConfig and FileManager tests
The SongodaYamlConfig might create a backup config file when upgrading a
configuration into a newer version.
This file would not get deleted in the old implementation
2022-11-16 02:14:45 +01:00
Christian Koop
f8b3942de2
Adds hyphen before timestamp in file name, when creating backup YamlCfg 2022-11-16 02:03:41 +01:00
Christian Koop
daa601688d
Updates SnakeYaml dependency from 1.30 to 1.33 2022-11-16 02:03:03 +01:00
Christian Koop
e7da328dc6
Fix YamlConfiguration not dumping comments
Not sure when it broke, but now it's fixed.
2022-11-16 02:02:09 +01:00
Christian Koop
404a94c307
Move from MockBukkit to Mockito in automated tests
MockBukkit is not able to mock all of Bukkit's API
and broke with a change in PaperMC causing all our
current tests to fail. It is also version dependant.

But with Mockito you have to do everything manually right now.
No helping functionality (like creating a new mock player which automatically
will be returned in `Bukkit#getOnlinePlayers()`)

I took this opportunity to learn a bit about Mocking in Bukkit
and decided on Mockito.
It looks like we could easily write our own MockBukkit
alternative in the future.

I am not really happy how `Mockito#verify` works tho.
I find it annoying not to be able to directly assert
on the calls made to a method.
You have to create an InOrder instance first for the
mock and in the end verify with `Mockito#times(0)`/`Mockito#never()`
and `Mockito#any()` for each argument a method takes, to assert a total of n calls.
2022-11-15 22:49:09 +01:00
Christian Koop
ceebf211b3
Change maven repository IDs in pom.xml
I've setup proxy repositories at https://songoda.sprax.dev/repo/
for all current Core v3 dependencies (except maven-central).
These updated IDs can now be used in `~/.m2/settings.xml`
to configure mirrors: https://maven.apache.org/guides/mini/guide-mirror-settings.html
2022-11-15 18:57:10 +01:00
Christian Koop
b168ad0738
Provisional first implementation of the new localization system
It it not done yet. A lot of usability features are still missing.
Including a proper interface to interact with the whole
new system in the plugins.
2022-09-29 21:55:57 +02:00
Christian Koop
2e15ed5d28
Adds a simple http client
This is intended to standardize how we do these request in the core.
It doesn't do much but it will sufice for now to be used
in the new localization system.
2022-09-29 21:52:59 +02:00
Christian Koop
2860dffb83
Update Dependencies: Spigot, MockBukkit, JUnit, pitest-maven 2022-09-29 21:39:07 +02:00
Christian Koop
1cd96b10c5
Remove overloading WorldCore#getSpawner(CreatureSpawner) 2022-08-28 19:19:48 +02:00
Christian Koop
b07f67e0d6
Unify and cleanup all pom.xml-files
This also moves all the dependency declarations of the NMS modules
from the Core-Module to its own NMS-Module.
This module might get merged with the NMS-API module in the future.
2022-08-28 19:13:59 +02:00
Christian Koop
fc2aefdd9e
Add full support for Minecraft 1.19.0, 1.19.1 and 1.19.2
Between 1.19.0 and 1.19.1 the NMS version did not change
although implementations changed
2022-08-28 18:43:20 +02:00
Christian Koop
b3426a6a1a
Load NMS modules via Reflections instead of defining everything manually
This probably needs some additonal work but my idea
is that every NMS module has only one entry point.
This hopefully allows for as much freedom in version-specific
implementations as possible and allows for easily  loading them via Reflections.
2022-08-28 18:20:22 +02:00
Christian Koop
e18db1d775
Removes depenency on NMSPlayerImpl for NmsWorldBorderImpl 2022-08-28 16:54:29 +02:00
Christian Koop
e96cb5426d
Migrate v1_18_R1 NMS module to use remapped-spigot at compile-time 2022-08-28 16:54:29 +02:00
Christian Koop
9d7026ec27
Replace SWorldBorder implementation and move it into NMS modules 2022-08-28 16:54:29 +02:00
Christian Koop
5c15d66415
Deprecate MethodMapping class
I do not intend to update it to support another version.
All implementations using it should be recoded and use the NMS modules instead if needed
2022-08-27 22:43:07 +02:00
Christian Koop
43148032a2
Replace #setBlockFast implementation and move into NMS modules
We need to check if FabledSkyBlock actually needs this and if it can be removed from the Core.
I added a TODO-Comment for that.
2022-08-27 22:42:07 +02:00
Christian Koop
3d20f439e1
Replace #updateAdjacentComparators implementation(+ move to NMS modules) 2022-08-27 22:35:37 +02:00
Christian Koop
b779194e3e
Adds SongodaCore#getVersion and deprecate #getCoreLibraryVersion 2022-08-25 08:37:46 +02:00
Christian Koop
163e4d9eaf
Fix error handling of SongodaYamlConfig#load(Reader) 2022-08-21 20:44:41 +02:00
Christian Koop
eea951ecc6
Adds some deprecation notices to configuration.editor classes 2022-08-21 20:44:19 +02:00
Christian Koop
20b44327e0
Redo ConfigEntry abstraction 2022-08-21 20:42:16 +02:00
Christian Koop
72c96bc09a
Adds Contract annotation to CompatibleMaterial#getMaterial 2022-08-21 20:39:50 +02:00
Christian Koop
76b3dc6682
Dependabot: Configure the target branch to be development 2022-08-19 10:53:17 +02:00
Christian Koop
7b775a1db3
GitHub-Actions: Fix Discord webhook URL used 2022-08-19 10:52:49 +02:00
Christian Koop
a06d27ab90
Version v3.0.0-SNAPSHOT 2022-08-19 10:06:58 +02:00
Christian Koop
d5ddde3e08
Migrate CustomizableGui from old Config to SongodaYamlConfig 2022-08-18 23:09:21 +02:00
Christian Koop
20b7a353b8
Adds SongodaYamlConfig#getAsEntry(String) for convenience
If you are reading a config dynamically instead of fully creating it
with all the entries beforehand, this method can be used
to easily access the *converted/casted* values.
2022-08-18 23:08:58 +02:00
Christian Koop
78b6039d39
Add contract to ConfigEntry#getString(String) for non-null-argument
The contract basically says that if you provide a
non-null argument to the method, it cannot return
a null value.
2022-08-18 23:07:18 +02:00
Christian Koop
3a09c19dbb
Adds getter to ConfigEntry for List<String> 2022-08-18 23:06:22 +02:00
Christian Koop
da3c89450e
Remove usage of Locale classes 2022-08-18 23:05:21 +02:00
Christian Koop
61b784b3e8
Merge branch 'development' into development-v3 2022-08-18 22:57:46 +02:00
ceze88
430e203a65 Fix connection with MySQL 2022-08-09 16:27:28 +02:00
Christian Koop
b568d51151
Release v2.6.15-DEV 2022-08-08 23:12:06 +02:00
Christian Koop
b3be6700f9
Fixes NoSuchMethodException since MC 1.19.1 in chat package
Sadly, NMS-Package-Version did not change between 1.19.0 and 1.19.1

https://wiki.vg/index.php?title=Protocol&type=revision&diff=17688&oldid=17663


Co-authored-by: Fernando Pettinelli <fernandopettinellifreire@gmail.com>
2022-08-08 23:10:42 +02:00
Christian Koop
5e1f1b802c
Introduce new CI/CD pipeline using GitHub Actions
A lot is happening in this release!

tl;dr: GitHub Actions runs tests, compiles the project, signs the jar files, deploys them to the Maven repo; Pushing a git tag issues a release instead of snapshot deployment; -SNAPSHOT is always added to the version otherwise; Core Version is now injected by maven instead of manually updating it in one of the classes


We now use GitHub Actions to run automated tests, compile the project, sign the resulting jar files, and always deploy a version to the Maven repo.
By default, a snapshot release is published but by creating a git tag, a release deploy can be triggered.

Additionally the Core version is not manually updated in one of the classes but injected after compiling it.
I think I found the most stable and easiest way to do this in maven,
although I'd have wished for it to be easier and maybe not after the class file has already been created.
2022-08-07 19:33:38 +02:00
ceze88
0ae9c6fcdb New method to get MySQL connection for HikariCP 2022-08-07 16:36:30 +02:00
Fernando Pettinelli
1ab918a32e Version 2.6.14-DEV 2022-07-13 01:50:25 -04:00
Fernando Pettinelli
c8be1229e8 Fixes for AnvilView, WildStacker and mcMMO. 2022-07-13 01:49:36 -04:00