Closes: #27 Fix PistonCalculator movement
This commit is contained in:
@@ -86,6 +86,10 @@ public class SWInventory implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasItem(int pos) {
|
||||
return inventory.getItem(pos) != null;
|
||||
}
|
||||
|
||||
public void setItem(int pos, SWItem item) {
|
||||
setItem(pos, item.getItemStack(), item.getCallback());
|
||||
}
|
||||
|
||||
@@ -220,4 +220,9 @@ public class SWItem {
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SWItem setAmount(int count) {
|
||||
itemStack.setAmount(count);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user