Item/bloc blocker

Discussion in 'Plugin Requests' started by superhize, Jun 18, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    superhize

    Plugin category: Admin

    Minecraft version: 1.13.x

    Suggested name: Disabler?

    What I want:

    First, Hello. [fire]

    Pretty simple, exact same things this plugin does: https://dev.bukkit.org/projects/itemblock-disabler2

    Block any item from being crafted (i know there is many plugin that aldready did that)
    Block any bloc from being posed/crafted/destroyed
    Block any item from being dispensed
    Block any interaction with a bloc (inventory, etc)
    Disable brewing of given potion
    ...

    Can be enable/disable in each world.

    I found plugin's github https://github.com/superckl/GriefBeGone but even in 1.12 it won't work.

    I don't know if a plugin like that already exist (except the one i listed), if it does, you don't have to do a new one, just give me the link to the plugin you found, be sure the plugin do all the think the plugin i listed do.

    If you need more explanation, tell me.

    Sorry for bad english, i'm bad. [creeper]

    Ideas for commands: /disabler reload to reload the config.

    Ideas for permissions: disabler.reload

    When I'd like it by: ASAP.
     
  2. Offline

    wand555

    @superhize Do you mean disable everything you explained above or just disable certain events you specified before?
    Let's only focus on blocks for example: Would you want a plugin that disables placing/breaking blocks in general or should only a (for e.g.) a cobblestone block, which you set before, be "blocked" and prevented from placing/breaking?
     
  3. Offline

    superhize

    Yes sorry i was unclear, i want a list of blocs i set blocked from being placed/breaking.
    Same for item from being droped/crafted,
    Interacted with in inventory/chest/furnace/...
    Almost all thinks GriefBeGone do.

    Sry for english.
     
  4. Offline

    wand555

    Hey, so I created a first version of the plugin.
    But instead of blocking items in all the ways you listed above, I just check every 10 ticks whether a "blocked" item is in someone's inventory and delete it if thats the case.
    For this version you have to write the exact Material name of the item into the config.yml
    Click here for a detailed list.
    For some reason it just doesn't work with certain items, I assume it has something to do with the Material names, but I'm not 100% sure. Also the permissions don't really seem to work as well, but I moved that back on my priority list because only the person who has the config.yml can actually change items/blocks.
    If you give me more time, I could make it so whenever a player (who has op) types lets say /disabler config, an inventory pops up where the player can add items to the blocked list.
    As I'm fairly new to programming and therefore new to this forum as well, I don't know how to send you the jar.
    EDIT: Interaction bans, crafting bans and drop bans are not implemented as well right now.
    EDIT 2: Created a dropbox account, you can try to download it here.
     
    Last edited: Jun 22, 2019
  5. Offline

    timtower Moderator Moderator

    @wand555 Dropbox link and google drive are the most common ways.
     
  6. Offline

    wand555

    @superhize Alright, updated the plugin.
    Once the plugin is loaded, it creates a config.yml in the plugins//Disabler folder.
    I'm going to explain what each category does, but first lets look at the config.yml:
    Screenshot_1.png
    Drop: Prevent items from being dropped out of a players inventory as well as preventing it from being collected when laying on the ground.
    Usage: Enter the material name.

    Items: Prevent items from being "in the game", e.g. as soon as this item is in someone's inventory, it get's removed.
    Usage: Enter the material name.

    Blocks: Prevent blocks from placing and breaking.
    Usage: Enter material name.

    Crafting: Prevent recipes from crafting including the craftingtable and the 2x2 every player has in his inventory.
    Usage: Enter material name.

    Interaction: Prevent interactions with blocks that offer inventory interactions.
    Usage: Enter material name of the block, which has the inventory you want to block.

    Potion: Prevent potions from being brewed in the brewing stand.
    Usage: Enter the material name of the potion that results when breing with this item.

    World: Not really useful (just leave it as it is) since I didn't know whether you want the plugin to be enabled/disabled in different custom worlds, or just differentiate between overworld, nether and end.

    List of Material names can be found here.

    Permissions are not working but I think that doesn't really matter, since only players who host the server have access to changes (right now you need OP to perform /disabler reload).
    Oh and to add: Please for the love of god, do not enter "null" into a list entry and do not leave a list entry blank. If you still do it, after typing /disabler reload an error message will appear, but it doesn't remove the error automatically. If you still decide to leave it there, the entire category stops working.
    Download
     
  7. Offline

    KarimAKL

    @wand555 You are saving the world object to the config, you should save it's name instead.
     
    wand555 likes this.
Thread Status:
Not open for further replies.

Share This Page