Null Pointer Exception while porting player to another Server

Discussion in 'BungeeCord Plugin Development' started by Paniermehlbrot, Oct 4, 2013.

  1. Hi there,
    this is my first post, and my english is not very well, so please don't be mad at me :/ at least, i do not know if this is the right location for the thread...
    Here is my problem:
    I'm coding an Adventure-Dungeon plugin for my Spigot server. The players should get teleported to the dungeon located on an other server by using Bungee. To teleport them, the Spigot plugin uses:

    Code (Text):

    public void connectToServer(Player p, String ct) throws IOException {
            ByteArrayOutputStream bao = new ByteArrayOutputStream();
            DataOutputStream out = new DataOutputStream(bao);
            p.sendPluginMessage(plugin, "BungeeCord", bao.toByteArray());
    connectToServer is executed in a loop for up to 5 Players. The first player gets teleported, the other players get a Null Pointer Exception message written in their chat and they don't teleport.

    I hope that someone can help me...


    #Edit: The input parameters are all valid and aren't responsible for the exception!
    #1 Paniermehlbrot, Oct 4, 2013
    Last edited: Oct 4, 2013
  2. Please post error log.
  3. Code (Text):
    p.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
  4. joehot200


    Error log please :D