NullPointerException while searching for a string

Discussion in 'Plugin Development' started by immapoint, Jan 16, 2011.

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


    Hey there,

    i'm currently working on a simpler version of Towny for bukkit.
    Just special users are allowed to create towns. So i have a file, "town_permits.txt", where all these users are listed.

    The problem is:
    I try to search for the current user in the file, if he wants to create a town:
    townpermissions = new FileReader("town_permits.txt");
    BufferedReader topere = new BufferedReader(townpermissions);
    String bfr = "";
         try {
                bfr = topere.readLine();
         // catch...
    } while ( bfr != null);
    for ( int i = 0; i < permitlines.size(); i++){
        if ( permitlines.get(i).contains(actor.getName())){
                permission = true;
    Error is:
    I can't imagine what that means:confused:

    Thanks for any help,
  2. Offline


    Can we have the full content of this file : "". The error come from the line 12, so I want to know what happen exactly there.
Thread Status:
Not open for further replies.

Share This Page