Commit Graph

271 Commits (fef9cff5daecea80bc1c8e219f8288a53d2bc1bb)

Author SHA1 Message Date
William 7f75b9a917
refactor: explicitly cancel ArmorStandManipulateEvent 8 months ago
William 93edb0de4c
refactor: slightly adjust how quit cursor item dropping gets handled 8 months ago
Preva1l 4c0addfd67
feat: PostgreSQL, Mongo Atlas & Replica Support (#255)
* Started impl for mongo

* added docs

* refactor of the mongo code, made mongodb artifacts download at run time, tested and working

* complete all change requests

* remove mongo and bson from relocations as they arnt needed

* changed the config

* updated docs

* not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null

* added postgres support (closes https://github.com/WiIIiam278/HuskSync/issues/212)

* add support for mongodb atlas, added atlas and postrgres to docs, update the config example in docs, also updates mongodb driver bc apparently i was special and very very out of data

* Rework how mongo connections are handled, **breaks config for mongo only**, allows for MongoDB Atlas, normal MongoDb AND MongoDB replica sets via the parameters in advanced mongo settings, added try and catch on all mongo operations so that it actually throws instead of a cutsie little warning

* small doc change

* whoops forgot to instantiate MongoCollectionHelper, and added missing step from docs for atlas users

* why thats a tad embarrassing (grammar mistake)

* add cluster id to `/husksync status`, shows "MongoDB Atlas" in status if using mongodb atlas

---------

Co-authored-by: William <will27528@gmail.com>
8 months ago
Preva1l 67dddf0cfa
feat: Add support for MongoDB data storage (#250)
* Started impl for mongo

* added docs

* refactor of the mongo code, made mongodb artifacts download at run time, tested and working

* complete all change requests

* remove mongo and bson from relocations as they arnt needed

* changed the config

* updated docs

* not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null

---------

Co-authored-by: William <will27528@gmail.com>
9 months ago
William 318aacd432
refactor: minor tidy up 9 months ago
Timon Michel ba1b2ff62e
fix: improve event cancellation logic for better plugin compat (#246) 9 months ago
William278 b9434a56e8 refactor: minor Bukkit platform refactors 10 months ago
William 267cf1ff35
fix: wrong URL on startup exception 10 months ago
William 350a8b864d
fix: bad ConfigProvider logic 10 months ago
William278 9fc9e8caf4 refactor: use lombok in a few other places 10 months ago
William278 2e3db2fffa refactor: use Guava methods in various places 10 months ago
William 530b3ef24d
refactor: Migrate from BoostedYaml to Exll's ConfigLib (#233)
* feat: start work on moving to Exll's configlib

* refactor: Fully migrate to Exlll's configlib

* refactor: Optimize imports
10 months ago
William278 85706d97c5 refactor: move `unregister` to common API module 10 months ago
William278 685431a40d api: add cross-platform API support 10 months ago
William278 24453d0e1a build: Require Java 17, Minecraft 1.17.1 10 months ago
William 414246f243
fix: Handle Bukkit objects that don't fully implement `Keyed` 11 months ago
William 29bd2e1319
feat: Add `/husksync status` report menu 11 months ago
William 2475a9b3c6
docs: Fix license headers 11 months ago
William 8d2e5a6a52
fix: `Enum#valueOf` throwing on legacy stat-map conversion 11 months ago
William d4f61bd646
refactor: catch `Throwable`, not `Exception` 11 months ago
William 2aa33b2f2c
fix: Improve accuracy of max health syncing #148 11 months ago
William 972fee1bc7
fix: Fix flight syncing sometimes failing, close #206 11 months ago
William c2025350ba
fix: Optimize imports 11 months ago
William 4c2bb5c6df
fix: Get correct platform Audience for OnlineUsers 11 months ago
William fb069296e1
refactor: Use native adventure implementation on Paper 11 months ago
William aa09639e55
Fix persisted locked map banner rotation 1 year ago
William278 b205643fdd Fix duplicate cursor creation, close #185 1 year ago
William 2db3bb313f
docs: Add v4.9.2 MPDB converter warning 1 year ago
William 4d23377a18
Ensure `#setContents` always sets correct size 1 year ago
William 51116cbdfb
docs: Minor updates to links/legacy migration 1 year ago
William 7db3ed678f
Paper plugin support, save player itemsToKeep rather than drops if not empty (#179)
* Paper plugin support, save itemsToKeep if present, close #172

* Fixup wrong packages, suppress a warning

* Update docs, add settings for death saving, reorganise config slightly

* Improve default server name lookup

* docs: Add note on Unsupported Versions

* docs: Minor Sync Modes tweaks
1 year ago
William 6d9e68a65b
sync: Terminate syncer connection before redis 1 year ago
William 2c33f3b0b4
stats: Add exception handling for legacy materials 1 year ago
William c002d86fc0
Persist extra-terrestrial locked maps to disk (#180)
* Persist extra-terrestrial maps to disk, close #157

* Fix issue writing map file caches

* Don't bother synchronously rendering maps
1 year ago
William cae17f6e68
Introduce new lockstep syncing system, modularize sync modes (#178)
* Start work on modular sync systems

* Add experimental lockstep sync system, close #69

* Refactor RedisMessageType enum

* Fixup lockstep syncing

* Bump to 3.1

* Update docs with details about the new Sync Modes

* Sync mode config key is `mode` instead of `type`

* Add server to data snapshot overview

* API: Add API for setting data syncers

* Fixup weird statistic matching logic
1 year ago
Galen Huang 0fd29bca57
Fixed an error in stats map caused by modded block/item being null (#171) 1 year ago
William d245245083
Fix `#get` call when appling locked map data, Fix #169 1 year ago
William 2b55e129b3
Slightly improve `BukkitData.Items#setContents` method 1 year ago
William 0caec74436
Improve stat map resilience for modded block types 1 year ago
William 55e443cd49
Improve error handling on data sync 1 year ago
William b63e1bd283
Fixup adapting health when scaling 1 year ago
William 575122e6dd
Tweak max health syncing calculation, add config option 1 year ago
William 856cbb9caa
Allow conversion of v1-v3 data snapshots 1 year ago
William 7034a97d3a
Fix wrong timestamp/UUID being used for legacy conversion (#167)
* Maintain legacy snapshot IDs when updating

* Also maintain timestamps during conversion

* Actually implement timestamp fix in LegacyConverter
1 year ago
William 105f65c93a
v3.0: New modular, more compatible data format, new API, better UX (#160)
* Start work on v3

* More work on task scheduling

* Add comment to notification display slot

* Synchronise branches

* Use new HuskHomes-style task system

* Bump to 2.3

* Remove HuskSyncInitializationException.java

* Optimise database for MariaDB

* Update libraries, move some around

* Tweak command registration

* Remove dummyhusksync

* Fixup core synchronisation logic to use new task system

* Implement new event dispatch subsystem

* Remove last remaining future calls

* Remove `Event#fire()`

* Refactor startup process

* New command subsystem, more initialization improvements, locale fixes

* Update docs, tweak command perms

* Reduce task number during data setting

* add todo

* Start work on data format / serialization refactor

* More work on Bukkit impl

* More serialization work

* Fixes to serialization, data preview system

* Start legacy conversion skeleton

* Handle setting empty inventories

* Start on-the-fly legacy conversion work

* Add advancement conversion

* Rewrite advancement get / apply logic

* Start work on locked map persistence

* More map persistence work

* More work on map serialization

* Move around persistence logic

* Add testing suite

* Fix item synchronisation

* Finalize more reliable locked map persistence

* Remove deprecated method call

* remove sync feature enum

* Fix held item slot syncing

* Make data types modular and API-extensible

* Remove some excessive debugging, minor refactor

* Fixup date formatting, improve menu UIs

* Finish up legacy data converting

* Null safety in item stack serializaiton

* Fix relocation of nbtapi, update dumping docs

* Add v1/MPDB Migrators back in

* Fix pinning/unpinning data not working

* Consumer instead of Function for editing data

* Show file size in DataSnapshotOverview

* Fix getIdentifier always returning empty

* Re-add items and inventory GUI commands

* Improve config file, fixup data restoration

* Add min time between backups (more useful backups!)

* More work on backups

* Fixup backup rotation frequency

* Remove stdout debug print in `#getEventPriority`

* Improve sync complete locale logic, fix synchronization spelling

* Remove `static` on exception

* Use dedicated thread for Redis, properly unsubscribe

* Refactor `player` package -> `user`

* `PlayerDataHolder` -> `UserDataHolder`

* Make `StatisticsMap` public, but `@ApiStatus.Internal`

* Suppress unused warnings on `Data`

* Add option to disable Plan hook

* Decompress legacy data before converting

* Decompress bytes in fromBytes

* Check permission node before serving TAB suggestions

* Actually convert legacy item stack data

* Fix syntax errors

* Minor method refactor in items command

* Fixup case-sensitive parsing in HuskSync command

* Start API work

* More work on API, fix potion effects

* Fix cross-server, config formatting for auto-pinned issue

* Fix confusion with UserData command, update docs images

* Update commands docs

* More docs updating

* Fix sync feature enabled/disabled checking logic

* Fix `#isCustom()`

* Enable persistent_data syncing by default

* docs: update Sync-Features config snippet

* docs: correct typo in Sync Features

* More API work

* bukkit: slightly optimized schedulers

* More API work, various refactorings

* docs: Start new API docs

* bump dependencies

* Add some basic unit tests

* docs: Correct typos

* More docs work, annotate DB methods as `@Blocking`

* Encapsulate `RedisMessage`, minor optimisations

* api: Simplify `#getCurrentData`

* api: Simplify `editCurrentData`, using `ThrowingConsumers` for better error handling

* docs: More Data Snapshot API documenting

* docs: add TOC to Data Snapshot API page

* bukkit: Make data types extend BukkitData

* Move where custom data is stored, finish up Custom Data API docs

* Optimise imports

* Fix `data_manager_advancements_preview_remaining` locale

* Fix advancement and playtime previews

* Fix potion effect deserialization

* Make snapshot_backup_frequency default to 4, more error handling/logging

* docs: Add ToC to Custom Data API

* docs: Minor legacy API tweaks

* Remove some unneeded catch logic

* Suppress a few warnings

* Fix Effect constructor being supplied in wrong order
1 year ago
William bd83c8935d
Tweak database connection confirmation messages 1 year ago
William 12e882fe22
v2.2.6: Crafting inventory safety, Maria v11 support (#153)
* Clear player inventory crafting slots on sync

* Bundle Maria driver for v11 support
1 year ago
Joo200 97ad608d56
Add mariadb protocol option type (#145)
Co-authored-by: William <will27528@gmail.com>
1 year ago
William f6aab54d4d
license: Relicense under Apache-2.0 1 year ago
kFor c306d700ce
Option to blacklist all commands (#138)
* Option to blacklist all commands

* blacklist all commands by default

---------

Co-authored-by: William <will27528@gmail.com>
1 year ago
Rafael Romão bbcb091daf
Fix locked map data saving (#140) 1 year ago
William 6bd12dc000
Update DesertWell to 2.0.2, improve adventure API usage 2 years ago
William 1afbd3753a
Merge remote-tracking branch 'origin/master'
# Conflicts:
#	.github/workflows/java_ci.yml
#	build.gradle
2 years ago
William 38a063420b
Add license headers 2 years ago
William 0fae3484a1
Add workflow files, test reporting, maven publishing, docs, bump version 2 years ago
William 7bb4bff485
Make case conversion operations use the English locale 2 years ago
evlad 2c1a38f2c9
Disable all projectiles while player is in sync (#127) 2 years ago
William 7ed7d0a29e
Add additional cast checking to PDC tag fetching, cast via complex type (#118) 2 years ago
William278 e7e7995e4e Bump dependencies 2 years ago
William278 af57cfcf70 Fix `log` method not logging throwables 2 years ago
William a9b1070725
Encapsulate Settings, tweak keys, add empty dead player save option, close #73 2 years ago
William278 ce3350c6fa Fix shutdown crash with PDC (rollback switch to using task) 2 years ago
William 1d7f6a8d8b
refactor: Use mappings class for PDC tag type handling 2 years ago
evlad 2d1d8f1ab6
Sync lock: Cancel item frame interaction, add command blacklist (#84)
Co-authored-by: William <will27528@gmail.com>
2 years ago
William d6d9a55f72 Fix unchecked cast on trident launch locking, fix #79 2 years ago
William e3070a65ab Ensure player isn't locked before force-dropping items 2 years ago
William a8b4696604 Minor style tweaks 2 years ago
William 7f5ca6206b
Merge pull request #76 from ItsWagPvP/patch-1 2 years ago
evlad 94717637ba fix dupe with trident when player is locked 2 years ago
William f6663f0c09 Refactor; consolidate Logger and ResourceReader, simplify certain method arguments 2 years ago
William c2c5a424fb Add checks against the user being an NPC 2 years ago
Gabriele Cabrini ce41053e87
Fixed issue #74
Added the code that @alexdev03 suggested
2 years ago
William 5817de83e5 Fix locked map data not being applied in some cases 2 years ago
William 30dd48ce88 Add additional checks and error handling when setting health 2 years ago
William 9019181208 Merge remote-tracking branch 'origin/master' 2 years ago
William 99483387f1 Add additional error handling for player health and statistic updating 2 years ago
evlad 71706bf9ae expose locked players + add a method on OnlineUser 2 years ago
William 9dc5577175 Clear the player's cursor when setting inventory contents 2 years ago
William 2017ecc20f Minor refactoring / code improvements 2 years ago
William c4b194f8d6 Fix unlocked maps getting wrongly locked 2 years ago
William d682e6e6c6 Fix notifications through Toast AndJam library 2 years ago
William 6fef9c4eae Remove map itemstack debug logging mess 2 years ago
William278 16eee05065 Add notification slot configuration, support for toasts 2 years ago
William 5af8ae0da5 Use canvas rendering approach, finish locked map synchronisation 2 years ago
William278 c0709f82bd Add the ability to synchronise/persist locked maps cross-server, close #14 2 years ago
William278 945b65e1bc Minor performance improvement to event cancelling, add checks against inventory clicks 2 years ago
William 30cd89c578 Remove unnecessary debug 2 years ago
William bb3753b8e4 Fix typo 2 years ago
William 3bfea58f35 Make event priority configurable for three key events 2 years ago
William bac760165e Tweak logic for determining if a player is dead, fix issues with <1HP players being detected dead 2 years ago
William dd39482ed1 Tweaked bukkit implementation of #isDead detection 2 years ago
William 089ea5b63a Fix unsafe joins on inventory and ender chest commands, better exception catching, Close #58 2 years ago
William 5b8de7967b Fix it not being possible to creative-middle-click-clone item stacks from un-editable inventory snapshot views, close #44 2 years ago
William 4fddbc2b32 Automatically expand menus to accommodate custom inventory/echest sizes, close #45 2 years ago
William 43cd367ca3 TriumphGUI for menus, fix missing inv/echest view message, fix data saving despite no updates, close #42 2 years ago
William c3b339b3dd Minor cleanup, tweak listener method names 2 years ago
William 2b91154ca2 Ensure players have their inventory contents saved on death 2 years ago
William 89d8b79ae3 Add ability to save user data on player death 2 years ago
William acd97a1cb0 Migrate config to Annotaml 2 years ago
William 7536bfaaf5 Add `/userdata dump` command, for file/web dumping of user data json 2 years ago