BanItem [1.7-1.14] 1.9.6

Lightweight & configurable per world ban item plugin

  1. Andross
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    Source Code:
    https://github.com/Andross96/BanItem
    [​IMG]
    BanItem is a simple lightweight & configurable per world per option ban item plugin. The main goal of the plugin is to disable specifics actions for specifics items in specifics worlds, supporting specifics permissions.

    [​IMG]
    • BlackList: players will not be able to use the item, per option configurable;
    • WhiteList: (reversed blacklist) - all items & options will be blocked , you'll have to set which items is allowed with which option;
    • Per world configurable
    • Per world per item permissions
    • Support of custom items (items with specific item data/meta, like modded items, potions, egg spawners for old versions...)
    • Usefull commands
    • Lightweight & activating only necessary listeners
    • Developer API available
    Options: (bannable)
    • place: when the item is placed or used
    • break: when the item is breaked
    • pickup: when the item is picked up
    • drop: when the item is dropped
    • interact: when the player use right click with main hand on the placed item
    • click: when the player use left click with the item in the main hand
    • inventory: when the player try to take/put the item from/in an inventory
    • dispense: when an item is dispensed from a block
    • delete: when a player open & close an inventory, it will check and delete items which have this option
    • creative: applies only if the player is in creative mode
    • craft: the item will not be craftable anymore
    • smelt: the item will not be smeltable anymore

    Code (YAML):
    # +———————————————————————————————————————————————————+ #
    # |——————————     BANITEM CONFIGURATION     ——————————| #
    # |——————————————————      v1.9      —————————————————| #
    # +———————————————————————————————————————————————————+ #
    # For any bugs/suggestions: Andross#5254
    #
    # -- Informations: --
    #   - Blacklist contains list of blocked items
    #   - Whitelist contains list of allowed items only, so the following options are blocked:
    #      - Placing, breaking, picking up, dropping, interacting, clicking & dispensing items which are not on whitelist
    #   - Worlds can be written single 'world', multiple 'world, world_the_end', or you can include all worlds with '*'
    #   - Options can be written single 'break', multiple 'break, place' or you can include all options with '*'. Using '*!' will not include creative.
    #
    # Blacklist: block ...
    # - place: when the item is placed or used
    # - break: when the item is breaked
    # - pickup: when the item is picked up
    # - drop: when the item is dropped
    # - interact: when the player use right click with main hand on the placed item
    # - click: when the player use left click with the item in the main hand
    # - inventory: when the player try to take/put the item from/in an inventory
    # - dispense: when an item is dispensed from a block
    # - Additional option:
    #  - 'delete': when a player open & close an inventory, it will check and delete items which have this option
    #  - 'creative': applies only if the player is in creative mode
    #  - 'craft': the item will not be craftable anymore
    #  - 'smelt': the item will not be smeltable anymore
    #
    # Whitelist: allow ...
    # - place: place or use the item
    # - break: break the item
    # - pickup: pick up the item
    # - drop: drop the item
    # - interact: the player to use right click with main hand on the item (Have to be almost always used, as you first interact with the clicked block)
    # - click: the player to use left click with the item in the main hand
    # - inventory: the player to take/put the item from/in an inventory
    # - dispense: an item to be dispensed from a block
    # - craft: crafting the item
    # - smelt: smelting the item
    # The 'message' key represents the message sent to players if they try to use an item which is not in whitelist
    # The 'ignored' key represents all ignored options (they will not being by default banned)

    # No permission message (for /banitem)
    no-permission
    : '&cYou do not have permission.'

    # Message cooldown when player try to pickup a banned item (in milliseconds)
    pickup-message-cooldown
    : 1000

    # Animations when a ban item message is sent
    sound
    :
      enabled
    : true
      type
    : ENCHANT_THORNS_HIT
      volume
    : 1
      pitch
    : 1
      worldSound
    : false # if the sound can be heard by others players around or not
    particle
    :
      enabled
    : true
      type
    : BARRIER
      amount
    : 1

    blacklist
    :
      world
    :
        diamond_block
    :
          place
    : '&cYou are not allowed to place a diamond block in world.'
          break
    : '&cYou are not allowed to break a diamond block in world.'
        stone_button
    :
          interact
    : '&cYou can not interact with a stone button in world.'
          pickup
    : '&cYou can not pickup a stone button in world.'
        lava_bucket
    :
          place, creative, delete
    : '&cYou can not use lava buckets in this world while in creative mode.'
        my_custom_potion
    :
          place
    : '&cYou can not use potion of speed I in world.'
      world_the_end
    :
        ender_pearl
    :
          place
    : '&cYou can not use enderpearls in the end.'
    whitelist
    :
      world_the_end
    :
        message
    : '&cYou can only place and break ender stone in the end.'
        ignored
    : inventory, pickup, drop
        end_stone
    : place, interact, break
    Code (YAML):
    blacklist:
      test
    :
        chest
    :
          interact
    : '&cYou can not open chests in world test.'
    Code (YAML):
    blacklist:
      '*'
    :
        diamond
    :
          drop,creative
    : '&cYou can not drop diamonds while in creative mode.'
    Code (YAML):
    blacklist:
      'world'
    :
        ender_pearl
    :
          'place'
    : '&cYou can not use enderpearls in world.'
    Code (YAML):
    blacklist:
      'world'
    :
        diamond
    :
          '*!'
    : '&cThis item is banned.'
    Code (YAML):
    whitelist:
      world_the_end
    :
        message
    : '&cYou can only break and place end stones in the end.'
        ender_stone
    : place, interact, break

    [​IMG]
    • banitem.bypass.* - bypass all banned items in all worlds (default: OP)
      • banitem.bypass.<WorldName>.<MaterialNameInLowerCase>.<OptionInLowerCase>
      • banitem.bypass.<WorldName>.<CustomItemName>.<OptionInLowerCase>
      • Wildcard are supported (ex: banitem.bypass.*.stone.*)
    • banitem.command.* - access to all /banitem command (default: OP)
      • banitem.command.check
      • banitem.command.customitem
      • banitem.command.reload
      • banitem.command.info
      • banitem.command.help
    [​IMG]
    • /banitem check [delete] - will give a list of all players which inventories contains a blacklisted item (respects the worlds). Use the 'delete' argument to also delete those items;
    • /banitem customitem:
      • /banitem customitem add <name> [force]: to create a custom item from the item in your hand. Use the force argument to replace it if already exists; you'll can use this item in your config.yml, with the name entered;
      • /banitem customitem remove <name>: to remove the item
      • /banitem list: will give a list of all custom items (by name)
    • /banitem info - to get information about the current item in your hand (for example the material name to put in config.yml);
    • /banitem reload - to reload config.yml;
    Add your custom items into config.yml to ban it. Example: /banitem customitem add myPotion
    An example config.yml:
    Code (YAML):
    blacklist:
      world
    :
        myPotion
    :
          place
    : '&cYou can not use this potion in world'
    --------------------------------------------------------------------
    Code (Java):
    // Get the BanItemAPI
    BanItemAPI api = getServer().getPluginManager().getPlugin("BanItem").getApi();
    // or
    BanItemAPI api = new BanItemAPI(JavaPlugin.getPlugin(BanItem.class));
    --------------------------------------------------------------------
    For any bugs/questions/suggestions: -> PM me here or on discord.
    --------------------------------------------------------------------
    If you like this plugin, please rate it and/or leave a comment! Thanks! :)
    Or give me a coffee:
    [​IMG]

