Search in sources :

Example 11 with StackManager

use of dev.rosewood.rosestacker.manager.StackManager in project RoseStacker by Rosewood-Development.

the class EntityListener method onSpawnerSpawn.

@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onSpawnerSpawn(SpawnerSpawnEvent event) {
    if (!(event.getEntity() instanceof LivingEntity))
        return;
    StackManager stackManager = this.rosePlugin.getManager(StackManager.class);
    if (stackManager.isWorldDisabled(event.getEntity().getWorld()))
        return;
    LivingEntity entity = (LivingEntity) event.getEntity();
    PersistentDataUtils.tagSpawnedFromSpawner(entity);
    SpawnerStackSettings stackSettings = this.stackSettingManager.getSpawnerStackSettings(event.getSpawner());
    StackedSpawner stackedSpawner = this.stackManager.getStackedSpawner(event.getSpawner().getBlock());
    if (stackedSpawner == null)
        stackedSpawner = stackManager.createSpawnerStack(event.getSpawner().getBlock(), 1, false);
    boolean placedByPlayer = stackedSpawner != null && stackedSpawner.isPlacedByPlayer();
    if (stackSettings.isMobAIDisabled() && (!Setting.SPAWNER_DISABLE_MOB_AI_ONLY_PLAYER_PLACED.getBoolean() || placedByPlayer))
        PersistentDataUtils.removeEntityAi(entity);
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) StackedSpawner(dev.rosewood.rosestacker.stack.StackedSpawner) StackManager(dev.rosewood.rosestacker.manager.StackManager) EventHandler(org.bukkit.event.EventHandler)

Example 12 with StackManager

use of dev.rosewood.rosestacker.manager.StackManager in project RoseStacker by Rosewood-Development.

the class EntityListener method handleSheepShear.

