Fix block stacking in creative, save stack after update
This commit is contained in:
parent
a00b6fb7fe
commit
3eeef59c5f
|
@ -138,6 +138,7 @@ public class BlockListeners implements Listener {
|
||||||
}
|
}
|
||||||
//update hologram
|
//update hologram
|
||||||
plugin.updateHologram(stack);
|
plugin.updateHologram(stack);
|
||||||
|
plugin.getDataManager().updateBlock(stack);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (isSneaking) return;
|
if (isSneaking) return;
|
||||||
|
@ -147,7 +148,9 @@ public class BlockListeners implements Listener {
|
||||||
if (clickAction != Action.RIGHT_CLICK_BLOCK) return;
|
if (clickAction != Action.RIGHT_CLICK_BLOCK) return;
|
||||||
//Create new stack
|
//Create new stack
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
hand.takeItem(player, 1);
|
if (player.getGameMode() != GameMode.CREATIVE) {
|
||||||
|
hand.takeItem(player, 1);
|
||||||
|
}
|
||||||
BlockStack newStack = blockStackManager.createBlock(block);
|
BlockStack newStack = blockStackManager.createBlock(block);
|
||||||
plugin.getDataManager().createBlock(newStack);
|
plugin.getDataManager().createBlock(newStack);
|
||||||
plugin.updateHologram(newStack);
|
plugin.updateHologram(newStack);
|
||||||
|
|
Loading…
Reference in New Issue