Miscellaneous farming fixes

This commit is contained in:
Ceikry
2021-07-30 12:42:46 +00:00
parent 2210f8af85
commit aece20453c
11 changed files with 213 additions and 40 deletions
@@ -204,6 +204,7 @@ public final class DialogueInterpreter {
public boolean close() {
if (dialogue != null || dialogueStage != null) {
actions.clear();
if (player.getInterfaceManager().getChatbox() != null && player.getInterfaceManager().getChatbox().getCloseEvent() != null) {
return true;
}
@@ -211,8 +212,10 @@ public final class DialogueInterpreter {
dialogueStage = null;
player.getInterfaceManager().closeChatbox();
}
if (dialogue != null && dialogue.close()) {
if (dialogue != null) {
DialoguePlugin d = dialogue;
dialogue = null;
d.close();
}
}
return dialogue == null && dialogueStage == null;
@@ -122,6 +122,7 @@ public abstract class DialoguePlugin implements Plugin<Player> {
public boolean close() {
player.getInterfaceManager().closeChatbox();
player.getInterfaceManager().openChatbox(137);
if(file != null) file.end();
finished = true;
return true;
}