100 Commits
Author SHA1 Message Date
SKBotNL 35feaf6925 Cancel and join coroutines before shutting down Redis and the BalanceManager 2026-09-19 17:20:59 +02:00
SKBotNL aba9961d7c Fix currency items disappearing on pick up when inventory is almost full 2026-09-19 17:20:08 +02:00
SKBotNL 2e64c211c9 Ignore cancelled events for a few event handlers 2026-09-19 17:19:03 +02:00
SKBotNL 9835d793ef Add tests for command permission checks 2026-09-19 17:05:33 +02:00
SKBotNL b65077adc6 Lock entire inventory for everything when the transaction lock is applied 2026-09-19 00:18:34 +02:00
SKBotNL c1452b7960 Add admin permission check in /diamondbankreload 2026-09-19 00:12:34 +02:00
SKBotNL fc6ea8180b Fix renamed Shards duplication by only checking for the key 2026-09-19 00:08:24 +02:00
SKBotNL bb29c4b0cd Make PostgreSQL maxActiveConnections configurable 2026-09-17 23:42:09 +02:00
SKBotNL 37bd40a423 Check that sender isn't equal to receiver in playerPayPlayer 2026-09-17 23:31:01 +02:00
SKBotNL f62c6901f6 Set maxActiveConnections for PostgreSQL to 6 2026-09-17 23:27:03 +02:00
SKBotNL 85d104269f Prevent deadlock in internalAddToPlayerShards by introducing internalGetShardTypeShards 2026-09-17 23:25:12 +02:00
SKBotNL 232e663387 wait -> block in Javadoc of API functions 2026-09-17 22:05:29 +02:00
SKBotNL cbf6a93921 Fix player being seen as invalid during first session 2026-09-17 22:03:32 +02:00
SKBotNL be66beeabb Don't count currency in shulker boxes until logic to actually handle them is added 2026-09-17 21:48:09 +02:00
SKBotNL efec3643ca Fix incorrect count of currency in InventorySnapshotUtils by using PlayerInventoryExtensions' implementations instead 2026-09-17 21:46:40 +02:00
SKBotNL 586f05236b Support the offhand slot for transactions
Also fixes armor and offhand items being lost when restoring an inventory snapshot to an offline player
2026-09-17 16:43:42 +02:00
SKBotNL c2ccd0e08a Clean up BukkitMock 2026-09-16 22:18:22 +02:00
SKBotNL 5db91f6c47 Update Utilities-OG 2026-09-16 18:52:12 +02:00
SKBotNL d46e12f49c Validate player in addToPlayerBankShards and subtractFromPlayerBankShards 2026-09-16 18:07:53 +02:00
SKBotNL aec94d3106 Only fall back to getOfflinePlayer when necessary 2026-09-16 18:02:29 +02:00
SKBotNL 75b10d97c4 Add offline player support
Using the new Utilities-OG player data API for TrueOG Purpur server jars
2026-09-16 17:05:46 +02:00
SKBotNL 72d876ec28 Add Utilities-OG dependency 2026-09-16 16:49:09 +02:00
SKBotNL 85723e3f50 Check if baltop offset is not negative 2026-07-29 12:24:05 +02:00
SKBotNL 5c3e8f0e5d Return InsufficientFundsException as a failure instead of throwing 2026-07-29 12:23:32 +02:00
SKBotNL 497cd0596d Call correct getShardTypeShards function in internalAddToPlayerShards 2026-07-29 12:13:27 +02:00
SKBotNL 1349976c36 Make sendUpdate dispatch listeners in order
Assisted-by: Claude:claude-sonnet-5
2026-07-28 17:36:45 +02:00
SKBotNL c0c19fa427 Require sender and receiver to not be equal in transferBankShards and add tests 2026-07-28 17:28:03 +02:00
SKBotNL 157c28a6ed Make Kotlin playerPayPlayer API return SenderNotOnlineException instead of PlayerNotOnlineException 2026-07-28 17:26:02 +02:00
SKBotNL 54c6d4f55d Require shard arguments for transferBankShards to not be negative and add tests
Assisted-by: Claude:claude-sonnet-5
2026-07-28 17:17:35 +02:00
SKBotNL 28754aebf9 Replace manual inventory locking functions using withLock(Suspend) {} 2026-07-28 17:06:55 +02:00
SKBotNL ba1a01877f Clean up test in CachingBalanceManagerTest.kt 2026-07-28 15:56:43 +02:00
SKBotNL 3433dd81b8 Bugfix for transferBankShards and update pay tests 2026-07-28 15:48:47 +02:00
SKBotNL 8a58cb6b9d Move exceptions in setPlayerShards into the transaction block 2026-07-28 15:07:47 +02:00
SKBotNL ba728b0cb0 Make bank shard transfer one transaction 2026-07-28 14:49:16 +02:00
SKBotNL 9f5153a043 Prevent deadlock in listener 2026-07-28 13:00:39 +02:00
SKBotNL 53dc0b80e6 Handle InsufficientBalanceException in API 2026-07-28 12:37:15 +02:00
SKBotNL 7c8e78967c Log instead of throw in handleError 2026-07-28 12:31:16 +02:00
SKBotNL 20fbedddee Handle PlayerRespawnEvent instead of PlayerDeathEvent + fixes/clean up for other handlers
PlayerRespawnEvent should handle both respawing from a death and "respawning" by entering/being teleported to a different world
2026-07-28 00:24:13 +02:00
SKBotNL 1d89159cce Don't expose fields that should be private and remove redundant modifier from DiamondBankOG 2026-07-27 16:33:14 +02:00
SKBotNL cc334fcb4a Recount inventory and ender chest shards on main thread in onPlayerJoin 2026-07-27 16:17:42 +02:00
SKBotNL 28d23e2d22 Recount inventory and ender chest shards on death 2026-07-27 16:17:15 +02:00
SKBotNL 76f791397c Recount inventory and ender chest shards on quit 2026-07-27 16:05:47 +02:00
SKBotNL 998690c164 Disallow negative shard input values for the API 2026-07-27 15:59:58 +02:00
SKBotNL d648a5791e Remove unnecessary DelicateCoroutinesApi OptIn 2026-07-27 15:43:51 +02:00
SKBotNL 30854e5a3e CachingBalanceManager lock improvements 2026-07-27 15:41:35 +02:00
SKBotNL a4cd78c97d Check for insufficient balance in CachingBalanceManager.kt and add test 2026-07-27 14:27:29 +02:00
SKBotNL 3c5e90b207 Fix not cached case for addToBankShards by not over complicating 2026-07-26 23:45:58 +02:00
SKBotNL 4bd63785e6 Some caching bugs fixed using the added tests for CachingBalanceManager.kt
Assisted-by: Claude:claude-sonnet-5
2026-07-21 12:47:40 +02:00
SKBotNL 6ea73e720b Use assertAll for Cache tests with multiple assertions 2026-07-21 12:13:03 +02:00
SKBotNL 15f3afac1c Fix logic issues in Cache.kt and add tests to hopefully avoid issues in the future 2026-07-20 22:07:36 +02:00
SKBotNL 9bef243cce Move balance matching check after cache decrement 2026-07-20 20:16:35 +02:00
SKBotNL e9f5bda55f Small cleanup 2026-04-06 21:58:52 +02:00
SKBotNL 8620b5c39d Restructure 2026-04-06 21:52:08 +02:00
SKBotNL 7d10264fb2 Update dependencies 2026-04-06 14:14:57 +02:00
SKBotNL c881ca1990 Make passwords optional 2026-04-06 14:11:57 +02:00
SKBotNL 408c94f71d Split URL config value for PostgreSQL and Redis into specific config values 2026-04-06 13:12:25 +02:00
SKBotNL 01df53ede5 Make the config only expose getters 2026-04-06 12:08:54 +02:00
SKBotNL 025cbf610c Use handleError instead of manually setting economyDisabled in onPlayerJoin 2026-04-05 20:58:38 +02:00
SKBotNL b16163ff81 Remove unnecessary MiniMessage tags and more double spaces 2026-04-05 19:51:35 +02:00
SKBotNL c5e90083d3 Remove double spaces in some messages 2026-04-05 19:28:56 +02:00
SKBotNL e7cb147af8 Remove now unused Postgres table and log limit config options 2026-04-05 19:00:50 +02:00
SKBotNL 3a7b21441b Add automatically calculated "total" field to PlayerShards 2026-04-04 17:20:14 +02:00
SKBotNL b5b88ecd13 Use Flyway for database migrations 2026-04-04 17:15:02 +02:00
SKBotNL 8ca71054cb Add toggle debug command for cache monitoring 2026-04-04 15:50:02 +02:00
SKBotNL 8fbdfe24ff Remove unused command 2026-04-04 15:50:02 +02:00
SKBotNL a81ff8de57 Switch to a thread-safe list in EventManager 2026-04-04 13:22:29 +02:00
SKBotNL 5264d09ea8 Clean up test and format 2026-04-03 15:34:03 +02:00
SKBotNL bbcdd87868 Add assert for checking the status of the transaction lock 2026-04-03 15:31:46 +02:00
SKBotNL 90610d7875 Remove debug print from BukkitMock 2026-04-03 15:19:14 +02:00
SKBotNL 54d3369718 Use transactions for most SQL queries 2026-03-10 17:38:01 +01:00
SKBotNL 6c9c822a2e Add tests 2026-03-10 17:10:51 +01:00
SKBotNL ba5f4869a1 Fix empty add map calculation 2026-03-10 17:08:14 +01:00
SKBotNL ea32e759c1 Move inventory locking code into transaction lock in withdraw 2026-03-09 21:28:03 +01:00
SKBotNL 62b93487f3 Remove dead code and improve summary generator code in compress 2026-03-09 21:26:54 +01:00
SKBotNL 0482d211d2 Change removeShards error handler in deposit 2026-03-06 16:30:58 +01:00
SKBotNL 4c099dd6df Use CommonOperations.shardsToDiamondsFull everywhere 2026-02-25 17:38:13 +01:00
SKBotNL 901aed5f9e Notify player about depositing of excess change 2026-02-25 17:24:03 +01:00
SKBotNL 7e9f744f2d Use correct variable 2026-02-25 17:21:40 +01:00
SKBotNL 07615d98b3 Remove InsufficientInventorySpaceException 2026-02-25 17:15:53 +01:00
SKBotNL ab1ef1d97f Add change that doesn't fit in inventory to bank account 2026-02-24 23:10:40 +01:00
SKBotNL 5fa734adc3 Always disable economy on DatabaseException 2026-02-24 22:49:08 +01:00
SKBotNL ca5b8ff92f Add missing notes parameter to signature 2026-02-21 12:28:33 +01:00
SKBotNL 64e186a222 Make the MoreThanOneDecimalDigitException a RuntimeException 2026-02-21 12:25:30 +01:00
SKBotNL 3389edf65a Add double overload for diamondsToShards 2026-02-20 22:22:48 +01:00
SKBotNL 767886dcf7 Clean up player fetching code 2026-02-13 16:47:56 +01:00
SKBotNL 275c83e88d Clean up balance 2026-02-13 16:46:49 +01:00
SKBotNL a47e892841 Fix incorrect calculation of change on withdraw 2026-02-13 16:36:33 +01:00
SKBotNL f7b19d2f66 Correct documentation inaccuracy 2026-02-13 16:12:39 +01:00
SKBotNL f2b98bdd56 Use shardsToDiamonds internally 2026-02-13 16:10:26 +01:00
SKBotNL 41f7fed038 Add shardsToDiamonds API 2026-02-13 16:07:13 +01:00
SKBotNL 55b9933520 Add Java signatures to API README 2026-02-12 20:52:24 +01:00
SKBotNL e8940c8d75 Add diamondsToShards API and API docs 2026-02-12 19:52:46 +01:00
SKBotNL 4dd96dd13d Correct comment 2026-01-24 12:46:24 +01:00
SKBotNL 7e11dd797a Merge branch 'atomicity' 2026-01-23 23:22:44 +01:00
SKBotNL db5120242a Comment build.gradle.kts 2026-01-23 23:17:26 +01:00
SKBotNL e3e503f197 Add extra safety check to addToPlayerShards 2026-01-23 23:14:47 +01:00
SKBotNL c6e1825efa Make Spotless do the formatting 2026-01-23 22:17:42 +01:00
SKBotNL 88760b70bb Reintroduce playerPayPlayer and consumeFromPlayer (was withdrawFromPlayer) 2026-01-23 22:16:54 +01:00
SKBotNL e6327e6e1a Write to transaction log on deposit, withdraw and pay 2026-01-23 17:14:54 +01:00
SKBotNL a36c17bb96 Improve error handling 2026-01-23 17:11:31 +01:00