Tweak edit UI, add teleport button and fixes to delhome

This commit is contained in:
William committed 2022-08-16 16:04:19 +01:00
1 parent 1a280393ea
commit fd2fb72d3d
4 files changed
+26 -29

No files matched your search

@@ -40,7 +40,7 @@ public class DelHomeCommand extends CommandBase implements TabCompletable, Conso
return;
}
}
deletePlayerHome(onlineUser, userData.user(), homeName);
deletePlayerHome(onlineUser, userData.user(), homeIdentifier.homeName());
},
() -> plugin.getLocales().getLocale("error_home_invalid_other",
homeIdentifier.ownerName(), homeIdentifier.homeName()).ifPresent(onlineUser::sendMessage))),
@@ -64,7 +64,7 @@ public class DelHomeCommand extends CommandBase implements TabCompletable, Conso
if (deleted) {
plugin.getLocales().getLocale("home_deleted", homeName).ifPresent(deleter::sendMessage);
} else {
plugin.getLocales().getLocale("error_home_invalid_other", homeName).ifPresent(deleter::sendMessage);
plugin.getLocales().getLocale("error_home_invalid", homeName).ifPresent(deleter::sendMessage);
}
} else {
if (deleted) {
@@ -81,14 +81,11 @@ public class EditHomeCommand extends CommandBase implements TabCompletable, Cons
private void editHome(@NotNull Home home, @NotNull OnlineUser editor,
@Nullable String editOperation, @Nullable String editArgs) {
if (editOperation == null) {
try {
boolean otherOwner = editor.uuid.equals(home.owner.uuid);
home.getHomeEditorWindow(plugin.getLocales(), otherOwner, plugin.getSettings().crossServer,
!otherOwner || editor.hasPermission(Permission.COMMAND_EDIT_HOME_OTHER.node))
.forEach(editor::sendMessage);
} catch (Exception e){
e.printStackTrace();
}
boolean otherOwner = editor.uuid.equals(home.owner.uuid);
home.getHomeEditorWindow(plugin.getLocales(), otherOwner, plugin.getSettings().crossServer,
!otherOwner || editor.hasPermission(Permission.COMMAND_HOME_OTHER.node),
!otherOwner || editor.hasPermission(Permission.COMMAND_EDIT_HOME_OTHER.node))
.forEach(editor::sendMessage);
return;
}
switch (editOperation.toLowerCase()) {