Пример #1
0
 public ItemStack[] getContentsofSlot4() throws NoBagException {
   NPCBag pb = new NPCBag(player, 4);
   if (pb.getType() == 0) {
     throw new NoBagException();
   }
   return pb.getInventory();
 }
Пример #2
0
 public void setContentsofSlot4(ItemStack[] items) throws NoBagException {
   NPCBag pb = new NPCBag(player, 4);
   if (pb.getType() == 0) {
     throw new NoBagException();
   }
   pb.setInventory(items);
 }
Пример #3
0
 public boolean isSlot4Equipped() {
   NPCBag pb = new NPCBag(player, 4);
   if (pb.getType() == 0) {
     return true;
   }
   return false;
 }
Пример #4
0
 public boolean isSlot2Large() throws NoBagException {
   NPCBag pb = new NPCBag(player, 2);
   int type = pb.getType();
   if (type == 0) {
     throw new NoBagException();
   }
   if (type == 2) {
     return true;
   } else {
     return false;
   }
 }