mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2026-01-06 15:41:56 +00:00
feat: rework locked maps syncing (#464)
* Better maps syncing (#2) * Do not create new views for maps from current world * Fix maps in shulkers not converting * Add bundle support for map conversion * Rework map sync * Fix empty statements in database * Fix missing imports * Rename connectMapIds -> bindMapIds * Use data adapter to save maps * Split Mongo readMapData * Split MySQL readMapData * Split Postgres readMapData * Update database schemas Use server names instead of world UUIDs * Update Database class * Update MongoDbDatabase class * Update MySqlDatabase class * Update PostgresDatabase class * Update BukkitMapPersister class Use server names instead of world UUIDs * Remove unused code * Add my nickname to contributors :) * Start implementing Redis map caching * Continue implementing Redis map caching * Bind map ids on Redis before writing to DB * Finish implementing Redis map data caching * refactor: decouple new map logic Redis caching from DB * test: enable debug logging in test suite * docs: update docs with new username method * feat: adjust a method name --------- Co-authored-by: Sóla Lusøt <60041069+solaluset@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ huskSyncAPI.getUser(uuid).thenAccept(optionalUser -> {
|
||||
}
|
||||
|
||||
// The User object provides methods for getting a user's UUID and username
|
||||
System.out.println("Found %s", optionalUser.get().getUsername());
|
||||
System.out.println("Found %s", optionalUser.get().getName());
|
||||
});
|
||||
```
|
||||
</details>
|
||||
@@ -51,7 +51,7 @@ huskSyncAPI.getUser(uuid).thenAccept(optionalUser -> {
|
||||
```java
|
||||
// Get an online user
|
||||
OnlineUser user = huskSyncAPI.getUser(player);
|
||||
System.out.println("Hello, %s!", user.getUsername());
|
||||
System.out.println("Hello, %s!", user.getName());
|
||||
```
|
||||
</details>
|
||||
|
||||
@@ -67,7 +67,7 @@ System.out.println("Hello, %s!", user.getUsername());
|
||||
// Get a user's current data
|
||||
huskSyncAPI.getCurrentData(user).thenAccept(optionalSnapshot -> {
|
||||
if (optionalSnapshot.isEmpty()) {
|
||||
System.out.println("Couldn't get data for %s", user.getUsername());
|
||||
System.out.println("Couldn't get data for %s", user.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ huskSyncAPI.getCurrentData(user).thenAccept(optionalSnapshot -> {
|
||||
// Get a user's latest saved snapshot
|
||||
huskSyncAPI.getLatestSnapshot(user).thenAccept(optionalSnapshot -> {
|
||||
if (optionalSnapshot.isEmpty()) {
|
||||
System.out.println("%s has no saved snapshots!", user.getUsername());
|
||||
System.out.println("%s has no saved snapshots!", user.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ huskSyncAPI.getLatestSnapshot(user).thenAccept(optionalSnapshot -> {
|
||||
// Get a user's saved snapshots
|
||||
huskSyncAPI.getSnapshots(user).thenAccept(optionalSnapshots -> {
|
||||
if (optionalSnapshots.isEmpty()) {
|
||||
System.out.println("%s has no saved snapshots!", user.getUsername());
|
||||
System.out.println("%s has no saved snapshots!", user.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user