public static boolean handleSheepShear(RosePlugin rosePlugin, ItemStack shears, Entity entity) {
    if (entity.getType() != EntityType.SHEEP)
        return false;
    StackManager stackManager = rosePlugin.getManager(StackManager.class);
    if (stackManager.isWorldDisabled(entity.getWorld()))
        return false;
    if (!stackManager.isEntityStackingEnabled())
        return false;
    Sheep sheepEntity = (Sheep) entity;
    StackedEntity stackedEntity = stackManager.getStackedEntity(sheepEntity);
    if (stackedEntity == null || stackedEntity.getStackSize() == 1)
        return false;
    SheepStackSettings sheepStackSettings = (SheepStackSettings) stackedEntity.getStackSettings();
    if (!sheepStackSettings.shouldShearAllSheepInStack())
        return false;
    ItemUtils.damageTool(shears);
    ItemStack baseSheepWool = new ItemStack(ItemUtils.getWoolMaterial(sheepEntity.getColor()), getWoolDropAmount());
    sheepEntity.setSheared(true);
    List<ItemStack> drops = new ArrayList<>(Collections.singletonList(baseSheepWool));
    stackManager.setEntityUnstackingTemporarilyDisabled(true);
    Bukkit.getScheduler().runTaskAsynchronously(RoseStacker.getInstance(), () -> {
        try {
            List<Sheep> sheepList = StackerUtils.deconstructStackedEntities(stackedEntity).stream().map(x -> (Sheep) x).collect(Collectors.toList());
            for (Sheep sheep : sheepList) {
                if (!sheep.isSheared()) {
                    ItemStack sheepWool = new ItemStack(ItemUtils.getWoolMaterial(sheep.getColor()), getWoolDropAmount());
                    sheep.setSheared(true);
                    drops.add(sheepWool);
                }
            }
            StackerUtils.reconstructStackedEntities(stackedEntity, sheepList);
            Bukkit.getScheduler().runTask(RoseStacker.getInstance(), () -> stackManager.preStackItems(drops, sheepEntity.getLocation()));
        } finally {
            stackManager.setEntityUnstackingTemporarilyDisabled(false);
        }
    });
    return true;
}
Also used : StackedEntityDataEntry(dev.rosewood.rosestacker.nms.storage.StackedEntityDataEntry) TransformReason(org.bukkit.event.entity.EntityTransformEvent.TransformReason) SheepStackSettings(dev.rosewood.rosestacker.stack.settings.entity.SheepStackSettings) AttributeInstance(org.bukkit.attribute.AttributeInstance) Slime(org.bukkit.entity.Slime) RoseStacker(dev.rosewood.rosestacker.RoseStacker) Statistic(org.bukkit.Statistic) Animals(org.bukkit.entity.Animals) Projectile(org.bukkit.entity.Projectile) EntitySpawnEvent(org.bukkit.event.entity.EntitySpawnEvent) Player(org.bukkit.entity.Player) StackedSpawner(dev.rosewood.rosestacker.stack.StackedSpawner) ItemUtils(dev.rosewood.rosestacker.utils.ItemUtils) EventHandler(org.bukkit.event.EventHandler) StackSettingManager(dev.rosewood.rosestacker.manager.StackSettingManager) Enderman(org.bukkit.entity.Enderman) Sheep(org.bukkit.entity.Sheep) PigZapEvent(org.bukkit.event.entity.PigZapEvent) PersistentDataUtils(dev.rosewood.rosestacker.utils.PersistentDataUtils) ItemStackSettings(dev.rosewood.rosestacker.stack.settings.ItemStackSettings) Material(org.bukkit.Material) EntityDamageByEntityEvent(org.bukkit.event.entity.EntityDamageByEntityEvent) Bukkit(org.bukkit.Bukkit) Setting(dev.rosewood.rosestacker.manager.ConfigurationManager.Setting) NPC(org.bukkit.entity.NPC) Entity(org.bukkit.entity.Entity) CreatureSpawnEvent(org.bukkit.event.entity.CreatureSpawnEvent) Blaze(org.bukkit.entity.Blaze) EntityEvent(org.bukkit.event.entity.EntityEvent) PlayerShearEntityEvent(org.bukkit.event.player.PlayerShearEntityEvent) EntityType(org.bukkit.entity.EntityType) LivingEntity(org.bukkit.entity.LivingEntity) EntityCacheManager(dev.rosewood.rosestacker.manager.EntityCacheManager) Collectors(java.util.stream.Collectors) RosePlugin(dev.rosewood.rosegarden.RosePlugin) ChickenStackSettings(dev.rosewood.rosestacker.stack.settings.entity.ChickenStackSettings) ItemStack(org.bukkit.inventory.ItemStack) StackManager(dev.rosewood.rosestacker.manager.StackManager) List(java.util.List) Guardian(org.bukkit.entity.Guardian) EntityCombustByEntityEvent(org.bukkit.event.entity.EntityCombustByEntityEvent) StackerUtils(dev.rosewood.rosestacker.utils.StackerUtils) EntityExplodeEvent(org.bukkit.event.entity.EntityExplodeEvent) Item(org.bukkit.entity.Item) Variant(org.bukkit.entity.MushroomCow.Variant) Wither(org.bukkit.entity.Wither) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) EntityTargetEvent(org.bukkit.event.entity.EntityTargetEvent) SpawnerSpawnEvent(org.bukkit.event.entity.SpawnerSpawnEvent) ArrayList(java.util.ArrayList) EntityDeathEvent(org.bukkit.event.entity.EntityDeathEvent) EntityTransformEvent(org.bukkit.event.entity.EntityTransformEvent) GameMode(org.bukkit.GameMode) GuiUtil(dev.rosewood.guiframework.framework.util.GuiUtil) AsyncEntityDeathEvent(dev.rosewood.rosestacker.event.AsyncEntityDeathEvent) NMSHandler(dev.rosewood.rosestacker.nms.NMSHandler) SheepRegrowWoolEvent(org.bukkit.event.entity.SheepRegrowWoolEvent) MushroomCow(org.bukkit.entity.MushroomCow) StackedItem(dev.rosewood.rosestacker.stack.StackedItem) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent) Listener(org.bukkit.event.Listener) Attribute(org.bukkit.attribute.Attribute) EntityCombustEvent(org.bukkit.event.entity.EntityCombustEvent) EntityPortalEvent(org.bukkit.event.entity.EntityPortalEvent) MushroomCowStackSettings(dev.rosewood.rosestacker.stack.settings.entity.MushroomCowStackSettings) EntityTeleportEvent(org.bukkit.event.entity.EntityTeleportEvent) Bat(org.bukkit.entity.Bat) Vector(org.bukkit.util.Vector) Chicken(org.bukkit.entity.Chicken) EventPriority(org.bukkit.event.EventPriority) EntityCombustByBlockEvent(org.bukkit.event.entity.EntityCombustByBlockEvent) EntityDropItemEvent(org.bukkit.event.entity.EntityDropItemEvent) Golem(org.bukkit.entity.Golem) NMSAdapter(dev.rosewood.rosestacker.nms.NMSAdapter) Collections(java.util.Collections) SpawnerStackSettings(dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) SheepStackSettings(dev.rosewood.rosestacker.stack.settings.entity.SheepStackSettings) StackManager(dev.rosewood.rosestacker.manager.StackManager) ArrayList(java.util.ArrayList) Sheep(org.bukkit.entity.Sheep) ItemStack(org.bukkit.inventory.ItemStack)

