Commit Graph

723 Commits

Author SHA1 Message Date
ceze88
8920e7e2f9 Update UltimateClaims hook 2023-08-02 18:30:12 +02:00
ceze88
fdf79eeee3 New delete methods, start auto increment from one for databases 2023-07-25 19:54:05 +02:00
ceze88
54ef2c0b29 Fixes getNextId method for empty databases. Adds some new saving methods. TODO: clean up this class 2023-07-24 12:23:10 +02:00
ceze88
9d94232ab5 Fixes NPE when the entity is not stacked 2023-07-24 11:58:39 +02:00
ceze88
3ff333d1b4 Adds loadBatch with conditions and delete with custom uuid column 2023-07-20 16:35:15 +02:00
ceze88
abd51e0e82 Fix item stacking when using large numbers 2023-07-17 12:20:48 +02:00
ceze88
98e03a2861 Fix drop issues in some cases where mobs don't drop loot 2023-07-16 20:29:00 +02:00
ceze88
8a31f3e0c2 Update method for the latest api method 2023-07-16 19:41:30 +02:00
ceze88
4955954bd6 Fix package name 2023-07-16 17:59:24 +02:00
dependabot[bot]
f24f250d36
Bump decentholograms from 2.2.5 to 2.8.3 (#58)
Bumps [decentholograms](https://github.com/DecentSoftware-eu/DecentHolograms) from 2.2.5 to 2.8.3.
- [Release notes](https://github.com/DecentSoftware-eu/DecentHolograms/releases)
- [Commits](https://github.com/DecentSoftware-eu/DecentHolograms/compare/2.2.5...2.8.3)

---
updated-dependencies:
- dependency-name: com.github.decentsoftware-eu:decentholograms
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 17:39:25 +02:00
dependabot[bot]
885c64435d
Bump inject-maven-plugin from 1.3 to 1.4 (#56)
Bumps [inject-maven-plugin](https://github.com/marcelmay/inject-maven-plugin) from 1.3 to 1.4.
- [Release notes](https://github.com/marcelmay/inject-maven-plugin/releases)
- [Commits](https://github.com/marcelmay/inject-maven-plugin/compare/inject-maven-plugin-1.3...inject-maven-plugin-1.4)

---
updated-dependencies:
- dependency-name: de.m3y.maven:inject-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 17:38:41 +02:00
Christian Koop
3575bd25b9
Use non-shaded class name when loading the H2 driver 2023-07-01 13:39:44 +02:00
Christian Koop
199840f845
Minor code style fixes/refactoring in H2Connector 2023-07-01 13:39:44 +02:00
Christian Koop
fafc4baaa3
Fixes username and password in H2Connector being mixed up 2023-07-01 13:39:44 +02:00
ceze88
2962a5cef8 Improve data loading to make it easier for plugins to create new data instances when deserialized 2023-07-01 09:54:09 +02:00
Christian Koop
1b2b2a41a3
Updates UltimateStacker-API dependency to use the new name+version 2023-06-30 22:53:43 +02:00
Christian Koop
8c80d86cc5
pom.xml: Adds some empty lines for clarification/grouping of shade arti. 2023-06-30 16:38:40 +02:00
Christian Koop
b8c14253ad
Fix version for UltimateStackerAPI dependency from 1.0 to 1.0.0 2023-06-30 16:17:56 +02:00
Christian Koop
2aa367c8e3
Merge branch 'feature/new-improved-database-system' into development 2023-06-29 17:14:28 +02:00
ceze88
84c7d1da4b Fix database converter, fix uuid data support. Adds test for database 2023-06-29 16:04:12 +02:00
Christian Koop
9ac1da984d
Renamed method argument l to location in LocationUtils#isInArea 2023-06-29 09:37:42 +02:00
ceze88
5d0b0409da Updates jooq to latest java 8 and hikaricp 2023-06-28 12:13:39 +02:00
ceze88
5d9cab5613 Merge branch 'development' into feature/new-improved-database-system
# Conflicts:
#	Core/pom.xml
#	Core/src/main/java/com/craftaro/core/SongodaPlugin.java
2023-06-28 11:58:09 +02:00
Christian Koop
2becc27bda
Include all of XSeries in the core instead of specific classes 2023-06-25 12:09:27 +02:00
Christian Koop
572cf3d805
Adds a lot of this. in GUI releated classes 2023-06-24 16:00:57 +02:00
Christian Koop
7ce74de993
Deprecates CompatibleSound in favor of XSound from the XSeries library 2023-06-24 15:58:38 +02:00
Christian Koop
b09338f78f
Adds a lot of this. in some files 2023-06-24 12:57:57 +02:00
Christian Koop
49eb5437e9
Updates item-nbt-api dependency to v2.11.3 2023-06-24 12:55:15 +02:00
Christian Koop
bac3c1b16e
Re-implemented CompatibleMaterial + changed usages to XMaterial 2023-06-20 20:22:29 +02:00
Christian Koop
d4fe43fd35
Adds XSeries's XMaterial class to the shaded dependencies 2023-06-18 01:01:28 +02:00
Christian Koop
fbf6531f08
Updates maven-shade-plugin from v3.3.0 to v3.5.0 2023-06-18 01:00:48 +02:00
Christian Koop
b6e1d0afca
Exclude license files etc. when shading third-party libraries 2023-06-18 01:00:23 +02:00
Christian Koop
9e73e2a87d
Fixes some code style issues 2023-06-18 00:33:07 +02:00
Christian Koop
3b92b69cc6
Fixes some code style issues 2023-06-17 16:34:50 +02:00
Christian Koop
3203e4b799
Deprecate some utility classes that still need some additional work 2023-06-17 16:31:13 +02:00
Christian Koop
f1fa34f891
Deprecates most parts of NumberUtils and refactors #isInt(String)
Trying to parse an empty or null String throws an `NumberFormatException` so we don't need that check.
2023-06-17 16:30:27 +02:00
Christian Koop
24007b5d17
Slight refactor of PlayerUtils and marking some methods as Deprecated
The Deprecations need to be taken care of at a later point in time.
Most methods do have a strong use-case in relation to commands and should be placed
in a more appropriate class.
2023-06-17 16:30:27 +02:00
Christian Koop
f348ddef45
Deprecate some unused or no-longer-needed utility classes 2023-06-17 16:30:27 +02:00
Christian Koop
c43bc093cc
Replace EntityUtils with new NmsEntity implementation and deprecate it 2023-06-17 15:45:23 +02:00
Christian Koop
4c32936367
Fix package path used in SongodaCore#hasShading 2023-06-17 13:35:19 +02:00
Christian Koop
bba24097fd
Rename SongodaCoreConstants into CraftaroCoreConstants and update them 2023-06-17 13:06:57 +02:00
ceze88
ee9d6016bf
Big changes to the database system
This a modified version of the original commit b2180b0c73.

I changed/removed:
* project version bump (a lot of unrealated file changes, wrong version in regards to breaking changes)
* Hacky changes to the NMS class
* Reverted changes to SSpawner (We want to keep the class variables final
and there doesn't seem to be a big advantage in overwriting basically the whole classe's content
when you could just create a new instance instead, as intended)
* Commit name (old name was `(changes will be in next commit)`)
2023-06-11 12:55:04 +02:00
Christian Koop
421e515d85
Bump CraftaroCore version to v3.0.0-SNAPSHOT 2023-06-11 00:37:11 +02:00
Christian Koop
636775bbef
Rename Maven modules from SongodaCore to CraftaroCore 2023-06-11 00:37:11 +02:00
Christian Koop
e8639f3540
Fix forgotten package name changes
Forgotten in a33da058e29e4ed1ee018b8d51f503e07547d18a
2023-06-11 00:37:11 +02:00
Christian Koop
dd4a7bd04e
Removes pitest as a maven plugin
It is used for mutation testing but realistically we don't even write that many tests.
Just adds complexity and because it is not often used, causes trouble when it hasn't been touched for months/years
2023-06-11 00:37:11 +02:00
Christian Koop
5da3769a47
Move every class from com.songoda package to com.craftaro 2023-06-11 00:37:11 +02:00
Christian Koop
f66964b2ee
Refactor Nms class to be more readable and make it final 2023-06-10 22:14:54 +02:00
Christian Koop
1e0de3d844
If the product's license check fails, periodically broadcast a message 2023-06-09 15:20:33 +02:00
Christian Koop
d0abbf26ec
Don't use Apache commons-io to read HTTP response body bytes
At least in Spigot 1.19 it is not available by default - That much we can do ourselves in that case.
2023-06-09 15:20:33 +02:00
Christian Koop
5f02c06ce8
Bump core revision from 9 to 10
To make sure the Core with the `/craftaro license` command wins the 'newest-core-battle'
2023-06-09 15:20:33 +02:00
Christian Koop
f8a9e81388
Improve colors and formatting for /craftaro license command 2023-06-09 15:20:33 +02:00
Christian Koop
3f89267e8e
Don't fully shutdown the plugin when license verification fails
The goal here is to keep the plugin enabled and initialize the Core.
This is needed for the `/craftaro license` command to work etc.

Sadly this also means other plugins checking for the plugin being the
(including the `/plugins` command), report the plugin as enabled
and seemingly ready (Although the plugin's API is not).
2023-06-09 15:20:33 +02:00
Christian Koop
1998fd7ff9
Remove broken command '/craftaro myip`
The API endpoint doesn't exist anymore.
The command is part of the old SongodaAuth license system.
2023-06-09 15:20:33 +02:00
Christian Koop
c6d688b6b7
Implements new Craftaro Product Verification Flows replacing SongodaAuth 2023-06-09 15:20:33 +02:00
Christian Koop
eac02d51fe
Removes org.yaml.snakeyaml as shaded dependency
It is already included in Spigot. Probably forgot to revert this with c725ea69d6.

This causes weird Exceptions/Errors in Folia (and/or Paper?).
2023-05-18 19:17:47 +02:00
ceze88
755124c070 Update UltimateStacker hook 2023-05-18 19:08:44 +02:00
ceze88
624221c532 Update UltimateStacker version 2023-05-18 19:08:33 +02:00
Christian Koop
9c4923cd42
Release v2.6.22
I'm creating this release to push the GitHub Actions and Dependabot changes to the main branch.
Dependabot should find at least 2 outdated actions dependencies and create a PR for them.


Please check #47 for a list of *most* changes.
2023-05-07 15:19:04 +02:00
Christian Koop
3e233cf021
Revert the project's version back to '2.6.21' 2023-05-06 22:54:50 +02:00
Christian Koop
5e21ac9424
Revert deletion of NmsManager, deprecate it and have it use the new one 2023-05-06 22:44:38 +02:00
Christian Koop
17780fffdc
Introduce constants GitHubProjectURL+ProjectName in SongodaCoreConstants 2023-05-06 22:44:38 +02:00
Christian Koop
3722ebb46a
Fix a couple compile errors after a lot of reverts and merges 2023-05-06 22:44:38 +02:00
Christian Koop
b6a4198a60
Revert "Version v3.0.0-SNAPSHOT"
This reverts commit a06d27ab90.
2023-05-06 22:44:38 +02:00
Christian Koop
5e093558a4
Deprecates BlockUtils#updateAdjacentComparators(Location) 2023-05-06 22:44:38 +02:00
Christian Koop
50d5784da8
Partially reverts "Replace #updateAdjacentComparators implementation(+ move to NMS modules)"
This partially reverts commit 3d20f439e1.
2023-05-06 22:44:38 +02:00
Christian Koop
dc82a6ba5c
Deprecates BlockUtils#setBlockFast methods 2023-05-06 22:44:38 +02:00
Christian Koop
1240c75bfa
Partially reverts "Replace #setBlockFast implementation and move into NMS modules"
This partially reverts commit 43148032a2.
2023-05-06 22:44:38 +02:00
Christian Koop
ad8f8517a7
Deprecates SWorldBorder class
Related to:
* 71502be7d0a8978ede443b43c207c932f550730d
* 9d7026ec27
2023-05-06 22:44:38 +02:00
Christian Koop
426e786b49
Partially reverts "Replace SWorldBorder implementation and move it into NMS modules"
This partially reverts commit 9d7026ec27.
2023-05-06 22:44:38 +02:00
Christian Koop
7c09845789
Revert "Remove overloading WorldCore#getSpawner(CreatureSpawner)"
This reverts commit 1cd96b10c5.
2023-05-06 22:44:38 +02:00
Christian Koop
c725ea69d6
Revert all the SongodaYamlConfig related commits
Revert "Ensures usage of UTF-8 in SongodaYamlConfig"

This reverts commit 339a4d6f6c.

Revert "Improve test coverage + stability of configuration.yaml/songoda classes"

This reverts commit ef6c37b80c.

Revert "Adds ConfigEntry#withDefaultValue for easier chaining"

This reverts commit 88e28689f7.

Revert "Code cleanup (rename e->ex in catch; better type for #withUpgradeStep)"

This reverts commit 7eff3c86ec.

Revert "Rename constant into upper case to match code conventions"

This reverts commit 4d194ed92b.

Revert "Fix typo in JavaDoc"

This reverts commit 0b2a253014.

Revert "Makes SongodaYamlConfig#cannotCreateBackupCopyExceptionPrefix static"

This reverts commit 8e91cc18eb.

Revert "Make unit tests in LocaleFileManagerTest deterministic"

This reverts commit 67a69e34e8.

Revert "Add unit test for SongodaYamlConfig persisting comments on key-upgrades"

This reverts commit d710b2d2d5.

Revert "Improve temporary file deletion in YamlConfig and FileManager tests"

This reverts commit 02330b5ca7.

Revert "Adds hyphen before timestamp in file name, when creating backup YamlCfg"

This reverts commit f8b3942de2.

Revert "Fix YamlConfiguration not dumping comments"

This reverts commit e7da328dc6.

Revert "Provisional first implementation of the new localization system"

This reverts commit b168ad0738.

Revert "Fix error handling of SongodaYamlConfig#load(Reader)"

This reverts commit 163e4d9eaf.

Partially reverts "Adds some deprecation notices to configuration.editor classes"

This partially reverts commit eea951ecc6.

Revert "Redo ConfigEntry abstraction"

This reverts commit 20b44327e0.

Revert "Migrate CustomizableGui from old Config to SongodaYamlConfig"

This reverts commit d5ddde3e08.

Revert "Adds SongodaYamlConfig#getAsEntry(String) for convenience"

This reverts commit 20b7a353b8.

Revert "Add contract to `ConfigEntry#getString(String)` for non-null-argument"

This reverts commit 78b6039d39.

Revert "Adds getter to ConfigEntry for List<String>"

This reverts commit 3a09c19dbb.

Revert "Remove usage of Locale classes"

This reverts commit da3c89450e.

Revert "Mark overwritten and empty config methods in SongodaPlugin as deprecated"

This reverts commit 73685b62dd.

Revert "Adjust log levels in SongodaYamlConfig"

This reverts commit 7ef00bb8f9.

Revert "Fix SongodaYamlConfig not creating parent directory when saving"

This reverts commit b0f006aed0.

Revert "Fix SongodaYamlConfigTest leaving created backup files in tmp dir"

This reverts commit c9a48387de.

Revert "Remove Config related methods in SongodaPlugin"

This reverts commit fce5c5c6a1.

Revert "Introduce new SongodaYamlConfig and ConfigEntry classes"

This reverts commit eb10b3f70a.

Revert "Fix YamlConfiguration dumping null values and empty tree nodes"

This reverts commit 02ab8d4bb2.

Revert "Fix `YamlConfiruration#getKeys("")` not returning root node keys"

This reverts commit 885cc9a87e.

Revert "Fix exception on loading empty file in YamlConfiguration"

This reverts commit 2683bc12c0.

Revert "Make YamlConfiguration insertion-sorted"

This reverts commit 2262652577.

Revert "Rename `IConfiguration#getOrDefault` to `#getOr`"

This reverts commit f6e207cdda.

Revert "Adds Enum support to YamlConfiguration class (#41)"

This reverts commit 41bd5c633a.

Revert "Removes the default implementations for #save(File) and #load(File)"

This reverts commit 8f15df3601.

Revert "Replace Songoda's YAML Configuration wrapper with an own implementation"

This reverts commit 6d6fa7210a.
2023-05-06 22:44:38 +02:00
Christian Koop
748f10b77b
Merge branch 'development' into development-v3 2023-05-06 20:17:35 +02:00
Christian Koop
0a0848c857
Release v2.6.21 2023-04-29 12:37:40 +02:00
Christian Koop
06761c001c
Fix plugin cmd list displayed in Action Bar instead of the chat 1.19.3+
The boolean flag determines 'whether the message is an actionbar or chat message'.
We want to have it set to `false` here.

Reference:
https://wiki.vg/index.php?title=Protocol&oldid=18120#System_Chat_Message
2023-04-29 11:56:04 +02:00
Christian Koop
7a7d2e8b97
Release v2.6.20 2023-04-22 16:13:07 +02:00
Christian Koop
9361fad0bf
Deprecate BlockUtils and BlockUtilsModern classes 2023-04-22 15:18:33 +02:00
Christian Koop
e21db58a67
Reimplement BlockUtils#updateAdjacentComparators in WorldCore
The implementation broke in 1.19.4 mid-version.
Fixes `java.lang.NoSuchMethodException: org.bukkit.craftbukkit.v1_19_R3.CraftChunk.getHandle()`


Related commit: a3e73be1aa
2023-04-19 21:59:13 +02:00
Christian Koop
57f9f1f911
Fix coreVersion in SongodaCore class not being the correct release 2023-04-13 11:51:14 +02:00
Christian Koop
177ecb36e5
Release v2.6.19 2023-04-13 11:48:55 +02:00
Christian Koop
37a9ee8868
Adds missing commands to list when console is running songoda command 2023-04-13 11:35:19 +02:00
Christian Koop
c34c8faa9c
Fix wrong permission configured for SongodaCoreUUIDCommand 2023-04-13 11:23:05 +02:00
Christian Koop
b9293079e0
Fix broken Wiki-URL in CustomizableGui
The Wiki has moved/changed and is not redirecting properly sadly
2023-04-13 11:22:43 +02:00
Christian Koop
2730b91598
Have songoda-Command have 'craftaro' as alias and change wording to that
Not having the actuall command change allows of other plugins *finding* that command
in that way means not introducing a breaking change by accident ^^

+ It's very hacky the way I did it but tbh... Core v3 is somewhat around the corner anyways
2023-04-13 11:22:04 +02:00
Christian Koop
7c4e967dd8
Changes *some* Songoda wording to Craftaro
I don't want to introduce too much confusion or breaking changes
2023-04-13 11:18:12 +02:00
ceze88
1455cf2d1c Fix enchant book loot 2023-04-11 19:23:05 +02:00
ceze88
3dd3a31f25 Add coordinate placeholders to loot commands 2023-04-07 20:46:14 +02:00
Christian Koop
824f674dcd
Change order of IP and UUID in 'license not found' message to match GUI
The marketplace first asks for the UUID - I changed the order in the message to match that order.
2023-04-06 10:06:58 +02:00
Christian Koop
e33848adc5
Release v2.6.19-DEV 2023-03-29 21:16:28 +02:00
Christian Koop
65f606ee83
Refactor /songoda diag command and change output formatting a bit
This should make reading the version information displayed easier.
No more confusing the plugin version vs. the core version.

Additionally fixed `Mb` to `MiB`.
2023-03-29 19:22:09 +02:00
Christian Koop
140c59ffa2
Merge branch 'development' into development-v3 2023-03-29 18:49:25 +02:00
Christian Koop
07374fdbfd
Configures the new v1_19_R3 NMS module in the NmsManager class 2023-03-29 18:22:13 +02:00
Christian Koop
fafcf28e0b
Updates dependency item-nbt-api to v2.11.2 for Spigot 1.19.4 support
From the changelog:
>Add 1.19.4 as officially supported (2.11.1 will work fine on 1.19.4, but show a warning that it doesn't know about this version)
2023-03-29 18:21:41 +02:00
Christian Koop
6d8c3beeb3
Merge branch 'development' into development-v3 2023-03-16 19:07:54 +01:00
Christian Koop
52f6c42266
Adds NMS Module v1_19_R3 for Spigot 1.19.4 compatibility 2023-03-16 09:46:40 +01:00
Christian Koop
a79677d261
Updates Lands-ProtectionHook to use v6 of the API
The API changed and we are 2 major versions behind
This drops support for outdated version of *Lands* and re-adds support for the latest version.
2023-03-09 15:53:21 +01:00
Christian Koop
5199043a4b
Minor code refractoring on SongodaAuth
Just trying to make it a bit more readable and easier to understand at a glance.
2023-03-04 13:08:16 +01:00
Christian Koop
6145021ecb
Remove unused imports in SongodaAuth and apply code formatting 2023-03-04 12:47:53 +01:00
Christian Koop
d9586cfe86
Slightly changes wording of 'missing-license' message
+ small refactoring – Putting the *expesive* method calls outside the string into variables
to easier see them, when trying to understand the code and the need
for its own thread for just printing some messages to  the console.
2023-03-04 12:38:33 +01:00
Christian Koop
ca13e8b26e
Prints 'missing-license' message in the console as one long message
This prevents fragmentation of the idividual lines. `#getIP()` can take a couple of seconds
and because it is executed outside of the main-thread, other message can be printed bevore
the IP address and UUID are ready to be printed.
2023-03-04 12:36:20 +01:00
ceze88
386ff209a7 Release v2.6.18 2023-01-25 16:02:44 +01:00
ceze88
7c02457108 Ignore self compiled plugins 2023-01-15 12:23:56 +01:00
Christian Koop
c29c4a5b09
Release v2.6.18-DEV 2023-01-11 22:00:36 +01:00
ceze88
ad6b52ca4a Add license stuff 2023-01-11 21:41:04 +01:00
Christian Koop
dc64c29da7
Ensures UTF-8 usage in LootManager
Probably doesn't affect anything as this file should only contain english letters
but just in case for the sake of tidyness
2023-01-08 12:47:27 +01:00
Christian Koop
339a4d6f6c
Ensures usage of UTF-8 in SongodaYamlConfig
Depending on the environment the default system charset might not be UTF-8 beaking
messages files using non-english language etc.

I'm not sure but Spigot might even set it to ASCII? The tests succeed locally because I am
using Manjaro Linux which uses UTF-8 by default in the JVM. But testing a plugin and logging
the default charset returns ASCII instead (on the same machine).
2023-01-08 12:46:42 +01:00
ceze88
336c5c49f3
Revert "License system"
This reverts commit 10aac8c10f.
2023-01-06 14:02:32 +01:00
ceze88
10aac8c10f License system 2023-01-02 13:39:54 +01:00
ceze88
bd187c7512 Fix max stack size for drops 2022-12-31 20:42:03 +01:00
Christian Koop
842841cd74
Fixes NMS for Spigot 1.19.0 / 1.19.1 / 1.19.2 detection
Purpur-Spigot and plain Spigot do not end with `.0`. Not sure if Paper does or Spigot 1.19.1 does?

I just added the plain `1.19` check.
This is not an issue in the Core v3 branch as the check is more stable there.
2022-12-30 20:09:01 +01:00
Christian Koop
e44e161c89
Adds some additional test cases for MathUtilsTest 2022-12-30 18:23:02 +01:00
Christian Koop
ef6c37b80c
Improve test coverage + stability of configuration.yaml/songoda classes 2022-12-30 18:22:11 +01:00
Christian Koop
7975f9088d
Heavily refactor PlotSquaredProtection.class
Moved code into private methods to make the Location#at call more readable
and to reduce duplicate code.

`PlotSquared.get()` is marked as `@NotNull` and is never null
if `PlotSquaredProtection#isEnabled` returns true.
That's why I removed the `null` check on the *API* with a check if PlotSquared is enabled.

I replaced the usage of Java StreamAPI with a simple for loop for better potential performance.
The loop is so simple and we don't know the plugins that might be using this class,
thus greater performance for a small loss on readability is probably worth it

+ Removed some unused imports
2022-12-30 16:14:08 +01:00
Christian Koop
88e28689f7
Adds ConfigEntry#withDefaultValue for easier chaining
This allows to chain the default value instead of using the setter or constructor.
Long keys/values can be put into individual lines which improves readability.

In the future, we might want to have a Builder class that contains all thise #with methods
2022-12-30 15:21:07 +01:00
Christian Koop
7eff3c86ec
Code cleanup (rename e->ex in catch; better type for #withUpgradeStep) 2022-12-30 15:21:07 +01:00
ceze88
a554934bfa Remove deprecated constructor 2022-12-29 13:49:34 +01:00
ceze88
8f95056e31 A little database utility 2022-12-29 13:49:04 +01:00
ceze88
17fb03f073 Fix pre stacking items 2022-12-29 11:50:51 +01:00
Christian Koop
396f3aefb8
Merge branch 'development' into development-v3 2022-12-26 21:03:31 +01:00
Christian Koop
1a911ee085
Release v2.6.17 2022-12-26 19:59:02 +01:00
Christian Koop
6d28fce312
Updates dependency de.tr7zw:item-nbt-api to support Minecraft 1.19.3 2022-12-26 19:58:33 +01:00
Christian Koop
64865873f9
Adds NMS module for Spigot 1.19.3 (v1_19_R2) support 2022-12-26 13:44:58 +01:00
Christian Koop
296f82f50e
Restore functionality of deprecated SQLite connection acquisition
If the connection is closed, no new SQLite connection is created in plugins still using the
deprecated method.


Introduced in 0ae9c6fcdb
2022-12-26 13:44:58 +01:00
Christian Koop
c3fb050444
Updates dependency UltimateStacker to v2.3.2 2022-12-26 13:44:49 +01:00
Christian Koop
4d194ed92b
Rename constant into upper case to match code conventions 2022-11-26 20:40:57 +01:00
Christian Koop
0b2a253014
Fix typo in JavaDoc 2022-11-26 20:40:28 +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
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
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
6aa9178321
Fix ItemUtils#applyRandomEnchants in Minecraft 1.19
The method needs a `RandomSource` instead of a normal Java `Random`.
The method reference has been updated but updating
its usage has been forgotten.

Sadly I do not really know where to properly
get an `RandomSource` instance without instanciating it myself.
2022-11-07 22:29:40 +01:00
Christian Koop
aff3ea92f3
Fix wrong coreVersion in SongodaCore class 2022-11-07 22:19:19 +01:00
ceze88
e8c0e21ac2 Adds suppoert for PlotSquared and MariaDB for SQL 2022-11-04 12:28:20 +01:00
Christian Koop
31fde88c33
Fix ConcurrentModificationException in DropUtils for UltimateStacker
Related to 92c653d9be
2022-10-26 22:59:00 +02:00
Christian Koop
500ac98f84
Release 2.6.17-SNAPSHOT 2022-10-26 21:59:06 +02:00
Christian Koop
5f43578869
Fix NoSuchFieldError on Paper-Spigot 1.19.2 for SWorld#getLivingEntities
The field does not exist on Spigot (located in another class?).
But `#getEntities()` does exactly what we need and Paper-Spigot still has it.


SD-9374
SD-9377
SD-9392
SD-9401
2022-10-26 21:58:34 +02: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
ceze88
92c653d9be Add max stack size check when pre-stack items with US 2022-09-19 21:04:52 +02:00
ceze88
30d070cade Drop items stacked when UltimateStacker is present 2022-09-19 20:37:34 +02:00
ceze88
d11b32d8ea Update UltimateStacker version 2022-09-19 20:36:38 +02:00
Christian Koop
e3b275b40d
Release v2.6.16 2022-09-04 19:31:58 +02:00
BuildTools
9c47056b46 Version 2.6.16-DEV - Support for 1.19.1/2 spawners. 2022-09-03 01:03:27 -04: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
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
9d7026ec27
Replace SWorldBorder implementation and move it into NMS modules 2022-08-28 16:54:29 +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
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
Fernando Pettinelli
2b7cfcc29a Added ChatMessage fix. 2022-07-03 03:37:49 -04:00
Fernando Pettinelli
2929c628ed 2.6.13 - Added Apache Commons Lang3 and Text. More 1.19 fixes. 2022-06-26 12:27:20 -04:00
Christian Koop
84515e7004
Minor code cleanup in SongodaYamlConfig constructor
keeps the logger effectively final + makes Codacity' static code analysis happy
2022-06-26 13:57:12 +02:00
Christian Koop
ed7b454625
Fix Exception when calling #emergencyStop inside onPluginEnable 2022-06-26 13:46:38 +02:00
Christian Koop
73685b62dd
Mark overwritten and empty config methods in SongodaPlugin as deprecated
The methods should not be used
2022-06-26 13:46:35 +02:00
Christian Koop
7ef00bb8f9
Adjust log levels in SongodaYamlConfig
Level.FINER is currently not logged anthough the Logger is set to ALL and isLoggable returns true for FINER.

There's an bug existing bug report at Spigot: https://hub.spigotmc.org/jira/browse/SPIGOT-7018
2022-06-26 13:46:29 +02:00
Christian Koop
532d96f6c1
Add adventure-api to SongodaCore dependencies 2022-06-26 13:28:10 +02:00
Christian Koop
b0f006aed0
Fix SongodaYamlConfig not creating parent directory when saving
Caused an IOException if the PluginDataDir didn't exist yet.
2022-06-26 13:26:13 +02:00
Christian Koop
e7e3c3d21d
Disable test CompatibileMaterialTest#getMaterialForAllBukkitMaterials
It is highly version dependent and breaks often because of that
2022-06-26 13:25:10 +02:00
Christian Koop
c9a48387de
Fix SongodaYamlConfigTest leaving created backup files in tmp dir 2022-06-26 13:24:16 +02:00
Christian Koop
fce5c5c6a1
Remove Config related methods in SongodaPlugin
Escept for #getExtraConfigs which got renamed, the other methods are no longer required and have been removed.

Additionally the config methods defined by Bukkit's JavaPlugin class
have been overwritten with empty bodies.
This prevents the default behaviour trying to access stuff that's not there
or should not be considered a valid config to use.
2022-06-26 02:38:29 +02:00
Christian Koop
4bc0e991ab
Removes #getConsole in SongodaPlugin 2022-06-26 02:33:09 +02:00
Christian Koop
eb10b3f70a
Introduce new SongodaYamlConfig and ConfigEntry classes
This introduces an additional abstraction layer on top of the YamlConfiguration.
This is the class that should normally be used by plugins.
2022-06-26 01:51:53 +02:00
Christian Koop
02ab8d4bb2
Fix YamlConfiguration dumping null values and empty tree nodes 2022-06-26 01:39:39 +02:00
Christian Koop
885cc9a87e
Fix YamlConfiruration#getKeys("") not returning root node keys 2022-06-26 01:39:39 +02:00
Christian Koop
2683bc12c0
Fix exception on loading empty file in YamlConfiguration 2022-06-26 01:39:39 +02:00
Christian Koop
2262652577
Make YamlConfiguration insertion-sorted
This ensured that the order of the keys is deterministic and be controlled by the developer.
2022-06-26 01:39:39 +02:00
Christian Koop
f6e207cdda
Rename IConfiguration#getOrDefault to #getOr 2022-06-26 01:39:39 +02:00
Fernando Pettinelli
b110a69285 1.19 fixes 2022-06-25 17:59:06 -04:00
Christian Koop
2272fe7b97
Release v2.6.13-DEV 2022-06-20 17:27:01 +02:00
Christian Koop
73c6b9a558
Fixes MathUtils unit tests
Started failing with changes in d25514743f
2022-06-16 20:59:50 +02:00
Christian Koop
d25514743f
Improve exception message for the Eval class 2022-06-16 13:21:58 +02:00
Christian Koop
547425dec9
Update maven-shade-plugin from 3.3.0-SNAPSHOT to 3.3.0 2022-06-07 19:45:24 +02:00
Christian Koop
fc658d51c0
Adds Spigot 1.19 NMS module 2022-06-07 19:31:32 +02:00