depending on how you want to do this. Because the method above only applys for people within the same region. Why am i saying this? For my safe cracker i dont want to use a method to see how many people are near the safe. If i use the method above it usually return true. Because youll have people near rouge cooking food or something.
So you could make a area and check to see how many people there is.
not too sure how you want to make the area but heads up there myPlayer#getArea(raidus).
public boolean imAlone() {
Area area = null;//create your own area
int amount = 0;
for (Player player: players.getAll()) {
if (player != null && !player.getName().equalsIgnoreCase(myPlayer().getName())){
if (area.contains(player)) {
amount++;
}
}
}
return amount == 0;
}
bank#open looks for the closest bank booth. doesnt support npc bankers not sure about chest. Also it doesnt matter if it in sight i believe it will walk to entity and also rotate camera to the bank.
Bank class extend item container. if bank isnt open then you simply get a null
ps. the bank itself is a item container just like a shop and also inventory.
learn inheritance, its right there dude you just not looking hard enough. Anything that extends ItemContainer contains that super classes methods. For example inventory, bank, shop, etx......
http://prntscr.com/5ss3im
i see that amazon has gift card try buying a different gift card like a visa card the one where you can only spend money. Or i know green dot allows you to deposit all the money from the card into Paypal. Think of something
use the api young blood.
before it use to be client.blah blah blah everything but now its more organized. Just use getInventory()
look at the method provider class it contains all class and allow you to grab the instance if the class you might need.
Thank you alek for adding more banks. Once you finish with all the banks please add in the array of banks thank you. Reason why I want that in is so I don't have to manually create an array. Plus it's meant to loop through all areas to see if the player is inside any bank. I can't wait
Also don't forget about the bank in the city where the cosmic runes are at