mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-03-12 22:49:02 +01:00
Merge branch 'development'
This commit is contained in:
commit
c18f028ae1
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateStacker"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.10.18"
|
||||
version: "1.10.19"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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":
|
||||
|
@ -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());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user