Recent Updates

  1. Fixed smelt option
  2. Fixed smelt option
  3. Multiple addons + fixes

Recent Reviews

  1. Roadhog360
    Roadhog360
    4/5,
    Version: 1.9.5
    Good plugin, but I would say this is useful on modded servers, except it doesn't seem to work with custom crafting matrices of any kind.
    A fix would be great, if something like this would even be possible.
  2. Mashiroro
    Mashiroro
    5/5,
    Version: 1.9.3
    Good plugin! Very easy to use and works like a charm! Author is very responsive and very helpful! It would have been better if the author could maybe make a list of all the Minecraft ID that the plugin support. As some items do not follow the Minecraft ID, so it will be easier to refer from when blacklisting items. I hope to see more from this plugin!
    1. Andross
      Author's Response
      Thanks! There is actually the '/banitem info' command to get the exact minecraft ID. More is coming! :)
  3. lethanhtien
    lethanhtien
    5/5,
    Version: 1.9.1
    i am using 1.14.4 and plugin very good, but i can't use redstone_torch in config, please fix it
    1. Andross
      Author's Response
      Thanks! That's because the material name is "redstone_torch_on". For any doubt, you can use '/banitem info' to get the exact material name.
  4. JackTheBoy8
    JackTheBoy8
    4/5,
    Version: 1.6
    Its works very well! And doesn't lag, or take up memory space, but the only thing is, when I blacklist lilypads, it still lets me break, place, interact, and more, and only send me a message of this item is banned. It'll be great if you can fix this :)
    1. Andross
      Author's Response
      After a quick test, I've successfully blacklisted lilypads. I'll be glad to help you fix your problem, PM me here or on discord.
  5. MineCraftDirt
    MineCraftDirt
    5/5,
    Version: 1.6
    Very good plugin, can I reprint it to the MCBBS (www.mcbbs.net) forum in China???
    1. Andross
      Author's Response
      Thanks! If you provide the original thread link, yes you can :)
  6. DaaanPrivate
    DaaanPrivate
    5/5,
    Version: 1.6
    Very good plugin, and the author is very friendly. This plugin is complete. I use in my server.
    1. Andross
  7. CaoTrongThang
    CaoTrongThang
    5/5,
    Version: 1.5
    Plugin work very good and author is very friendly, love this plugin :D...........
    1. Andross
      Author's Response
      Thanks! :)
  8. NightYuki
    NightYuki
    5/5,
    Version: 1.5
    good plugin ^^
    ----------------------------------------------------------------------------
    1. Andross
  9. PreciseKill
    PreciseKill
    5/5,
    Version: 1.3
    Good plugin, I don't use this, but I use a custom plugin that has this implemented by Andross and it works amazing, keep the hard work up.
    1. Andross
      Author's Response
      Thanks! The main idea of this plugin comes from your custom one, so everybody could thank you!
  10. eickmung
    eickmung
    5/5,
    Version: 1.3
    very working well. the best author banitem plugin.
    =============================
    1. Andross
      Author's Response
      Thanks, I appreciate!