Fast bug fix when users could not write a valid input via chat message.
This commit is contained in:
commit
4caeee6d64
2
pom.xml
2
pom.xml
|
@ -42,7 +42,7 @@
|
||||||
<!-- Revision variable removes warning about dynamic version -->
|
<!-- Revision variable removes warning about dynamic version -->
|
||||||
<revision>${build.version}-SNAPSHOT</revision>
|
<revision>${build.version}-SNAPSHOT</revision>
|
||||||
<!-- This allows to change between versions and snapshots. -->
|
<!-- This allows to change between versions and snapshots. -->
|
||||||
<build.version>0.8.1</build.version>
|
<build.version>0.8.2</build.version>
|
||||||
<build.number>-LOCAL</build.number>
|
<build.number>-LOCAL</build.number>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -1085,7 +1085,13 @@ public abstract class CommonGUI
|
||||||
// On cancel conversation will be closed.
|
// On cancel conversation will be closed.
|
||||||
withEscapeSequence("cancel").
|
withEscapeSequence("cancel").
|
||||||
// Use null value in consumer to detect if user has abandoned conversation.
|
// Use null value in consumer to detect if user has abandoned conversation.
|
||||||
addConversationAbandonedListener(abandonedEvent -> consumer.accept(null)).
|
addConversationAbandonedListener(abandonedEvent ->
|
||||||
|
{
|
||||||
|
if (!abandonedEvent.gracefulExit())
|
||||||
|
{
|
||||||
|
consumer.accept(null);
|
||||||
|
}
|
||||||
|
}).
|
||||||
withPrefix(context -> user.getTranslation("challenges.gui.questions.prefix")).
|
withPrefix(context -> user.getTranslation("challenges.gui.questions.prefix")).
|
||||||
buildConversation(user.getPlayer());
|
buildConversation(user.getPlayer());
|
||||||
|
|
||||||
|
|
|
@ -720,7 +720,13 @@ public class AdminGUI extends CommonGUI
|
||||||
// On cancel conversation will be closed.
|
// On cancel conversation will be closed.
|
||||||
withEscapeSequence("cancel").
|
withEscapeSequence("cancel").
|
||||||
// Use null value in consumer to detect if user has abandoned conversation.
|
// Use null value in consumer to detect if user has abandoned conversation.
|
||||||
addConversationAbandonedListener(abandonedEvent -> consumer.accept(null)).
|
addConversationAbandonedListener(abandonedEvent ->
|
||||||
|
{
|
||||||
|
if (!abandonedEvent.gracefulExit())
|
||||||
|
{
|
||||||
|
consumer.accept(null);
|
||||||
|
}
|
||||||
|
}).
|
||||||
withLocalEcho(false).
|
withLocalEcho(false).
|
||||||
withPrefix(context -> user.getTranslation("challenges.gui.questions.prefix")).
|
withPrefix(context -> user.getTranslation("challenges.gui.questions.prefix")).
|
||||||
buildConversation(user.getPlayer());
|
buildConversation(user.getPlayer());
|
||||||
|
|
|
@ -480,7 +480,13 @@ public class NumberGUI
|
||||||
// On cancel conversation will be closed.
|
// On cancel conversation will be closed.
|
||||||
withEscapeSequence("cancel").
|
withEscapeSequence("cancel").
|
||||||
// Use null value in consumer to detect if user has abandoned conversation.
|
// Use null value in consumer to detect if user has abandoned conversation.
|
||||||
addConversationAbandonedListener(abandonedEvent -> consumer.accept(null)).
|
addConversationAbandonedListener(abandonedEvent ->
|
||||||
|
{
|
||||||
|
if (!abandonedEvent.gracefulExit())
|
||||||
|
{
|
||||||
|
consumer.accept(null);
|
||||||
|
}
|
||||||
|
}).
|
||||||
withPrefix(context ->
|
withPrefix(context ->
|
||||||
NumberGUI.this.user.getTranslation("challenges.gui.questions.prefix")).
|
NumberGUI.this.user.getTranslation("challenges.gui.questions.prefix")).
|
||||||
buildConversation(user.getPlayer());
|
buildConversation(user.getPlayer());
|
||||||
|
|
|
@ -305,7 +305,13 @@ public class StringListGUI
|
||||||
// On cancel conversation will be closed.
|
// On cancel conversation will be closed.
|
||||||
withEscapeSequence("cancel").
|
withEscapeSequence("cancel").
|
||||||
// Use null value in consumer to detect if user has abandoned conversation.
|
// Use null value in consumer to detect if user has abandoned conversation.
|
||||||
addConversationAbandonedListener(abandonedEvent -> consumer.accept(null)).
|
addConversationAbandonedListener(abandonedEvent ->
|
||||||
|
{
|
||||||
|
if (!abandonedEvent.gracefulExit())
|
||||||
|
{
|
||||||
|
consumer.accept(null);
|
||||||
|
}
|
||||||
|
}).
|
||||||
withLocalEcho(false).
|
withLocalEcho(false).
|
||||||
withPrefix(context -> user.getTranslation("challenges.gui.questions.prefix")).
|
withPrefix(context -> user.getTranslation("challenges.gui.questions.prefix")).
|
||||||
buildConversation(user.getPlayer());
|
buildConversation(user.getPlayer());
|
||||||
|
|
Loading…
Reference in New Issue