mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2026-01-04 15:31:37 +00:00
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>
This commit is contained in:
@@ -35,23 +35,28 @@ brigadier_tab_completion: false
|
||||
enable_plan_hook: true
|
||||
# Database settings
|
||||
database:
|
||||
# Type of database to use (MYSQL, MARIADB)
|
||||
# Type of database to use (MYSQL, MARIADB, POSTGRES, MONGO)
|
||||
type: MYSQL
|
||||
# Specify credentials here for your MYSQL or MARIADB database
|
||||
# Specify credentials here for your MYSQL, MARIADB, POSTGRES OR MONGO database
|
||||
credentials:
|
||||
host: localhost
|
||||
port: 3306
|
||||
database: HuskSync
|
||||
username: root
|
||||
password: pa55w0rd
|
||||
# Only change this if you have select MYSQL, MARIADB or POSTGRES
|
||||
parameters: ?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
# MYSQL / MARIADB database Hikari connection pool properties. Don't modify this unless you know what you're doing!
|
||||
# MYSQL, MARIADB, POSTGRES database Hikari connection pool properties. Don't modify this unless you know what you're doing!
|
||||
connection_pool:
|
||||
maximum_pool_size: 10
|
||||
minimum_idle: 10
|
||||
maximum_lifetime: 1800000
|
||||
keepalive_time: 0
|
||||
connection_timeout: 5000
|
||||
# Advanced MongoDB settings. Don't modify unless you know what your doing!
|
||||
mongo_settings:
|
||||
using_atlas: false
|
||||
parameters: ?retryWrites=true&w=majority&authSource=HuskSync
|
||||
# Names of tables to use on your database. Don't modify this unless you know what you're doing!
|
||||
table_names:
|
||||
users: husksync_users
|
||||
@@ -113,25 +118,26 @@ synchronization:
|
||||
# Which data types to synchronize.
|
||||
# Docs: https://william278.net/docs/husksync/sync-features
|
||||
features:
|
||||
persistent_data: true
|
||||
inventory: true
|
||||
game_mode: true
|
||||
advancements: true
|
||||
experience: true
|
||||
ender_chest: true
|
||||
potion_effects: true
|
||||
location: false
|
||||
statistics: true
|
||||
health: true
|
||||
ender_chest: true
|
||||
experience: true
|
||||
advancements: true
|
||||
game_mode: true
|
||||
inventory: true
|
||||
persistent_data: true
|
||||
hunger: true
|
||||
health: true
|
||||
statistics: true
|
||||
location: false
|
||||
# Commands which should be blocked before a player has finished syncing (Use * to block all commands)
|
||||
blacklisted_commands_while_locked:
|
||||
- '*'
|
||||
# Event priorities for listeners (HIGHEST, NORMAL, LOWEST). Change if you encounter plugin conflicts
|
||||
event_priorities:
|
||||
quit_listener: LOWEST
|
||||
join_listener: LOWEST
|
||||
quit_listener: LOWEST
|
||||
death_listener: NORMAL
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user