Merge branch 'development'

This commit is contained in:
Brianna 2020-04-07 22:24:25 -04:00
commit 21f9bcadef
2 changed files with 2 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId> <groupId>com.songoda</groupId>
<artifactId>UltimateStacker</artifactId> <artifactId>UltimateStacker</artifactId>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>1.11.9</version> <version>1.11.10</version>
<build> <build>
<defaultGoal>clean install</defaultGoal> <defaultGoal>clean install</defaultGoal>
<finalName>UltimateStacker-${project.version}</finalName> <finalName>UltimateStacker-${project.version}</finalName>

View File

@ -95,11 +95,9 @@ public class ItemListeners implements Listener {
Item item = event.getItem(); Item item = event.getItem();
ItemStack stack = item.getItemStack(); ItemStack stack = item.getItemStack();
if (stack.getMaxStackSize() == 1) return;
int amount = UltimateStacker.getActualItemAmount(item); int amount = UltimateStacker.getActualItemAmount(item);
if (amount < (stack.getMaxStackSize() / 2)) return; if (amount < (stack.getMaxStackSize() / 2)) return;
event.setCancelled(true);
event.getItem().setItemStack(stack);
event.getPlayer().playSound(event.getPlayer().getLocation(), CompatibleSound.ENTITY_ITEM_PICKUP.getSound(), .2f, (float) (1 + Math.random())); event.getPlayer().playSound(event.getPlayer().getLocation(), CompatibleSound.ENTITY_ITEM_PICKUP.getSound(), .2f, (float) (1 + Math.random()));