Inactive [ADMN/SEC] Incraftible v0.10 - Superperms-based Crafting [Spout] [1.1-R3]

Discussion in 'Inactive/Unsupported Plugins' started by taufiqkh, Aug 18, 2011.

  1. Offline

    taufiqkh

    Incraftible
    Version: 0.10

    Download the plugin
    Source code for the devs
    Development build for the risk-takers on the bleeding edge (for 1.2)

    Provides permissions-based control of crafting for items and item groups. Runs on the Bukkit permissions API (Superperms), tested with bPermissions and PermissionsEx. It's Incraftible!

    Features:
    • Fine-grained control over all known Bukkit materials
    • Configurable message*
    Requirements

    • Incraftible uses server-side Spout for its inventory crafting events as it allows for a simple, straightforward event listener.
    Compatibility

    Incraftible has been tested with the following:
    • CraftBukkit recommended build #1.1 RB-3
    Other users have found Superperms and Permissions to sit happily side-by-side, but there have been reports of problems with the Permissions * wildcard. I have found issues when using PermissionsBukkit with the latest releases of Bukkit, and it is currently unsupported.

    Configuration:

    Configuration of who can craft what is done via Bukkit permissions. All standard Bukkit materials are supported, and crafting of all standard items is enabled by default. You can disallow crafting of an item by settings its incraftible.craft node to false. For convenience, several permission nodes have been created that control permissions on a number of objects. These nodes are set in the standard permissions.yml file that Bukkit uses:

    A full list of permission nodes can be found at https://github.com/taufiqkh/Incraftible/wiki/Permissions.

    As an example, the following will create a permission node that disallows all tools greater than stone and all armor greater than leather:
    Code:
    incraftible.restrict.tools:
        description: Restrict to basic tools and armor.
        default: true
        children:
            incraftible.craft.tools.iron.*: false
            incraftible.craft.tools.gold.*: false
            incraftible.craft.tools.diamond.*: false
            incraftible.craft.armor.iron.*: false
            incraftible.craft.armor.gold.*: false
            incraftible.craft.armor.diamond.*: false
    Configuration of the plugin itself is via plugins/Incraftible/config.yml. Default behaviour is controlled by setting craft.default, which accepts the following values:
    • none disallow all crafting by default, using permissions to allow specific objects
    • all allow all crafting by default, using permissions to disallow specific objects
    The disallow message is configurable:

    Code:
    messages:
        disallowed: "You are not allowed to craft %s"
    Changelog:

    0.10
    Older versions (open)

    0.9
    0.8
    0.7
    0.6:
    0.5:
    0.4:


    Todo:
    • Add control over remaining material data values.
    • Add material bundle entries for data values.
    • Investigate difficulty of adding control to furnace events.
    • Add more meaningful headers for config files.
    • Add support for purely id-based permissions.
    * Just the one, for now.
     
    fluxboy8 likes this.
  2. Offline

    jesuswald

    Thank you for developing this!

    It is a great help to us, as it has gone a long way towards allowing a whitelist-free ranking system!
    People can join our server to see what it's like, but are not given a free hand with the more destructive tools, weapons and items.

    It's also great that is supports such fine-grained permissions settings, as I know that competing no-crafting plugins do not. Really helps with integration.
     
  3. Offline

    Taranis01

    im still not sure where i could use this features but i will watch Incraftible because it is great :)
     
  4. Wow, sounds great!
    Tried it with CraftGroup, but we had some problems with it. I will test yours! :)
    But please ... add data-values!
     
  5. Offline

    taufiqkh

    Data values - do you mean using permissions such as incraftible.craft.22 to craft lapis blocks, for example?
     
  6. Offline

    Kainzo

    Gotta love the idea of this :) thanks for doing the hard work.
     
  7. No, it's ok with the name of the blocks, i mean 351:1 - 351:2 - 351:x - 351:15 and so on.
     
  8. Offline

    taufiqkh

    Right, i get you. Seeing as existing permissions are by name, for enumerated materials like dye and wood wouldn't it be more consistent to use the data names? Eg. incraftible.craft.dye.white, incraftible.craft.log.birch.

    I've been looking at supporting item ids as well, but with bukkit's current implementation of permissions it's difficult to define a permission that is effectively an alias of another (correct me if I'm wrong - I'm still learning the API). It is possible and perhaps not too hard to support both but not at the same time, so I'd rather go all ids or all names but maybe this can be something I can make configurable in the config.yml.
     
  9. Offline

    Haekon

    Nice. Good way to stop abuse of pistons without removing them from the game.

    What's the Spout feature? OP doesn't mention anything, other than that it's comptible. Does it move the message to an achievement styled thing?
     
  10. Offline

    taufiqkh

    Spout is used purely for its inventory crafting events - made for a fairly straightforward listener. If Bukkit adds something equivalent in functionality I'll switch to that. At some point I might be able to do it myself but that'll need time.
     
  11. Offline

    Haekon

    Ahh. Well, since I'm knee-deep in Spout already (that sounds dirty...) this should make a nice addition.

    I'll give this a go in a little bit.

    At face value, looks like a really simple deal for restricting abusable items, but Heroes users that setup merchant classes should get all kinds of functionality out of this. Blacksmiths that level up from stone to diamond crafting, for example. Very nice.
     
  12. Offline

    taufiqkh

    Thanks - any feedback is helpful in directing development. So far I've found the biggest challenge is understanding permissions, especially properly inherited permissions. Finding the child/parent interactions a little unintuitive atm.
     
  13. Offline

    joby890

    i like this
     
  14. Offline

    alfskan

    needs spout client? and supports permissions 3.1.6?
     
  15. Offline

    taufiqkh

    Only needs spout server, not the client. Supports the build-in Bukkit permissions, not the Permissions plugin.
     
  16. Offline

    alfskan

    thank you! nice work!
     
  17. Offline

    piJoe

    that sounds frickin' great!
    now we can finally set professions.

    let's see if i'm smart enough to work with the permissions api,
    so that users have to learn different stuff (reading books or something) to get those permissions to craft.

    oh.. maybe you could add chances to it, so there's a small chance he/she crafts the item or not. like "oh.. it didn't work this time! try again!" or something :)
     
  18. Offline

    esret

    is this plugin compatable with permissions3.1.6 too?
     
  19. @taufiqkh

    Do you think, you can add permissione for break&place, too?
    crafting is great, if you add "break" & "place" of blocks, it will be perfect!
    (Ok, "use" will be the hit, but that's not important ^^)
     
  20. Offline

    Flenix


    I tried to find the answer myself but couldn't so sorry for asking, but:
    If I were to use this plugin with bukkit permissions, will my normal permissions plugin still work? My groups file for Permissions has over 800 nodes in, so its no question that I need it really, I've been avoiding using bukkit perms because noone seems to answer this question.

    I'm switching to incraftible from CraftGroup which did use normal perms. If you could let me know if its usable for me that'd be great :)
     
  21. Offline

    MarekZet

    Very nice :). BTW, can reduce the destruction of the blocks, placing them and the use of certain things, like blocking the destruction of moss?
     
  22. Offline

    Flenix

    +1 on Marek - CraftGroup had nodes for Use Break and Place too.


    Anyway, I went ahead and backed up, and tried what I said earlier. It DOES work, but seems a little random. My bukkit permissions are in the spoiler code below, but it doesn't seem to follow them much. For example one player can craft a workbench while another cant, for no apparent reason. (I was using that as a test item)

    I'm using the PermissionsBukkit plugin for my permissions here, and Permissions 3.1.7 everywhere else. The plugins don't seem to clash as I can reload both individually without any errors.

    Bukkit Permissions (open)
    Code:
    users:
        Flenix:
            permissions:
    permissions.example: true
            groups:
            - Blacksmith
            - Builder
            - Armourer
    groups:
        default:
            permissions:
                permissions.build: true
                incraftible.craft.stone: true
                incraftible.craft.wood: true
                incraftible.craft.workbench: false
        Blacksmith:
            permissions:
                incraftible.craft.dispenser: true
                incraftible.craft.note_block: true
                incraftible.craft.powered_rail: true
                incraftible.craft.detector_rail: true
                incraftible.craft.rails: true
                incraftible.craft.lever: true
                incraftible.craft.stone_plate: true
                incraftible.craft.wood_plate: true
                incraftible.craft.redstone_torch_on: true
                incraftible.craft.stone_button: true
                incraftible.craft.jukebox: true
                incraftible.craft.bucket: true
                incraftible.craft.minecart: true
                incraftible.craft.boat: true
                incraftible.craft.storage_minecart: true
                incraftible.craft.powered_minecart: true
                incraftible.craft.diode: true
            inheritance:
            - default
        Builder:
            permissions:
                incraftible.craft.stone: true
                incraftible.craft.wood: true
                incraftible.craft.glass: true
                incraftible.craft.sandstone: true
                incraftible.craft.step: true
                incraftible.craft.brick: true
                incraftible.craft.sponge: true
            inheritance:
            - default
        Armourer:
            permissions:
                incraftible.craft.stone_sword: true
                incraftible.craft.iron_sword: true
                incraftible.craft.gold_sword: true
                incraftible.craft.diamond_sword: true
                incraftible.craft.leather_helmet: true
                incraftible.craft.leather_chestplate: true
                incraftible.craft.leather_leggings: true
                incraftible.craft.leather_boots: true
                incraftible.craft.chainmail_helmet: true
                incraftible.craft.chainmail_chestplate: true
                incraftible.craft.chainmail_leggings: true
                incraftible.craft.chainmail_boots: true
                incraftible.craft.iron_helmet: true
                incraftible.craft.iron_chestplate: true
                incraftible.craft.iron_leggings: true
                incraftible.craft.iron_boots: true
                incraftible.craft.gold_helmet: true
                incraftible.craft.gold_chestplate: true
                incraftible.craft.gold_leggings: true
                incraftible.craft.gold_boots: true
                incraftible.craft.diamond_helmet: true
                incraftible.craft.diamond_chestplate: true
                incraftible.craft.diamond_leggings: true
                incraftible.craft.diamond_boots: true
                incraftible.craft.bow: true
                incraftible.craft.arrow: true
                incraftible.craft.tnt: true
            inheritance:
            - default
        CosmeticEngineer:
            permissions:
                incraftible.craft.lapiz_block: true
                incraftible.craft.bookshelf: true
                incraftible.craft.snow_block: true
                incraftible.craft.clay: true
                incraftible.craft.painting: true
                incraftible.craft.sign: true
                incraftible.craft.wood_door: true
                incraftible.craft.iron_door: true
                incraftible.craft.clay_brick: true
            inheritance:
            - default
        Chef:
            permissions:
                incraftible.craft.bowl: true
                incraftible.craft.mushroom_soup: true
                incraftible.craft.bread: true
                incraftible.craft.grilled_pork: true
                incraftible.craft.golden_apple: true
                incraftible.craft.cooked_fish: true
                incraftible.craft.sugar: true
                incraftible.craft.cookie: true
            inheritance:
            - default
        Farmer:
            permissions:
                incraftible.craft.jack_o_lantern: true
                incraftible.craft.paper: true
                incraftible.craft.book: true
                incraftible.craft.sugar: true
                incraftible.craft.map: true
                incraftible.craft.shears: true
            inheritance:
            - default
        Carpenter:
            permissions:
                incraftible.craft.wood_stairs: true
                incraftible.craft.chest: true
                incraftible.craft.workbench: true
                incraftible.craft.furnace: true
                incraftible.craft.ladder: true
                incraftible.craft.cobblestone_stairs: true
                incraftible.craft.fence: true
                incraftible.craft.bed: true
            inheritance:
            - default
        Toolsmith:
            permissions:
                incraftible.craft.wood_spade: true
                incraftible.craft.wood_pickaxe: true
                incraftible.craft.wood_axe: true
                incraftible.craft.stone_spade: true
                incraftible.craft.stone_pickaxe: true
                incraftible.craft.stone_axe: true
                incraftible.craft.diamond_spade: true
                incraftible.craft.diamond_pickaxe: true
                incraftible.craft.diamond_axe: true
                incraftible.craft.gold_spade: true
                incraftible.craft.gold_pickaxe: true
                incraftible.craft.gold_axe: true
                incraftible.craft.iron_spade: true
                incraftible.craft.iron_pickaxe: true
                incraftible.craft.iron_axe: true
                incraftible.craft.wood_hoe: true
                incraftible.craft.stone_hoe: true
                incraftible.craft.iron_hoe: true
                incraftible.craft.diamond_hoe: true
                incraftible.craft.gold_hoe: true
                incraftible.craft.flint_and_steel: true
                incraftible.craft.compass: true
                incraftible.craft.fishing_rod: true
                incraftible.craft.watch: true
                incraftible.craft.map: true
                incraftible.craft.shears: true
            inheritance:
            - default
    messages:
        build: '&cYou do not have permission to build here.'
    [/spoiler]
     
  23. Offline

    taufiqkh

    @MarekZet
    I'll have to think about break and place... there are other plugins that cover this functionality, and I'd prefer to keep this one minimal if possible. On our server we use WorldGuard to do that, but I understand that that may be overkill for others.

    @Flenix

    I've found Bukkit permissions to be the biggest headache in implementing this plugin. It seems to be non-deterministic when a user is a member of a number of different roles with overlapping permissions. Are you having issues with the Carpenter group? If a user is a member of a group, they should not be a member of default as well, since this should be inherited from the group instead. The way I understand it is (someone more familiar with Superperms please correct me if I'm wrong), with your current config what can end up happening is:

    Give me all the groups of which Bob is directly a member:
    Code:
    default, Carpenter
    Give me all the permissions for these groups:
    Code:
    incraftible.craft.workbench: true (from Carpenter)
    incraftible.craft.workbench: false (from default)
    etc.
    So incraftible.craft.workbench has false and true entries and sometimes the first will be set, sometimes the second.

    Let me know if removing default from the users fixes the problem. If not I'll take a second look.
     
  24. Offline

    MarekZet

    The problem is that in Worldguard be impossible to determine the groups and their limitations. Yes, you can reduce, but they apply to all and not one of the groups. Do you know of a plugin that allows you to limit the destruction of certain groups of selected blocks, etc.?
     
  25. Offline

    Flenix


    Na, like I said that was the entire config including users - right now everyone is default in bukkit's permissions...

    So if you hate superperms too, why not support the Permissions plugin instead/too? :)
     
  26. Offline

    taufiqkh

    Re WorldGuard - thanks for the clarification; while we use it ourselves I've never actually configured it. Good question about other plugins. I have seen several older ones (CraftGroup and CustomBlockRestriction) but none appear to have been updated recently. I don't really want to add significant functionality that I don't use myself as it makes testing more time-consuming. Unfortunately the biggest factor for me is time - as I work full-time I don't think be able to maintain it too well, sorry.

    Once I've finished adding material data nodes I can possibly refactor it into a library that can be shared with other material/block permission plugins if the authors are interested, or if someone wants to use it to resurrect CraftGroup.

    Well, hate is a strong word.. what I do like is that in theory, all you have to do is call hasPermission() to see whether or not someone has permission to do something. In theory. What I find confusing is how inheritance is handled, and I was disappointed that it didn't have in-built group support either.

    Not sure about your config. I haven't been able to replicate it myself - removed myself from the users list and it always prevents me from crafting the workbench. What version of Incraftible and Spout, and what other plugins are installed?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  27. Offline

    MarekZet

    Thank you for submitting your plugin CustomBlockRestriction. It remains only plugin, which blocked to USE some elements, such as diamond pick.
     
  28. Offline

    taufiqkh

    No, that's not actually my plugin. I only referred to it as a complementary plugin that does block restriction. Sorry for any misunderstanding.
     
  29. Offline

    MarekZet

    And do you know of a plugin, which allowed to block the use of objects, such as getting to minecart?
     
  30. Offline

    taufiqkh

    I'm afraid not, no.
     

Share This Page