Skip to content

Commit 70a858d

Browse files
Fix text input closing
1 parent fec12d8 commit 70a858d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_6to1_21_5/Protocol1_21_6To1_21_5.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ public void handleArgument(final PacketWrapper wrapper, final String argumentTyp
183183

184184
final ChestDialogViewProvider provider = (ChestDialogViewProvider) Via.getManager().getProviders().get(DialogViewProvider.class);
185185

186+
if (storage.phase() == ChestDialogStorage.Phase.ANVIL_VIEW) {
187+
wrapper.cancel();
188+
189+
provider.openChestView(wrapper.user(), storage, ChestDialogStorage.Phase.DIALOG_VIEW);
190+
return;
191+
}
192+
186193
if (storage.phase() == ChestDialogStorage.Phase.WAITING_FOR_RESPONSE) {
187194
wrapper.cancel();
188195
if (storage.closeButtonEnabled()) {

common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_6to1_21_5/provider/ChestDialogViewProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public ChestDialogViewProvider(final Protocol1_21_6To1_21_5 protocol) {
7070
public void openDialog(final UserConnection connection, final Dialog dialog) {
7171
final State state = connection.getProtocolInfo().getClientState();
7272
if (state == State.CONFIGURATION) {
73-
// Nothing we can do about
73+
// TODO Implement by ending and re-starting the configuration phase
7474
return;
7575
}
7676

@@ -99,7 +99,7 @@ public void openChestView(final UserConnection connection, final ChestDialogStor
9999
public void closeDialog(final UserConnection connection) {
100100
final State state = connection.getProtocolInfo().getClientState();
101101
if (state == State.CONFIGURATION) {
102-
// Nothing we can do about
102+
// TODO Implement by ending and re-starting the configuration phase
103103
return;
104104
}
105105

0 commit comments

Comments
 (0)