Example 13 with StackManager

use of dev.rosewood.rosestacker.manager.StackManager in project RoseStacker by Rosewood-Development.

the class BlockListener method onBlockBreak.

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBlockBreak(BlockBreakEvent event) {
    StackManager stackManager = this.rosePlugin.getManager(StackManager.class);
    if (stackManager.isWorldDisabled(event.getPlayer().getWorld()))
        return;
    Block block = event.getBlock();
    boolean isStacked = this.isBlockOrSpawnerStack(stackManager, block);
    boolean isSpawner = block.getType() == Material.SPAWNER;
    if (!isStacked && !isSpawner)
        return;
    Player player = event.getPlayer();
    Location dropLocation = block.getLocation().clone();
    if (isSpawner) {
        if (!stackManager.isSpawnerStackingEnabled())
            return;
        StackedSpawner stackedSpawner = stackManager.getStackedSpawner(block);
        if (stackedSpawner == null)
            stackedSpawner = stackManager.createSpawnerStack(block, 1, false);
        EntityType entityType = stackedSpawner.getSpawnerTile().getSpawnedType();
        boolean breakEverything = Setting.SPAWNER_BREAK_ENTIRE_STACK_WHILE_SNEAKING.getBoolean() && player.isSneaking();
        int breakAmount = breakEverything ? stackedSpawner.getStackSize() : 1;
        SpawnerUnstackEvent spawnerUnstackEvent = new SpawnerUnstackEvent(player, stackedSpawner, breakAmount);
        Bukkit.getPluginManager().callEvent(spawnerUnstackEvent);
        if (spawnerUnstackEvent.isCancelled()) {
            event.setCancelled(true);
            return;
        }
        breakAmount = spawnerUnstackEvent.getDecreaseAmount();
        if (this.tryDropSpawners(player, dropLocation, entityType, breakAmount, stackedSpawner.isPlacedByPlayer())) {
            BlockLoggingHook.recordBlockBreak(player, block);
            if (breakAmount == stackedSpawner.getStackSize()) {
                stackedSpawner.setStackSize(0);
                Bukkit.getScheduler().runTask(this.rosePlugin, () -> block.setType(Material.AIR));
            } else {
                stackedSpawner.increaseStackSize(-breakAmount);
            }
            if (stackedSpawner.getStackSize() <= 0) {
                stackManager.removeSpawnerStack(stackedSpawner);
                return;
            }
        } else {
            event.setCancelled(true);
            return;
        }
    } else {
        if (!stackManager.isBlockStackingEnabled())
            return;
        StackedBlock stackedBlock = stackManager.getStackedBlock(block);
        if (stackedBlock == null)
            return;
        if (stackedBlock.isLocked()) {
            event.setCancelled(true);
            return;
        }
        boolean breakEverything = Setting.BLOCK_BREAK_ENTIRE_STACK_WHILE_SNEAKING.getBoolean() && player.isSneaking();
        int breakAmount = breakEverything ? stackedBlock.getStackSize() : 1;
        BlockUnstackEvent blockUnstackEvent = new BlockUnstackEvent(player, stackedBlock, breakAmount);
        Bukkit.getPluginManager().callEvent(blockUnstackEvent);
        if (blockUnstackEvent.isCancelled()) {
            event.setCancelled(true);
            return;
        }
        breakAmount = blockUnstackEvent.getDecreaseAmount();
        if (player.getGameMode() != GameMode.CREATIVE) {
            List<ItemStack> items;
            if (Setting.BLOCK_BREAK_ENTIRE_STACK_INTO_SEPARATE.getBoolean()) {
                items = GuiUtil.getMaterialAmountAsItemStacks(block.getType(), breakAmount);
            } else {
                items = Collections.singletonList(ItemUtils.getBlockAsStackedItemStack(block.getType(), breakAmount));
            }
            if (Setting.BLOCK_DROP_TO_INVENTORY.getBoolean()) {
                ItemUtils.dropItemsToPlayer(player, items);
            } else {
                stackManager.preStackItems(items, dropLocation);
            }
        }
        BlockLoggingHook.recordBlockBreak(player, block);
        if (breakAmount == stackedBlock.getStackSize()) {
            stackedBlock.setStackSize(0);
            Bukkit.getScheduler().runTask(this.rosePlugin, () -> block.setType(Material.AIR));
        } else {
            stackedBlock.increaseStackSize(-1);
        }
        if (stackedBlock.getStackSize() <= 1)
            stackManager.removeBlockStack(stackedBlock);
    }
    this.damageTool(player);
    event.setCancelled(true);
}
Also used : SpawnerUnstackEvent(dev.rosewood.rosestacker.event.SpawnerUnstackEvent) Player(org.bukkit.entity.Player) StackedSpawner(dev.rosewood.rosestacker.stack.StackedSpawner) StackManager(dev.rosewood.rosestacker.manager.StackManager) BlockUnstackEvent(dev.rosewood.rosestacker.event.BlockUnstackEvent) EntityType(org.bukkit.entity.EntityType) StackedBlock(dev.rosewood.rosestacker.stack.StackedBlock) Block(org.bukkit.block.Block) StackedBlock(dev.rosewood.rosestacker.stack.StackedBlock) ItemStack(org.bukkit.inventory.ItemStack) Location(org.bukkit.Location) EventHandler(org.bukkit.event.EventHandler)

