diff --git a/src/main/java/com/songoda/ultimatestacker/events/SpawnerListeners.java b/src/main/java/com/songoda/ultimatestacker/events/SpawnerListeners.java index 718f75f..273dd83 100644 --- a/src/main/java/com/songoda/ultimatestacker/events/SpawnerListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/events/SpawnerListeners.java @@ -1,10 +1,15 @@ package com.songoda.ultimatestacker.events; import com.songoda.ultimatestacker.UltimateStacker; +import com.songoda.ultimatestacker.entity.EntityStack; +import com.songoda.ultimatestacker.utils.Methods; +import org.bukkit.entity.Entity; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.SpawnerSpawnEvent; +import java.util.List; + public class SpawnerListeners implements Listener { private UltimateStacker instance; @@ -15,7 +20,7 @@ public class SpawnerListeners implements Listener { @EventHandler public void onSpawner(SpawnerSpawnEvent event) { -/* + /* Entity initalEntity = event.getEntity(); if (!instance.getConfig().getBoolean("Main.Stack Entities")) return; @@ -25,6 +30,8 @@ public class SpawnerListeners implements Listener { if (entityList.size() == 0) return; int maxEntityStackSize = instance.getConfig().getInt("Entity.Max Stack Size"); + if (instance.getConfig().getInt("Mobs." + initalEntity.getType().name() + ".Max Stack Size") != -1) + maxEntityStackSize = instance.getConfig().getInt("Mobs." + initalEntity.getType().name() + ".Max Stack Size"); for (Entity entity : entityList) { EntityStack stack = instance.getEntityStackManager().getStack(entity); diff --git a/src/main/resources/en_US.lang b/src/main/resources/en_US.lang index 792714a..905657b 100644 --- a/src/main/resources/en_US.lang +++ b/src/main/resources/en_US.lang @@ -4,7 +4,7 @@ general.nametag.prefix = "&8[&6UltimateStacker&8]" #Command Messages -command.give.success = "&7You have been given a &6%type%7." +command.give.success = "&7You have been given a &6%type%&7." #Event Messages