Prevent the use of named items in crafting/smelting/brewing/etc.

Discussion in 'Plugin Requests' started by adamk523, Jun 12, 2016.

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

    adamk523

    Plugin category: Mechanics

    Minecraft version: Spigot 1.8.8

    Suggested name: NoNamedItemCrafting? PreventNametaggedItemRecipes? idk lol

    What I want:
    I think this would be an easy request to fill: I would like a plugin where you can prevent people (ideally by using a permission node) from using items that have names attached from being used as ingredients in crafting recipes.
    I have a bunch of custom items on my server by now, but it's difficult to balance them against all the vanilla items' characteristics: for instance, a less-valuable item that LOOKS like a diamond can be used in vanilla crafting recipes like a real diamond despite its nametag claiming it's an "uncut sapphire" or something. This can get dicey with lots of custom items in existence and I don't want people figuring out easy ways to create lots of diamond lookalikes, just to use them to craft real diamond gear!

    Basically, a permission node for using named items of any kind in crafting recipes, a node for smelting, and a node for brewing would be more than adequate for keeping the economy balanced and the custom items feeling separate from the vanilla items. :) A Skript for this function would be excellent too. Thank you very much to anyone who takes this plugin on!

    *Bonus points for an item whitelist where you can specify a specific name for an item that CAN be used in a crafting table, e.g. string with the name "&6Chain" can be used as normal string in vanilla recipes in addition to special recipes.

    Ideas for commands: Just a simple reload command for the config would be the only necessary thing.

    Ideas for permissions: nonameditemcrafting.craft, nonameditemcrafting.smelt, nonameditemcrafting.brew, etc.

    When I'd like it by: ASAP if anyone would be so kind, I've been trying to keep our economy in check until this issue can be fixed.
     
  2. Offline

    Henzz

    @adamk523

    NoCraftCustomItems: https://drive.google.com/file/d/0B6niH8eaqdpKN3ZtSy0tQVE1VGM/view?usp=sharing

    If a player interacts with a workbench, furnace or brewing stand with an item that has a custom name in their hand, they will be restricted from interacting with the block. If the player has a custom item name that's been white-listed in the configuration file, they may interact with either of those blocks mentioned above.

    Permissions:
    Code:
    nocraftcustomitems.craft - Can craft with any custom item name
    nocraftcustomitems.smelt - Can smelt with any custom item name
    nocraftcustomitems.brew - Can brew with any custom item name
    
    I haven't wrote plugins in a very long time, so let me know how this goes or if you need any help.
     
  3. Offline

    adamk523

    @Henzz Thank you very much for the reply and plugin! However, what I had in mind is different. I can't right click a crafting table with a named item now thanks to your plugin, but I can still use named items as part of recipes, which is what I'd like to prohibit for most named items.

    I made a quick video to explain the situation: in Slimefun, for instance, Synthetic Diamonds can be obtained more easily than regular diamonds and the two items are treated as distinct items by plugins, but the vanilla crafting system only sees a regular diamond. I want to blanket ban crafting with named items (while of course allowing for a whitelist for exceptions) so people can't start cranking out a crapton of synthetic diamonds and never need to go mining for diamonds ever again



    Hopefully this explains the situation adequately, sorry for being unclear before. :) Thanks very much for the reply and plugin, and I hope this isn't too much of a hassle to program!
     
  4. Offline

    Henzz

    @adamk523

    Ahh yeap, got ya! Sort of rushed it and completely forgot about the recipe part of it. I'm about to head to sleep, so I'll easily have this done for you tomorrow! :)

    @adamk523

    NoCraftCustomItems: https://drive.google.com/file/d/0B6niH8eaqdpKa3FJZWEtbjlfaWs/view?usp=sharing

    You won't be able to click/drag the blacklisted item within a brewing stand, furnace or workbench inventory, unless you have the permission node to do so. As for player crafting, the named recipe contents will result to air. This is prevented by blacklisting the actual item display names itself, but not the material of the item.

    Permissions:
    Code:
    nocraftcustomitems.workbench - Cant workbench any custom item name
    nocraftcustomitems.craft - Can player craft with any custom item name
    nocraftcustomitems.smelt - Can smelt with any custom item name
    nocraftcustomitems.brew - Can brew with any custom item name
    
    Let me know if there is anything that needs fixing and I'll be happy to do so!
     
    Last edited: Jun 16, 2016
    adamk523 likes this.
  5. Offline

    adamk523

    @Henzz Now we're talking!! Thank you so much, this works perfectly! :D Glad word didn't get around too far on my server that custom items could be used in vanilla recipes, or this crisis could have gotten out of hand fast - thanks again and I'll be sure to follow your future projects. :)
     
  6. Offline

    I Al Istannen

    @Henzz
    Hoppers. Did you think of hoppers? And Droppers.
    This looks promising if you didn't.

    I would cancel it alltogether, as you can't verify the owner.
     
  7. Offline

    Henzz

    @I Al Istannen @adamk523

    I don't play Minecraft anymore hence why I've probably forgotten most of those things to add. If needed be, I will add it.
     
  8. Offline

    I Al Istannen

    @Henzz
    The user must think of it first :p It was just something that came to my mind and I though I would make you and the OP aware of it.
    It's the same with me. After 1.7 I just stopped playing and now I just occasionally develop a plugin, but I moved on to other games.
     
    Henzz likes this.
Thread Status:
Not open for further replies.

Share This Page