In my player class, I define the freeSlots integer with the following code:
Code:
public int freeSlots() {
int freeslots = 0;
for (int i = 0; i < playerItems.length; i++) {
if (playerItems[i] <= 0) {
freeslots++;
}
}
return freeslots;
}
And, obviously, I'm importing all of the variables from my Player class into my Commands class with the following statement:
Code:
import server.model.players.Player;
However, when I attempt to use the freeSlots method in my Commands class, I'm not allowed to. It seems like a simple issue, but I'm not exactly sure what to do, and I would appreciate the help.
Thanks!
~Team