Added Inventory#clearExcept

This commit is contained in:
JKetelaar
2014-10-29 10:56:03 +01:00
parent fbc5ca9688
commit 036de02358
+11 -1
View File
@@ -11,7 +11,7 @@ import java.util.ArrayList;
/**
* @author Everel
* @author Everel, JKetelaar, Fryslan
*/
public class Inventory {
public static final int INVENTORY_INDEX = 3214;
@@ -35,6 +35,16 @@ public class Inventory {
}
}
public static void clearExcept(int... ids) {
for (Item item : getItems()) {
for (int id : ids) {
if (item.getId() != id) {
item.drop();
}
}
}
}
/**
* Gets inventory interface
*