BlockLimiter [NO LONGER SUPPORTED] 1.0.2

BlockLimiter limits the amount of specific types of blocks that can be placed in a region.

  1. S_Ryan
    BlockLimiter

    THIS WAS A CUSTOM PROJECT. THE AVAILABILITY OF THIS PROJECT WAS EXPERIMENTAL. THIS PROJECT WILL NOT RECEIVE ANY FURTHER UPDATES/FIXES/CHANGES.

    BlockLimiter gives servers the power to limit the amount of specific types of blocks that can be placed in a WorldGuard region. It also can limit the amount of a few different entities that can be placed in a region. This plugin was created and is being developed for the CDGS Network (http://cdgs.net). I am open to suggestions; however, this plugin will be tuned to the needs of the aforementioned network.

    How It Works:
    BlockLimiter can limit the amount of specific types of blocks and a few different entities that can be placed in a region. The blocks and entities which are limited are declared in a "category" within the config. Once a category is defined, it can be applied to any amount of regions. Setting a category to a region can either be done in the config or with the command /bl setcategory <world> <region> <category>. If you are wanting to remove the category from a region (stop limiting it), this can be done either in the config or with the command /bl remcategory <world> <region>.
    The plugin determines how many of a block or entity is within a region using "data". Data is generated (the amount specific of blocks and entities in each region is calculated) at server startup, server reload, and plugin reload. Data can also be generated using the command /bl gendata. The gendata command is best used after a WorldEdit (BlockLimiter does not detect WorldEdits) to re-calculate the amounts or in an odd case when a region believes it has more or less of a block or entity than it really does.



    Commands:

    • /bl view plugin info.
    • /bl help view a list of all commands.
    • /bl reload reload the plugin (and generate data).
    • /bl gendata generate data based on region contents.
    • /bl stats display plugin activity stats since last reload.
    • /bl setcategory <world> <region> <category> set the category for a region.
    • /bl remcategory <world> <region> remove the category for a region.

    Permissions:
    • blocklimiter.help
    • blocklimiter.reload
    • blocklimiter.gendata
    • blocklimiter.stats
    • blocklimiter.setcategory
    • blocklimiter.remcategory

    Config:
    Categories and regions are defined within the config. A category can limit both blocks and entities. For blocks, BlockLimiter supports all standard blocks and Signs. For entities, BlockLimiter supports Item Frames and Armor Stands. More entities (and non-standard blocks) may be added if need arises. In the config, entire worlds can be toggled on and off. This limits how much the plugin has to check. A category is assigned to a region by defining it under the world the region is in. The definition format is region: category. All strings (messages) are config-driven and can be edited to your liking.


    Code (Text):
    strings:
      categoryNonExistant: '&6[BlockLimiter] &cThat category does not exist.'
      categoryRemoved: '&6[BlockLimiter] &7Category removed from region.'
      categorySet: '&6[BlockLimiter] &7Category set for region.'
      commandNonExistant: '&cThat command does not exist.'
      currentAmount: '&6[BlockLimiter] &7You have placed &a%amount &7out of &a%max &7allowed
        of that item.'
      dataGenerated: '&6[BlockLimiter] &7Data was successfully generated.'
      help:
      - '&6[BlockLimiter] &7Commands:'
      - '&cUsage: /bl <command>'
      - '&ahelp  &7View a list of all BlockLimiter commands.'
      - '&areload  &7Reload the plugin.'
      - '&agendata  &7Generate data based on region contents.'
      - '&astats  &7Display plugin activity stats since last reload.'
      - '&asetcategory <world> <region> <category>  &7Set the category for a specific
        region.'
      - '&aremcategory <world> <region>  &7Remove the category for a specific region.'
      infoHeader: '&6[BlockLimiter]&7'
      invalidArguments: '&6[BlockLimiter] &cInvalid arguments.'
      maxReached: '&6[BlockLimiter] &cYou have already placed the maximum of &a%max &callowed
        of that item.'
      noPermission: '&cYou do not have permission for that command!'
      playerHasNotLoggedIn: '&6[BlockLimiter] &cYou cannot run this command until a player
        has logged in.'
      regionHasNoCategory: '&6[BlockLimiter] &cThat region has no category.'
      reloaded: '&6[BlockLimiter] &7Successfully reloaded.'
      reloading: '&6[BlockLimiter] &cYou cannot place blocks while this plugin is reloading.
        Try again in a few seconds.'
      stats:
      - '&6[BlockLimiter] &7Stats:'
      - '&7Events Cancelled: &a%eventsCancelled'
      - '&7Blocks Added: &a%blocksAdded'
      - '&7Blocks Removed: &a%blocksRemoved'
      - '&7Entities Added: &a%entitiesAdded'
      - '&7Entities Removed: &a%entitiesRemoved'
      worldNonExistant: '&6[BlockLimiter] &cThat world does not exist.'
    categories:
      Example:
        blocks:
          CHEST: 10
          SIGN: 5
        entities:
          ITEM_FRAME: 3
          ARMOR_STAND: 3
    worlds:
      world:
        enabled: true
        regions:
          House1: Example
    Last Update:
    - Public Release

    Contact:
    If you have any questions, suggestions, or comments, please post them as a comment here. If it is important enough, feel free to add me on Skype (spencer.ryan.c). Before reviewing the plugin, please test it, attempt to solve your problems by asking questions, and objectively evaluate the plugin. Thank you.