even more default capacities

This commit is contained in:
Ceikry
2021-03-12 21:23:46 -06:00
parent 78a9b8c88e
commit 19e20d9dc9
109 changed files with 144 additions and 144 deletions
@@ -11,8 +11,8 @@ import java.util.Map;
public abstract class Script {
public ScriptAPI scriptAPI;
public ArrayList<Item> inventory = new ArrayList<>();
public ArrayList<Item> equipment = new ArrayList<>();
public ArrayList<Item> inventory = new ArrayList<>(20);
public ArrayList<Item> equipment = new ArrayList<>(20);
public Map<Integer, Integer> skills = new HashMap<>();
@@ -33,7 +33,7 @@ public class PvMBots extends AIPlayer {
public List<Entity> FindTargets(Entity entity, int radius) {
List<Entity> targets = new ArrayList<>();
List<Entity> targets = new ArrayList<>(20);
Object[] localNPCs = RegionManager.getLocalNpcs(entity,radius).toArray();
int length = localNPCs.length;
if(length > 5){length = 5;}
@@ -53,7 +53,7 @@ public class WildernessBot extends AIPlayer {
public List<Entity> FindTargets(Entity entity, int radius) {
List<Entity> targets = new ArrayList<>();
List<Entity> targets = new ArrayList<>(20);
for (Player player : RegionManager.getLocalPlayers(entity, radius)) { {
if (checkValidTargets(player))
targets.add(player);