Example 14 with StackManager

use of dev.rosewood.rosestacker.manager.StackManager in project RoseStacker by Rosewood-Development.

the class BlockListener method handleExplosion.

private void handleExplosion(Location location, List<Block> blockList) {
    StackManager stackManager = this.rosePlugin.getManager(StackManager.class);
    if (stackManager.isWorldDisabled(location.getWorld()))
        return;
    boolean stackedBlockProtection = Setting.BLOCK_EXPLOSION_PROTECTION.getBoolean() && stackManager.isBlockStackingEnabled();
    boolean stackedSpawnerProtection = Setting.SPAWNER_EXPLOSION_PROTECTION.getBoolean() && stackManager.isSpawnerStackingEnabled();
    if (stackedSpawnerProtection)
        blockList.removeIf(stackManager::isSpawnerStacked);
    if (stackedBlockProtection)
        blockList.removeIf(stackManager::isBlockStacked);
    for (Block block : new ArrayList<>(blockList)) {
        if (stackManager.isBlockStacked(block)) {
            blockList.remove(block);
            if (!StackerUtils.passesChance(Setting.BLOCK_EXPLOSION_DESTROY_CHANCE.getDouble() / 100))
                continue;
            StackedBlock stackedBlock = stackManager.getStackedBlock(block);
            stackedBlock.kickOutGuiViewers();
            int destroyAmountFixed = Setting.BLOCK_EXPLOSION_DESTROY_AMOUNT_FIXED.getInt();
            int destroyAmount;
            if (destroyAmountFixed != -1) {
                destroyAmount = destroyAmountFixed;
            } else {
                destroyAmount = stackedBlock.getStackSize() - (int) Math.ceil(stackedBlock.getStackSize() * (Setting.BLOCK_EXPLOSION_DESTROY_AMOUNT_PERCENTAGE.getDouble() / 100));
            }
            BlockUnstackEvent blockUnstackEvent = new BlockUnstackEvent(null, stackedBlock, destroyAmount);
            Bukkit.getPluginManager().callEvent(blockUnstackEvent);
            if (blockUnstackEvent.isCancelled())
                continue;
            destroyAmount = blockUnstackEvent.getDecreaseAmount();
            int newStackSize = stackedBlock.getStackSize() - destroyAmount;
            if (newStackSize <= 0) {
                block.setType(Material.AIR);
                stackedBlock.setStackSize(0);
                stackManager.removeBlockStack(stackedBlock);
                continue;
            }
            if (Setting.BLOCK_EXPLOSION_DECREASE_STACK_SIZE_ONLY.getBoolean()) {
                stackedBlock.setStackSize(newStackSize);
                if (newStackSize <= 1)
                    stackManager.removeBlockStack(stackedBlock);
            } else {
                stackedBlock.setStackSize(0);
                stackManager.removeBlockStack(stackedBlock);
                Material type = block.getType();
                block.setType(Material.AIR);
                Bukkit.getScheduler().runTask(this.rosePlugin, () -> {
                    List<ItemStack> items;
                    if (Setting.BLOCK_BREAK_ENTIRE_STACK_INTO_SEPARATE.getBoolean()) {
                        items = GuiUtil.getMaterialAmountAsItemStacks(type, newStackSize);
                    } else {
                        items = Collections.singletonList(ItemUtils.getBlockAsStackedItemStack(type, newStackSize));
                    }
                    stackManager.preStackItems(items, block.getLocation().clone().add(0.5, 0.5, 0.5));
                });
            }
        } else if (stackManager.isSpawnerStacked(block)) {
            blockList.remove(block);
            if (!StackerUtils.passesChance(Setting.SPAWNER_EXPLOSION_DESTROY_CHANCE.getDouble() / 100))
                continue;
            StackedSpawner stackedSpawner = stackManager.getStackedSpawner(block);
            int destroyAmountFixed = Setting.SPAWNER_EXPLOSION_DESTROY_AMOUNT_FIXED.getInt();
            int destroyAmount;
            if (destroyAmountFixed != -1) {
                destroyAmount = destroyAmountFixed;
            } else {
                destroyAmount = stackedSpawner.getStackSize() - (int) Math.ceil(stackedSpawner.getStackSize() * (Setting.SPAWNER_EXPLOSION_DESTROY_AMOUNT_PERCENTAGE.getDouble() / 100));
            }
            SpawnerUnstackEvent spawnerUnstackEvent = new SpawnerUnstackEvent(null, stackedSpawner, destroyAmount);
            Bukkit.getPluginManager().callEvent(spawnerUnstackEvent);
            if (spawnerUnstackEvent.isCancelled())
                continue;
            destroyAmount = spawnerUnstackEvent.getDecreaseAmount();
            int newStackSize = stackedSpawner.getStackSize() - destroyAmount;
            if (newStackSize <= 0) {
                block.setType(Material.AIR);
                stackedSpawner.setStackSize(0);
                stackManager.removeSpawnerStack(stackedSpawner);
                continue;
            }
            if (Setting.SPAWNER_EXPLOSION_DECREASE_STACK_SIZE_ONLY.getBoolean()) {
                stackedSpawner.setStackSize(newStackSize);
            } else {
                stackedSpawner.setStackSize(0);
                stackManager.removeSpawnerStack(stackedSpawner);
                EntityType spawnedType = stackedSpawner.getSpawnerTile().getSpawnedType();
                block.setType(Material.AIR);
                Bukkit.getScheduler().runTask(this.rosePlugin, () -> {
                    List<ItemStack> items;
                    if (Setting.SPAWNER_BREAK_ENTIRE_STACK_INTO_SEPARATE.getBoolean()) {
                        items = new ArrayList<>();
                        for (int i = 0; i < newStackSize; i++) items.add(ItemUtils.getSpawnerAsStackedItemStack(spawnedType, 1));
                    } else {
                        items = Collections.singletonList(ItemUtils.getSpawnerAsStackedItemStack(spawnedType, newStackSize));
                    }
                    stackManager.preStackItems(items, block.getLocation().clone());
                });
            }
        }
    }
}
Also used : SpawnerUnstackEvent(dev.rosewood.rosestacker.event.SpawnerUnstackEvent) StackedSpawner(dev.rosewood.rosestacker.stack.StackedSpawner) StackManager(dev.rosewood.rosestacker.manager.StackManager) ArrayList(java.util.ArrayList) Material(org.bukkit.Material) BlockUnstackEvent(dev.rosewood.rosestacker.event.BlockUnstackEvent) EntityType(org.bukkit.entity.EntityType) StackedBlock(dev.rosewood.rosestacker.stack.StackedBlock) Block(org.bukkit.block.Block) StackedBlock(dev.rosewood.rosestacker.stack.StackedBlock) List(java.util.List) ArrayList(java.util.ArrayList) ItemStack(org.bukkit.inventory.ItemStack)

