25 Commits
Author SHA1 Message Date
Michael Burgess 81ff63a38d Build against latest Paper API and local MobArena; fix CI JDK/artifact upload
build / build (push) Successful in 3m31s
2026-08-06 22:40:32 -04:00
Michael Burgess 3e65b02d72 Fix Gitea CI: add JDK setup, drop unsupported cache action
build / build (push) Failing after 2m42s
2026-08-06 20:28:59 -04:00
Michael Burgess f8ba0e4efc Rename ssl config key to flags
build / build (push) Failing after 13s
2026-08-06 20:08:35 -04:00
Michael Burgess 6f74026514 Use raw JDBC parameter string instead of ssl boolean flag
build / build (push) Failing after 14s
2026-08-06 19:45:09 -04:00
Andreas Troelsen eb77193fbd Release 1.0. 1.0 2022-07-30 15:58:05 +02:00
Andreas Troelsen 2c65d88c62 Link to releases/actions in README.
After the first release we should be able to link to the `/latest` URL
just fine, so we'll just prep it now. We don't really want to maintain
an "official" test builds channel on Discord, so that's out as well.
2022-07-30 15:58:05 +02:00
Andreas Troelsen 627205d39a Qualify getTables() with catalog and schema.
Without these qualifiers, the tables returned by the metadata object
will include tables from _all_ databases in the database instance, which
is definitely not something we want. Not only does this pose a potential
performance impact, it can also return very false positives, which then
result in an (inaptly named) SQLSyntaxErrorException when the subsequent
query to the potentially non-existent table fails.

To reproduce the issue:

- Create two new, empty databases in a fresh MySQL/MariaDB instance.
- Point the extension at one of them.
- Spin up the server, let the extension initialize the database.
- Stop the server.
- Point the extension at the other database.
- Spin the server back up and watch it crash.

By qualifying the `getTables()` call with the catalog and schema of the
underlying connection object, we limit the search to _just_ that catalog
and schema, which is what we wanted all along. According to the method
documentation, the args are _patterns_, where `%` matches substrings and
`_` matches "any character". So by being hyper-specific, we shouldn't
get any more false positives. In testing on MySQL and MariaDB, only the
`catalog` value is non-null (matches the database name), while `schema`
remains null.
2022-07-30 15:58:05 +02:00
Andreas Troelsen 3f7796772e Upgrade Mockito to 3.12.2.
This fixes an issue with the mock maker not running properly on recent
versions of the JVM, and it also matches the version in the base plugin.
2022-07-30 12:10:50 +02:00
Andreas Troelsen f07df6a556 Add compatibility note in README.
build / build (push) Failing after 2m7s
2022-07-26 17:35:01 +02:00
Andreas Troelsen 9e92094501 Ignore leave events for spectators.
Spectators produce leave events, but they won't have a join event that
matches the leave event they produce. This is because spectators either
joined _as_ spectators (spectating doesn't produce join events), or they
_transitioned_ into the spectator state after _dying_ in the session (in
which case they already produced a death event that "cements" the player
session).

This fixes an edge case problem that occurs when a spectator produces a
leave event while exactly one player is currently in the lobby. In this
case, the leave event triggers a session deletion, since the leave event
logic "thinks" the leave event is triggered by the player in the lobby.
It would be possible to prevent that problem with additional checks in
the leave event logic, but the underlying problem really is that leave
events produced by spectators shouldn't be recorded or reacted to in any
way, shape, or form, as they are not relevant to the stats (leave times
are only really relevant if the leave event happens _during_ a session,
which this change does not affect).
2022-07-25 17:30:19 +02:00
Andreas Troelsen 85df0066f1 Remove player entries on leave/death prior to session start.
While we do want to keep track of join and ready times, we really don't
care about those stats for players who join the lobby _and leave_ prior
to the arena actually starting.

Coincidentally, _not_ storing stats for players that don't actually pick
a class means we don't end up trying to insert a `null` value into the
class name column, which should solve the error thrown when trying to do
just that as a result of the auto-start timer kicking players or players
themselves leaving prior to starting.

Fixes #16
2022-07-03 20:58:42 +02:00
Andreas Troelsen ffc6c89eac Fix references to repo in README.
The project has been migrated to the MobArena org, so let's make sure
the links make sense :)
2022-06-21 20:39:09 +02:00
Andreas Troelsen 4ab74b06cb Upgrade MySQL connector to 8.0.28.
Apparently there's a security issue <= 8.0.27. It doesn't really matter
all that much here since we're in the `provided` scope, but better safe
than sorry.
2022-06-21 20:32:20 +02:00
Andreas Troelsen 2745af3d0d Switch to Spigot API and bump version to 1.17.
This brings the repository up to the same Spigot API version as the core
plugin for essentially the same reasons, plus consistency.
2022-05-27 22:47:04 +02:00
Andreas Troelsen 72bb017834 Fix maven-compiler-plugin configuration.
Apparently the whole `<release>` tag shebang doesn't work on jitpack.
Not sure where it comes from.
2021-12-05 13:57:20 +01:00
Andreas Troelsen 57bf8c6472 Add tests for delete session command.
This is just a single sunshine scenario test because that's all the
command supports right now. Issues #2 and #3 highlight some of the
problems with this command, and when those issues are tackled, tests
should be introduced along with the fixes.
2021-08-06 22:13:14 +02:00
Andreas Troelsen 066a15c2af Add query command tests.
Not a lot of variation in these commands, but the output is a little
difficult to write robust tests for because it's all stringly typed.
These tests will break pretty hard (or require lots of adapting) if we
introduce i18n.

