mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Tweak caching for private home list viewing, fix #222
This commit is contained in:
1 parent
39931dba04
commit
c56936d9d5
3 files changed
+11
-11
No files matched your search
@@ -53,8 +53,8 @@ public class HomeListCommand extends CommandBase implements ConsoleExecutable {
|
||||
* @param pageNumber page number to display
|
||||
*/
|
||||
private void showHomeList(@NotNull OnlineUser onlineUser, @NotNull String homeOwner, int pageNumber) {
|
||||
if (plugin.getCache().privateHomeLists.containsKey(onlineUser.uuid)) {
|
||||
onlineUser.sendMessage(plugin.getCache().privateHomeLists.get(onlineUser.uuid).getNearestValidPage(pageNumber));
|
||||
if (plugin.getCache().privateHomeLists.containsKey(homeOwner)) {
|
||||
onlineUser.sendMessage(plugin.getCache().privateHomeLists.get(homeOwner).getNearestValidPage(pageNumber));
|
||||
return;
|
||||
}
|
||||
plugin.getDatabase().getUserDataByName(homeOwner).thenAccept(optionalUser -> optionalUser.ifPresentOrElse(userData -> {
|
||||
|
||||
Reference in new issue
Block a user