Example 15 with StackManager

use of dev.rosewood.rosestacker.manager.StackManager in project RoseStacker by Rosewood-Development.

the class BreedingListener method onBreed.

@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBreed(PlayerInteractEntityEvent event) {
    Entity entity = event.getRightClicked();
    if (!Setting.ENTITY_CUMULATIVE_BREEDING.getBoolean() || !(entity instanceof Animals))
        return;
    Animals animal = (Animals) entity;
    if (!animal.canBreed())
        return;
    StackManager stackManager = this.rosePlugin.getManager(StackManager.class);
    if (!stackManager.isEntityStackingEnabled())
        return;
    StackedEntity stackedEntity = stackManager.getStackedEntity(animal);
    if (stackedEntity == null)
        return;
    Player player = event.getPlayer();
    EntityStackSettings stackSettings = stackedEntity.getStackSettings();
    ItemStack breedingItem = player.getInventory().getItem(event.getHand());
    if (!stackSettings.getEntityTypeData().isValidBreedingMaterial(breedingItem.getType()) || (player.getGameMode() != GameMode.CREATIVE && breedingItem.getAmount() < 2))
        return;
    if (PersistentDataUtils.isAiDisabled(animal) && Setting.SPAWNER_DISABLE_MOB_AI_OPTIONS_DISABLE_BREEDING.getBoolean()) {
        event.setCancelled(true);
        return;
    }
    int stackSize = stackedEntity.getStackSize();
    if (stackSize < 2)
        return;
    Class<? extends Entity> entityClass = animal.getType().getEntityClass();
    if (entityClass == null)
        return;
    event.setCancelled(true);
    // Take the items for breeding
    int totalChildren;
    if (player.getGameMode() != GameMode.CREATIVE) {
        int requiredFood = Math.min(stackSize, breedingItem.getAmount());
        breedingItem.setAmount(breedingItem.getAmount() - requiredFood);
        totalChildren = requiredFood / 2;
    } else {
        // Creative mode should allow the entire stack to breed half as many babies as the total size
        totalChildren = stackSize / 2;
    }
    // Reset breeding timer and play the breeding effect
    animal.setAge(6000);
    animal.setBreedCause(player.getUniqueId());
    animal.playEffect(EntityEffect.LOVE_HEARTS);
    boolean disableAi = PersistentDataUtils.isAiDisabled(animal);
    // Drop experience and spawn entities a few ticks later
    int f_totalChildren = totalChildren;
    Bukkit.getScheduler().runTaskLater(this.rosePlugin, () -> {
        for (int i = 0; i < f_totalChildren; i++) animal.getWorld().spawn(animal.getLocation(), entityClass, x -> {
            Ageable baby = (Ageable) x;
            baby.setBaby();
            if (disableAi)
                PersistentDataUtils.removeEntityAi(baby);
        });
        StackerUtils.dropExperience(animal.getLocation(), totalChildren, 7 * totalChildren, totalChildren);
    }, 30);
}
Also used : EntityStackSettings(dev.rosewood.rosestacker.stack.settings.EntityStackSettings) Setting(dev.rosewood.rosestacker.manager.ConfigurationManager.Setting) EntityEffect(org.bukkit.EntityEffect) Entity(org.bukkit.entity.Entity) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) Animals(org.bukkit.entity.Animals) Player(org.bukkit.entity.Player) PlayerInteractEntityEvent(org.bukkit.event.player.PlayerInteractEntityEvent) RosePlugin(dev.rosewood.rosegarden.RosePlugin) ItemStack(org.bukkit.inventory.ItemStack) EntityStackSettings(dev.rosewood.rosestacker.stack.settings.EntityStackSettings) EventHandler(org.bukkit.event.EventHandler) StackManager(dev.rosewood.rosestacker.manager.StackManager) GameMode(org.bukkit.GameMode) EventPriority(org.bukkit.event.EventPriority) PersistentDataUtils(dev.rosewood.rosestacker.utils.PersistentDataUtils) StackerUtils(dev.rosewood.rosestacker.utils.StackerUtils) Ageable(org.bukkit.entity.Ageable) Bukkit(org.bukkit.Bukkit) Listener(org.bukkit.event.Listener) Entity(org.bukkit.entity.Entity) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) StackedEntity(dev.rosewood.rosestacker.stack.StackedEntity) Player(org.bukkit.entity.Player) Animals(org.bukkit.entity.Animals) StackManager(dev.rosewood.rosestacker.manager.StackManager) ItemStack(org.bukkit.inventory.ItemStack) Ageable(org.bukkit.entity.Ageable) EventHandler(org.bukkit.event.EventHandler)

