mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Adjust schema, fix commands and user data refactoring
This commit is contained in:
1 parent
ec1c0b744f
commit
ff2465ac85
12 files changed
+120
-105
No files matched your search
@@ -37,8 +37,8 @@ public class HomeCommand extends CommandBase implements TabCompletable, ConsoleE
|
||||
if (RegexUtil.OWNER_NAME_PATTERN.matcher(homeName).matches()) {
|
||||
final String ownerName = homeName.split("\\.")[0];
|
||||
final String ownersHomeName = homeName.split("\\.")[1];
|
||||
plugin.getDatabase().getUserByName(ownerName).thenAccept(optionalUserData -> optionalUserData
|
||||
.ifPresentOrElse(userData -> plugin.getTeleportManager().teleportToHome(onlineUser, userData, ownersHomeName),
|
||||
plugin.getDatabase().getUserDataByName(ownerName).thenAccept(optionalUserData -> optionalUserData
|
||||
.ifPresentOrElse(userData -> plugin.getTeleportManager().teleportToHome(onlineUser, userData.user(), ownersHomeName),
|
||||
() -> plugin.getLocales().getLocale("error_home_invalid_other", ownerName, homeName)
|
||||
.ifPresent(onlineUser::sendMessage)));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user