Conversation API: Server ends the stream

Discussion in 'Plugin Development' started by TheA13X, May 23, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    TheA13X

    The exact description of the problem is this peace of code:
    Code:
    @Override
            public Prompt acceptInput(ConversationContext arg0, String arg1) {
                    act.getConfig().addDefault("player."+((Player)arg0.getForWhom()).getName()+".activated", true);
                    act.saveConfig();
                    return Prompt.END_OF_CONVERSATION;
            }
    every time a player ends the conversation he's kicked by the server. The message: "End of stream".
    I think it's because of the " return Prompt.END_OF_CONVERSATION; "(i.e. null).
    How can I make it else?
     
  2. Offline

    Jogy34

    I use conversations in one of my plugins and I'm having a similar issue except mine only happens when I'm trying to get the block a player is looking at and it doesn't actually finish that accept input. For all of my ending prompts though I return null and I've never gotten the end of stream issue on any of my prompts that don't attempt to get the block the player is looking at.
     
  3. Offline

    Tjstretchalot

    Since this isn't especially old and I found it searching for the same problem: Currently the conversation API just crashes everything and throws a hissy fit if any errors occur, without printing a stack trace. Maybe someone should write a ticket for it

    workaround: wrap all your functions in a huge try catch for Exception
     
  4. Offline

    Jogy34

    It has still never happened to me and I found my mistake that was causing the end of stream error when I was trying to get the block the player was looking at.
     
Thread Status:
Not open for further replies.

Share This Page