1. You're creating a new instance of the Bank class, this is an OSBot API class which extends MethodProvider. Any class which extends MethodProvider needs to have some context provided, so that it has access to all the other OSBot API class instances (e.g. inventory, equipment, etc.). In your case, you have not provided this context, and so all of these API references are null. You don't *need* to create an instance of the Bank class anyway, because OSBot provides you one that is correctly setup, which you access via getBank().
2. It is the `open` function throwing a null pointer exception. This means that something the open function is trying to access is null (again because you have not exchanged context, so the internal fields in the Bank class are null)
You can see the open function here:
On the 4th line of the function you can see `this.inventory.isItemSelected()`
`this.inventory` will be null, as you have not exchanged context. Therefore this function call will throw a NullPointerException.
This would probably work:
Bank bank = new Bank();
bank.exchangeContext(getBot());
exchangeContext sets all the internal context fields in the API class instance using the provided Bot reference. You can see the implementation here:
However there is no need for it, because you can access the already setup instance using `getBank()`.