Merge branch 'development'

This commit is contained in:
Brianna 2019-10-22 12:53:19 -04:00
commit c18f028ae1
3 changed files with 9 additions and 3 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "UltimateStacker"
path: "/builds/$CI_PROJECT_PATH"
version: "1.10.18"
version: "1.10.19"
build:
stage: build

View File

@ -78,6 +78,7 @@ public class InteractListeners implements Listener {
Material type = is.getType();
switch (entity.getType().name()) {
case "COW":
case "MUSHROOM_COW":
case "SHEEP":
return type == Material.WHEAT;
case "PIG":

View File

@ -1,5 +1,6 @@
package com.songoda.ultimatestacker.tasks;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.hooks.WorldGuardHook;
import com.songoda.ultimatestacker.UltimateStacker;
import com.songoda.ultimatestacker.entity.EntityStack;
@ -180,7 +181,9 @@ public class StackingTask extends BukkitRunnable {
? entity.getMaxHealth() : livingEntity.getHealth());
// Remove our entity and mark it as processed.
// Drop lead if applicable then remove our entity and mark it as processed.
if (livingEntity.isLeashed())
livingEntity.getWorld().dropItemNaturally(livingEntity.getLocation(), CompatibleMaterial.LEAD.getItem());
livingEntity.remove();
processed.add(livingEntity.getUniqueId());
@ -257,7 +260,9 @@ public class StackingTask extends BukkitRunnable {
fixHealth(livingEntity, entity);
newStack.addHealth(entity.getHealth());
// Remove our entity and mark it as processed.
// Drop lead if applicable then remove our entity and mark it as processed.
if (entity.isLeashed())
entity.getWorld().dropItemNaturally(entity.getLocation(), CompatibleMaterial.LEAD.getItem());
entity.remove();
processed.add(entity.getUniqueId());
});