fixed bug where when leaving/disconnecting from the server after placing an item into the sell gui and entering a new price, you'll not get it back on rejoin

Took 2 minutes
This commit is contained in:
Kiran Hart 2022-08-30 13:16:35 -04:00
parent 79bec096a2
commit 7b96ca12ee
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -171,6 +171,8 @@ public class GUISellItem extends AbstractPlaceholderGui {
reopen(e); reopen(e);
}); });
builder.onPlayerDiconnect(() -> PlayerUtils.giveItem(e.player, this.itemToBeListed));
PlayerChatInput<Long> input = builder.build(); PlayerChatInput<Long> input = builder.build();
input.start(); input.start();
}); });
@ -201,6 +203,8 @@ public class GUISellItem extends AbstractPlaceholderGui {
reopen(e); reopen(e);
}); });
builder.onPlayerDiconnect(() -> PlayerUtils.giveItem(e.player, this.itemToBeListed));
PlayerChatInput<Double> input = builder.build(); PlayerChatInput<Double> input = builder.build();
input.start(); input.start();
}); });
@ -228,6 +232,8 @@ public class GUISellItem extends AbstractPlaceholderGui {
reopen(e); reopen(e);
}); });
builder.onPlayerDiconnect(() -> PlayerUtils.giveItem(e.player, this.itemToBeListed));
PlayerChatInput<Double> input = builder.build(); PlayerChatInput<Double> input = builder.build();
input.start(); input.start();
}); });
@ -254,6 +260,8 @@ public class GUISellItem extends AbstractPlaceholderGui {
reopen(e); reopen(e);
}); });
builder.onPlayerDiconnect(() -> PlayerUtils.giveItem(e.player, this.itemToBeListed));
PlayerChatInput<Double> input = builder.build(); PlayerChatInput<Double> input = builder.build();
input.start(); input.start();
}); });