The tests don't cover tab completion. That will have to come later.
2021-08-06 22:13:14 +02:00
Andreas Troelsen f96c69bb42 Add import/export command tests.
These are pretty much whitebox tests, so they don't really provide any
improvements to the architecture, but they do add a level of confidence
in terms of refactoring the somewhat unorthodox import/export structure.
2021-08-06 22:13:14 +02:00
Andreas Troelsen 7e08fde493 Pre-instantiate commands.
This commit makes use of the `register(Command)` method in MobArena's
command handler to pre-instantiate the command classes and inject the
main plugin instance in their constructors. This allows us to get rid of
the horrible Singleton anti-pattern.

Closes #6
2021-08-06 22:12:56 +02:00
Andreas Troelsen 1756a08318 Tag along on MobArena's /ma reload command.
This commit adds to the main plugin class a tiny event listener that
listens for MobArena's post-reload event and responds by calling the
internal reload method. This gives us a super cheap way to support
reloads while giving server owners one fewer commands to worry about.

Closes #11
2021-08-01 19:28:37 +02:00
Andreas Troelsen 9f90045f3c Bump MobArena version to commit hash b99713f1.
This allows us to make use of the new upstream functionality before a
new named release is ready. This particular hash contains both the new
reload events as well as the new command registration overload.
2021-08-01 19:21:33 +02:00
Andreas Troelsen 26cb8474db Add bStats metrics.
Introduces the bStats metrics library to the plugin. This first commit
contains just a single custom chart, the `store_type`, which will help
figure out which stores to focus on for performance optimization and
such.
2021-07-06 19:08:31 +02:00
Andreas Troelsen 8cbdb4d9c6 Use MobArena's global messenger for query commands.
Changes the command output in the query commands to the same approach
used in the import/export and delete commands for better consistency
(and arguably prettier output).

It could probably still do with some fine tuning or maybe custmization
options, but that's out of scope for this particular issue.

Closes #1
2021-07-01 23:06:05 +02:00
Andreas Troelsen aa08925f24 Clarify first run procedure in README. 2021-07-01 00:17:56 +02:00
Andreas Troelsen d4a93071fe Initial commit. 2021-07-01 00:17:53 +02:00