mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-01 05:17:52 +01:00
Respect DO_MOB_LOOT game rule.
This commit is contained in:
parent
23d846f937
commit
160f345b89
@ -7,6 +7,7 @@ import com.songoda.ultimatestacker.UltimateStacker;
|
||||
import com.songoda.ultimatestacker.entity.EntityStack;
|
||||
import com.songoda.ultimatestacker.settings.Settings;
|
||||
import com.songoda.ultimatestacker.utils.DropUtils;
|
||||
import org.bukkit.GameRule;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.ChestedHorse;
|
||||
@ -52,6 +53,9 @@ public class DeathListeners implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (!event.getEntity().getWorld().getGameRuleValue(GameRule.DO_MOB_LOOT))
|
||||
drops.clear();
|
||||
|
||||
if (instance.getEntityStackManager().isStacked(event.getEntity()))
|
||||
instance.getEntityStackManager().getStack(event.getEntity())
|
||||
.onDeath(event.getEntity(), drops, custom, event.getDroppedExp(), event);
|
||||
|
Loading…
Reference in New Issue
Block a user