mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-30 11:11:22 +01:00
Merge branch 'development'
This commit is contained in:
commit
21f9bcadef
2
pom.xml
2
pom.xml
@ -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>
|
||||||
|
@ -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()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user