mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-13 05:44:19 +01:00
Merge pull request #4 from TeamHRLive/development
[Fixed] Block stacking logic.
This commit is contained in:
commit
1210047197
@ -124,7 +124,7 @@ public class BlockListeners implements Listener {
|
||||
player.getWorld().dropItemNaturally(block.getLocation(), stack.getMaterial().parseItem());
|
||||
}
|
||||
}
|
||||
if (stack.getAmount() == 0) {
|
||||
if (stack.getAmount() == 1) {
|
||||
//Remove stack
|
||||
stack.destroy();
|
||||
return;
|
||||
|
@ -23,7 +23,7 @@ public class BlockStackImpl implements BlockStack {
|
||||
// The id that identifies this stack in the database.
|
||||
private int id;
|
||||
|
||||
private int amount = 1;
|
||||
private int amount = 2;
|
||||
private XMaterial material;
|
||||
private Location location;
|
||||
|
||||
@ -79,7 +79,7 @@ public class BlockStackImpl implements BlockStack {
|
||||
|
||||
@Override
|
||||
public void setAmount(int amount) {
|
||||
if (amount < 1) {
|
||||
if (amount == 1) {
|
||||
destroy();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user