StackMob - Enhance your servers performance v3.3.2

Enhance your server performance by 'stacking' or 'merging' entities together.

  1. antiPerson
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.13
    Source Code:
    https://github.com/Nathat23/StackMob-2
    Version Compatibility:
    1.13 and up: Download latest above. 1.8-1.12: Download 2.2.17
    Updating from a really old version (older than 2.x) ? You will also need this.

    Are mob farms lagging your Minecraft server? Or do you have a very big world? Then this plugin will help you!
    [​IMG]
    I decided to make this plugin after seeing a lot of the creature stacking / monster stacking plugins on SpigotMC are either paid (and overpriced), buggy or lack many features. StackMob aims to be the best free alternative.

    Features:
    • Spigot 1.13 supported.
    • Customisable radius for creatures to be detected in.
    • Creature type and spawn reason blacklist so not all creatures get stacked.
    • Checks to stop entities being stacked if they are tamed or leashed.
    • Option to have entities stack on a regular interval.
    • Setting for maximum stack size.
    • Option to prevent monsters from targeting or to remove all ai.
    • 'Special' stack rules for specific mob types.
    • Support for all entity traits, eg. different entity colors, ages, if sheep are sheared and slime sizes.
    • Option to disable the tags above the creatures all together, when the stack hits a certain size, when not hovered over or even when the player is not in the area of the entity (requires ProtocolLib.)
    • 'kill-all' so when a stacked creature is killed, all of them are killed at once and the drops are multiplied with drop chances.
    • 'kill-step' same as kill-all, but is only a random amount at a time between two numbers in the config.
    • 'kill-step-damage' like kill-step but uses the amount of damage dealt to calculate step.
    • Entity display name translation support.
    • Multiplication of loot and experience for all killing modes.
    • Custom 'entity-stacking' WorldGuard 7.0 flag to prevent/allow stacking only in certain regions.
    • mcMMO, MiniaturePets, Citizens2, Jobs Reborn and MythicMobs 4.0.0 support.
    • Several advanced features, see the config below.
    • Doesn't break mob grinders!
    Permissions:
    • stackmob.admin - Allows your players to do administrative tasks
    • stackmob.kill-all - Allows the use of kill-all, which instantly kills all entities in the stack. *
    • stackmob.kill-step - Allows the use of kill-step which only removes a random amount from the stack. *
    • stackmob.kill-step-damage - Allows the use of kill-step-damage which removes an amount dependent on damage dealt. *
    Permissions with a (*) require the config option 'death-type-permission' to be enabled.
    Commands:
    [​IMG]
    Videos:

    (both are in english, also from StackMob 1)


    Configuration:
    Code (YAML):

    # StackMob 3 created by antiPerson.
    # Report issues that you have experienced in the discussion thread.
    # If the comments have been removed, see the config.yml file in the defaults folder!

    # The size of the area around an entity that should be checked for matching entities to stack with.
    check-area
    :
        x
    : 7
        y
    : 4
        z
    : 7

    # Everything related to the tag seen above entities
    tag
    :
       # The delay between updates of the name tag.
        interval
    : 10
        # The formatting of the tag.
        # Placeholders:
        # %size% - Stack size.
        # %type% - Formatted type name.
        # %bukkit_type% - The entity type as bukkit calls it.
        # Normal Minecraft color codes are also supported, by using '&' before the letter/number.
        format
    : '&d%size%x &6%type%'
        # If the translations in the entity-lang.yml file should take effect.
        use-translations
    : false
        # If the tag should be seen when the entity is not hovered over.
        always-visible
    : true
        # If the stack size if equal to or below this number, don't show the tag.
        remove-at
    : 1
        # Only show the name tag if the player is near the entity. (requires ProtocolLib)
        show-player-nearby
    :
            enabled
    : true
            # Only display the tag to the player if the player is in this area of the entity.
            x
    : 8
            y
    : 3
            z
    : 8


     # Custom rules for specific entities.
    custom
    :
       # Example (remove hashtags to make this work):
        #PIG:
        #    stack-max: 25
        #    tag:
        #        format: '%size%x Piggy'
        #        always-visible: true
        #        remove-at: 1

    # The delay between each time the stacking task is ran (in ticks.)
    task-delay
    : 100
    # The maximum size a single stack can be.
    stack-max
    : 20
    # If bigger stacks should get priority when stacking on the task.
    big-priority
    : true
    # If stacked entities should get removed when the chunk unloads.
    remove-chunk-unload
    : false
    # If entities existed before the addition of this plugin, stack them when chunks load.
    convert-existing-entities
    : true
    # Only stack if the entity was spawned by these causes.
    # Reasons list can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
    stack-reasons
    :
       -
    # Stack only if the entity is one of these types.
    # List of the bukkit names can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
    stack-types
    :
       -
    # If the entity is located in one of these worlds, then stack.
    stack-worlds
    :
       -
    # If the entity was spawned by these causes, then don't stack.
    # Reasons list can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
    no-stack-reasons
    :
       -
    # Don't stack if the entity is one of these types.
    # List of the bukkit names can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
    no-stack-types
    :
       -
    # If the entity is located in one of these worlds, then don't stack.
    no-stack-worlds
    :
       -
    # Don't stack until there are more than the number specified of entities of the same type in the check area set above.
    # Set to 0 to disable this feature.
    dont-stack-until
    : 5

    # If specific entities should have a waiting time before their first stack.
    # Designed for monster grinders etc.
    wait-to-stack
    :
        enabled
    : true
        # For (x) times the stack task fires after spawn, don't stack this entity.
        wait-time
    : 5
        # Entity types that this should work for.
        entity-types
    :
           - ZOMBIE
            - SKELETON
            - PIG_ZOMBIE
        # Spawn reasons that this should work for.
        spawn-reasons
    :
           - SPAWNER

    # Enables/disables the comparing of mob type specific attributes before stacking together.
    compare
    :
        villager-profession
    : true
        sheep-wool-sheared
    : true
        sheep-wool-color
    : true
        slime-size
    : true
        horse-color
    : true
        llama-color
    : true
        parrot-color
    : true
        drowned-hand-item
    : true
        # Applies to more than one type of entity:
        entity-age
    : true
        can-breed
    : true

    # Check these attributes before stacking.
    check
    :
        tamed
    : true
        leashed
    : true
        is-miniature-pet
    : true
        is-citizens-npc
    : true

    # Things that should be duplicated.
    multiply
    :
        # Make creeper explosions bigger
         creeper-explosion
    : true
         # Chicken lay eggs, so make more eggs be dropped
         chicken-eggs
    : true
         # When sheep are sheared, multiply all the wool.
         sheep-wool
    : false
         # Multiply mushrooms for all of the cows.
         mooshroom-mushrooms
    : false
         # Multiply the amount of small slimes spawned when a big slime is killed.
         small-slimes
    : true
         # When an entity is fed it's food, spawn a new stack with the correct number of children.
         breed
    : false

    # If the stack should split into more when these things happen.
    divide-on
    :
       # If sheep should split into separate stacks when sheared.
        sheep-shear
    : true
        # If dying sheep should cause the stack to split.
        sheep-dye
    : true
        # When a mooshroom gets sheared, spilt the stack.
        mooshroom-shear
    : true
        # When a stack is fed it's food, spilt, so the stack can be bred.
        breed
    : true
        # When a player tames an entity.
        tame
    : true
        # When an entity it named using a name tag.
        name
    : true

    # Enables the requirement for a permission for use of 'kill-all' or 'kill-step'.
    death-type-permission
    : false

    # Increase the player statistics when a mob has a death amount higher than 1.
    increase-player-stats
    : true

    # Make every entity die in the stack on death.
    kill-all
    :
        enabled
    : false
        # DeathEvent reasons that shouldn't trigger kill-all.
        # List of bukkit names for death reasons can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
        reason-blacklist
    :
           - ''
        # Entity types that shouldn't trigger kill-all.
        type-blacklist
    :
           - ''

    # Only kill some of the stack
    kill-step
    :
        enabled
    : true
        # DeathEvent reasons that shouldn't trigger kill-step.
        # List of bukkit names for death reasons can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
        reason-blacklist
    :
           - ''
        # Entity types that shouldn't trigger kill-step.
        type-blacklist
    :
           - ''
        # The maximum amount by which the stack should decrease by.
        # Setting this to less than 2 will cause errors! If you want entities to be killed on a one-by-one basis, disable both kill-all and kill-step.
        max-step
    : 5

    # Add the leftover damage from the death of one entity onto another, and if the leftover damage could kill another entity the stack will decrease.
    kill-step-damage
    :
        enabled
    : false
        # DeathEvent reasons that shouldn't trigger kill-step-damage.
        # List of bukkit names for death reasons can be found at https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
        reason-blacklist
    :
           - ''
        # Entity types that shouldn't trigger kill-step-damage.
        type-blacklist
    :
           - ''

    # Multiply the amount of drops depending on the size of the stack killed.
    # Only required if kill-all, kill-step or kill-step-damage is enabled above.
    multiply-drops
    :
        enabled
    : true
        # The amount of entities that the loot should be dropped for in a stack.
        # Useful if there is a high max-stack value, to prevent lag.
        entity-limit
    : 50
        # If the drops for an entity should be calculated using it's loot table rather than just multiplying drop stack sizes.
        calculate-per-entity
    : true
        # Prevent certain drops from being multiplied.
        drops-blacklist
    :
           - ''
        # Only drop one item per entity.
        drop-one-per
    :
           - EMERALD
            - NETHER_STAR
            - TOTEM

    # Multiplies the experience dropped on kill-all/kill-step.
    multiply-exp
    :
        enabled
    : true
        # Algorithms that should be used for multiplying experience.
        # LEGACY - algorithm used in StackMob v2.2.9 and older
        # MINIMAL - only add a small amount of extra experience.
        # NORMAL - the default amount of extra experience.
        # GENEROUS - adds a significant amount of extra experience.
        # CUSTOM - use a custom multiplier for the extra experience.
        # CUSTOM_RANDOM - same as CUSTOM but makes multiplier a bit random.
        algorithm
    : NORMAL
        # Used when the CUSTOM or CUSTOM_RANDOM mode is used above.
        custom-multiplier
    : 1.0

    # Multiplies the damage that the player receives.
    multiply-damage-done
    : true

    # Multiplies the damage that the entities receives, if multiplied damage is more than the max health, remove stacks.
    multiply-damage-received
    :
        enabled
    : true
        # Blacklist of damage causes.
        cause-blacklist
    :
           - ''

    # Prevent entities from targeting players.
    # Like no-ai but the entities can move.
    no-targeting
    :
        enabled
    : false
        types-blacklist
    :
           - ''

    # Disables the ai on entities.
    no-ai
    :
        enabled
    : false
        use-whitelist
    : false
        types-whitelist
    :
           - ''

    # Add the remaining amount of fire ticks from a dead entity onto the new entity.
    fire-ticks
    :
        enabled
    : true
        # Blacklist of entity types.
        blacklist
    :
           - ''

    # Everything to do with mcMMO
    mcmmo
    :
       # Give no mcmmo experience
        no-experience
    :
            enabled
    : true
            # Blacklist of entity types that should still give mcmmo experience.
            blacklist
    :
               - ''
    mythicmobs
    :
       # Support for checking of MythicMobs.
        enabled
    : true
        # MythicMob types that shouldn't stack, use the 'internal name'
        # To prevent all stacking, add 'ALL' to the list below.
        blacklist
    :
           - ''

    # Support for Jobs Reborn by Zrips
    jobs-reborn
    :
       # Support for the for prevention of job rewards.
        enabled
    : true
        # Entity types that rewards should still be given for.
        blacklist
    :
           - ''

    # If WorldGuard is installed, enable support for it.
    # Use the 'entity-stacking' flag to disable mob stacking in certain regions.
    worldguard-support
    : true

    # The stacking tool which can be obtained using the command '/sm stick'
    stack-tool
    :
       # The material that the stacking tool should use.
        material
    : STICK

    # The caching of entity stack sizes.
    storage
    :
       # The delay between each save of the cache (in seconds.)
        delay
    : 120
        # The storage method used.
        # FLATFILE = YAML file storage.
        # MYSQL = MySQL database storage - faster but requires a database server.
        type
    : FLATFILE
        # Database  details
        database
    :
           # Server details.
            ip
    : ''
            port
    : 3306
            # The name of the database you want to use.
            name
    : ''
            # Login details.
            username
    : ''
            password
    : ''
     

    Developer API:
    There is new API in StackMob 2, since the whole plugin was re-coded.

    The code below can be used to create an instance of the EntityManager class which contains several useful things.
    Code (Text):
    StackMob sm = (StackMob) Bukkit.getPluginManager().getPlugin("StackMob");
    EntityManager em = new EntityManager(sm);
    As of StackMob 3, because of the refactoring there is a new event, the EntityStackEvent.
    There is also a way to separate custom entities, using the 'traits' system. Make a class implement ComparableTrait, then register it when the server enables with the TraitManager#registerTrait method.

    bStats:
    If you don't want that your server sends data to bStats you can disable it by setting enabled to false in the bStats config file. The config can be found in the /plugins/bStats/config.yml file. bStats has nearly no effect on your server's performance and the sent data is completely anonymous so please consider twice if you really want to disable it.

    Seeing that lot's of servers are using their plugin can keep plugin authors motivated and some of the data can also be used to improve their plugins.

    Do you like this plugin? Please leave a review below - it helps a lot. Found a bug or have a suggestion? Post it on the Issue Tracker
    Want to send a donation my way to help support the development of this plugin? Click here.

