title: NullPointerException where there shouldn't be one
body: <p>So I'm getting a NullPointerException on line 17 and 19 of this code.</p>
  
  <pre><code>package Commands;
  
  import Engine.Command;
  import Engine.GameObject;
  import Engine.ItemObject;
  import Engine.RoomObject;
  
  public class East implements Command {
  
      int pY = GameObject.pY;
      int pX = GameObject.pX;
  
      RoomObject[][] m = GameObject.m;
  
      @Override
      public void execute(String cmd) {
          if (m[pY][pX+1].canEnter == true) {
              pX+=1;
              System.out.println(m[pY][pX].name);
              showItems();
          } else { System.out.println("Can't move."); }
      }
  
      public void showItems() {
          System.out.println("Items you can see:");
          if (m[pY][pX].inv.size() &gt;= 1) {
              for (int i = 0; i &lt; m[pY][pX].inv.size(); i++) {
                  ItemObject tempObject = m[pY][pX].inv.get(i);
                  System.out.println(tempObject.name);
              }
          } else { System.out.println("No items here."); }
      }
  }
  </code></pre>
  
  <p>There shouldn't be a nullpointer there at all because it was working fine before I started using different classes for all my commands.</p>
  
  <p>This is for a text adventure game engine.</p>
  
  <p>EDIT: the culprit is</p>
  
  <pre><code>RoomObject[][] m = GameObject.m;
  </code></pre>
  
  <p>But I have no idea why :/</p>