Aggregations

StackManager (dev.rosewood.rosestacker.manager.StackManager)22 StackedSpawner (dev.rosewood.rosestacker.stack.StackedSpawner)12 EventHandler (org.bukkit.event.EventHandler)10 ItemStack (org.bukkit.inventory.ItemStack)10 Location (org.bukkit.Location)9 Block (org.bukkit.block.Block)9 EntityType (org.bukkit.entity.EntityType)7 StackSettingManager (dev.rosewood.rosestacker.manager.StackSettingManager)6 StackedBlock (dev.rosewood.rosestacker.stack.StackedBlock)6 StackedEntity (dev.rosewood.rosestacker.stack.StackedEntity)6 EntityStackSettings (dev.rosewood.rosestacker.stack.settings.EntityStackSettings)5 SpawnerStackSettings (dev.rosewood.rosestacker.stack.settings.SpawnerStackSettings)5 ArrayList (java.util.ArrayList)5 HashSet (java.util.HashSet)5 LivingEntity (org.bukkit.entity.LivingEntity)5 BlockUnstackEvent (dev.rosewood.rosestacker.event.BlockUnstackEvent)4 Setting (dev.rosewood.rosestacker.manager.ConfigurationManager.Setting)4 LocaleManager (dev.rosewood.rosestacker.manager.LocaleManager)4 PersistentDataUtils (dev.rosewood.rosestacker.utils.PersistentDataUtils)4 StackerUtils (dev.rosewood.rosestacker.utils.StackerUtils)4