This commit is contained in:
Brianna O'Keefe 2018-11-06 00:47:49 -05:00
parent 0a801f03e8
commit dea3a461af
2 changed files with 9 additions and 2 deletions

View File

@ -1,10 +1,15 @@
package com.songoda.ultimatestacker.events; package com.songoda.ultimatestacker.events;
import com.songoda.ultimatestacker.UltimateStacker; 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.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.entity.SpawnerSpawnEvent; import org.bukkit.event.entity.SpawnerSpawnEvent;
import java.util.List;
public class SpawnerListeners implements Listener { public class SpawnerListeners implements Listener {
private UltimateStacker instance; private UltimateStacker instance;
@ -15,7 +20,7 @@ public class SpawnerListeners implements Listener {
@EventHandler @EventHandler
public void onSpawner(SpawnerSpawnEvent event) { public void onSpawner(SpawnerSpawnEvent event) {
/* /*
Entity initalEntity = event.getEntity(); Entity initalEntity = event.getEntity();
if (!instance.getConfig().getBoolean("Main.Stack Entities")) return; if (!instance.getConfig().getBoolean("Main.Stack Entities")) return;
@ -25,6 +30,8 @@ public class SpawnerListeners implements Listener {
if (entityList.size() == 0) return; if (entityList.size() == 0) return;
int maxEntityStackSize = instance.getConfig().getInt("Entity.Max Stack Size"); 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) { for (Entity entity : entityList) {
EntityStack stack = instance.getEntityStackManager().getStack(entity); EntityStack stack = instance.getEntityStackManager().getStack(entity);

View File

@ -4,7 +4,7 @@ general.nametag.prefix = "&8[&6UltimateStacker&8]"
#Command Messages #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 #Event Messages