Recent Reviews

  1. TheUprising
    TheUprising
    5/5,
    Version: v3.3.2
    Works perfectly... Its a 1.13 plugin guys do yall even read the info? Lmao
    Props to the dev for the updates on such a useful plugin
  2. Ser3195
    Ser3195
    5/5,
    Version: v3.3.2
    I was having extreme lag in my server, like 9 TPS. Then with this plugin I got 14 TPS. Totally recommended
  3. CameraPlay
    CameraPlay
    5/5,
    Version: v3.3.0
    Support is very responsive and friendly. Authors added a new event to API in 1 hour after my asking them. I want to set 10/5.
  4. yigityetkin
    yigityetkin
    5/5,
    Version: v3.2.0
    it is best stack plugin.
    ........................................................
    1. antiPerson
      Author's Response
      Thanks for the review!
  5. FelixDeC
    FelixDeC
    3/5,
    Version: v3.1.1
    Does not work with the plugin "MergedSpawner (SilkSpawner/TokenEnchant/MergedMob etc support included!)" mobs still spawn 1 by 1 when spawned by an spawner
  6. ronc617
    ronc617
    5/5,
    Version: v3.0.0
    Great plugin that i rely on heavy with skyblock. Love the updates and also the fact that the dev makes improvements taking our input into consideration. Keep up the great work
    1. antiPerson
      Author's Response
      Thanks for the review!
  7. dexter78
    dexter78
    1/5,
    Version: v2.4.7
    Tried it on spigot 1.8.8 - it doesnt work at all - it does not stack, doesn not log anything - crap !
  8. Vexius
    Vexius
    5/5,
    Version: v2.4.7
    Great plugin, increased our servers performance with about 6-7% (which is really good) - It works just as well as the premium resources if not better. I wouldn't waste a single penny when this plugin has all the features and works even better!

    Keep up the good job Author, and I think everyone should support him in some way!
    1. antiPerson
      Author's Response
      Thanks for the review!
  9. XxMadSkizzlesxX
    XxMadSkizzlesxX
    5/5,
    Version: v2.4.5
    Alright let me bring this into full circle, The author originally dropped support for latest patches on older versions.... I left a review and soon I got a profile post about StackMob Legacy and I have to say bravo to you antiPerson I am truly impressed. Not only did you fix the issue, you also notified me about the fix. Thanks!
    1. antiPerson
      Author's Response
      Thanks for the review!
  10. yanisssch91
    yanisssch91
    4/5,
    Version: v2.4.0
    Only support 1.13 is the joke -_- but good plugin and good luck for after etc....