[ADMN] GiveTo v0.8 - Give Items / Kits to Others or Self, Permissions/Economy - /gto | /gme [1597]

Discussion in 'Inactive/Unsupported Plugins' started by ltguide, Mar 29, 2011.

  1. Offline

    ltguide

    GiveTo - Give Items (& Kits) to Others or Self, Permissions/Economy Support
    Version: v0.8
    CraftBukkit: 1000, 1060, 1185, 1240, 1337

    GiveTo is an easy way to give items to other players or yourself. Using Permissions or EssentialsGroupManager (w/ EssentialsGroupBridge) allows fine administrative control. GiveTo supports iConomy 4/5/6, BOSEconomy 7, MultiCurrency, and Essentials Economy via Register.

    You can give an item by ID or NAME. If no item matches directly, GiveTo attempts to search for a matching item. If there is more than one result, you are presented a list of matches.

    You can also specify an amount to give. Each item can have its own default and max amounts. Or GiveTo will use the global amounts configured.

    Features:
    • Item ID or Name with searching & results
    • Global/Item-specific default and max amounts
    • Global/Item-specific costs
    • Global/Item-specific delays (cooldown)
    • Quick self-give command
    • Items can have multiple aliases and also act as a kit
    • Customizable messages
    • Configurable command names (with plugin.yml change)
    • Permissions Support (else OPs): command use, reload, specific items/kits, delay/cost exemptions
    Commands:

    GiveTo adds two commands: /giveto (/gto /give) and /giveme (/gme). Both accept "reload" as the first argument to trigger a reload of the config.yml. /gto has full functionality from the console.
    • /gto <player> <item> [count]
    • /gme <item> [count]
    The player can be a player name or "me." As long as there is only one match, you can enter part of a player name. Entering /gto ltg ... will give items to "ltguide."


    The item can be an ID number or text that includes spaces or * as a wildcard. For example, assume you have two items: cobblestone and cobblestone stairs. Entering /gme co st 3 will display the two items. However, /gme co sta 3 will give you 3 cobblestone stairs. You could also use c a, but it actually matching would depend on what other items you have added.

    You can also specify a "durability" that will override the one set in config. For example, /gme sapling:1 will give you a Spruce Sapling. This is useful for Maps since there are too many to conveniently list in the config.

    If you want to change the commands, then you need to change them in plugin.yml inside the .jar. (7-zip: open jar, right-click plugin.yml, "Edit")

    Configuration
    Show Spoiler
    Code:
    count:
        max: 512
        def: 64
    delay: 0
    cost: 0
    updateinventory: ['someclientmoduser','anothersuchuser']
    messages:
        arglength: '&5Syntax: &f%s'
        permission: '&cYou do not have permission.'
    items:
        stone:
            alias: rock
            id: '1'
        kit:
            def: 1
            max: 1
            permission: beginnerset
            delay: 600
            cost: 5
            id:
            - '276'
            - '277'
            - '278'
            - '279'
            - '259'
            - '288'
    
    That is a sample configuration. The full config.yml will be created in the plugins/GiveTo folder when you start the server. You can also download the full config.yml below. YML files requires spaces instead of tabs and the level of indention matters.

    Count:
    If no amount is specified to /gto or /gme then the "def" value is used. The "max" value is the maximum amount that can be given per item.

    Delay:
    If no delay (cooldown) is specified in the item, then the global delay is used. The delay on a specific item can be less than the global.

    Cost:
    If a cost is specified in the config, then Register.jar will be created in the lib/ folder when you start the server. You will need to reload/restart the server or no money will be deducted from a player's account. The cost on a specific item can be less than the global.

    Update Inventory:
    Client mods for inventory (TooManyItems) require updateInventory() to visually update. However, this API method is deprecated so it shouldn't be used because a future update may remove it. Using this call resends the entire inventory to the player, so it requires more bandwidth from the server. By default the GiveTo plugin will not use it, but it can be enabled for certain users or globally with '*' if a lot of users request it.

    Messages:
    You can use Color Codes to control the colors in messages. You can flip the order of replacements by using %2$s and %1$s instead of %s. You don't have to use every replacement either, i.e. not showing balance.

    Items:
    item name - can contain spaces, i.e. glowstone block
    • id - required - ID as string: '1' or ID as string list: ['276','277'] (or in long form; see above config); for durability values use a colon: '35:4'
    • alias - optional - another common name, i.e. netherstone for netherrack (can also be a list, see 'id' above)
    • def - optional - default amount
    • max - optional - maximum amount
    • delay - optional - delay seconds before giving item again(cooldown)
    • cost - optional - money amount
    • permission - optional - if specified, the user needs to have giveto.item.PERMISSION to give
    Permissions:
    • giveto.others - /gto
    • giveto.self - /gme
    • giveto.reload - /g* reload
    • giveto.item.PERMISSION - required if you set an item specific permission
    • giveto.exempt.delay - exempt from delay period
    • giveto.exempt.cost - exempt from cost (all items FREE)
    You can assign the same permission to multiple items (i.e., permission: builder) then assign a user or group 'giveto.item.builder' It's probably a good idea to add a permission to lava, bedrock, etc.

    If any Permissions-like plugins are not available then Bukkit Permissions (SuperPerms) is used which, by default, will grant all access to OPs only.


    Download GiveTo Plugin (Static)
    Download GiveTo Plugin (version in filename)
    View Full Items List
    Source Code

    Changelog:
    Version 0.8
    • added new items
    • updated Register support (no longer needed in /lib)
    • uses Bukkit Permissions (SuperPerms) if no Permissions-like plugin
    Version 0.7
    • added configurable updateInventory() for client mod fix
    • updated Register support (iConomy 6, MultiCurrency, BOSE7)
    • fix cost message showing previous balance
    Version 0.62
    • add new items
    Version 0.61
    • remove need for utf-8 encoded config.yml (now uses & for color instead of unicode)
    • updated economy support
    • fix default durability (fixes unable to craft with some spawned items)
    • fix name lookup with specified durability (yellow wool:5 is really Light Green Wool)
    Show Spoiler
    Version 0.6
    • customizable messages
    Version 0.5
    • able to specify custom durability on item (map:2)
    • economy support (cost)
    • delay periods/cooldown (delay)
    • permissions for cost/delay exemptions
    • multiple aliases per item
    Version 0.4
    • properly use command aliases in plugin.yml
    • remove unnecessary if from onCommand
    • override /give
    • inventory full message
    Version 0.3
    • No longer requires target as exact player name, will search
    Version 0.2
    • Displays loaded items onEnable and reload
    • Minor cleanup from pre-release
    Version 0.1
    • Initial release
     
    ElectrON and AS1LV3RN1NJA like this.
  2. Offline

    Plague

    Please update to latest RB and I'll move this to release then.

    Just a side not (not required), maybe hide some of the post into "spoiler" tags to make it shorter on the first look. Or not ;)
     
  3. Offline

    ltguide

    Sorry, I can't seem to load the Submission Guidelines. I couldn't remember if the [CBversion] in the title was supposed to be the minimum or recommended.

    Hopefully the OP is a bit cleaner looking now as well.
     
  4. Offline

    Plague

  5. Offline

    ltguide

    The sticky'd Submission Guidelines in the Plugin Submissions category is not working (the one i linked above). However, the one in Plugin Releases does work. I tried it in IE as well, so it doesn't seem like it should be just me.
     
  6. Offline

    Andrew0085

    Wait, I'm confused, does this work for #556 or not?

    Also, will I have to put every single item in the game into the configuration file? I can see "stone" in the spoiler, but will all the other items be there as well?
    Edit: Just saw the link for the full configuration, never mind about this

    One more thing(sorry for multiple posts), can I set the same custom permission for multiple items? i.e.have the permission for stone be "adminonly" and have the permission for cobblestone also be "adminonly", the give a group 'giveto.item.adminonly' and have only that group be able to spawn stone and cobblestone?

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

    ltguide

    Yes, it does work with 556. I've noted that in the OP and also added a link to a full config.yml.

    Permissions should work exactly as you describe :)
     
  8. Offline

    Andrew0085

    OK, I got everything working right with no errors. Thanks so much, this was EXACTLY what i was looking for. One suggestion though, you should add the damage value items to the complete config.yml, like this: (it's in txt format because apparently .yml isn't under the "all files" group)
     

    Attached Files:

  9. Offline

    ltguide

    Oops, I added the damage value items to my own config, but forgot to add them to the one to be uploaded. I switched out the download link for the one including colors, different wood types, etc.
     
  10. Offline

    bloodmark3

    Every item I try to put in, it says no matching items. Ive tried:
    /gme Rose
    /gme co sta 3
    /gme cobblestone 1
    None of em work >.<
     
  11. Offline

    ltguide

    Did you edit plugins/GiveTo/config.yml while the server was running? If so, "/gme reload"

    Did the console say anything about errors in the config file?

    Which CB version are you using?
     
  12. Offline

    bloodmark3

    No.
    No.
    And Bukkit #605 (1.4)
     
  13. Offline

    ltguide

    /gme co sta 3
    It's working for me on #605
    There's got to be an issue with either another plugin or your config.

    Show Spoiler
    20:11:58 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-606-g6e629e6-b605jnks (MC: 1.4)
    20:11:58 [INFO] Preparing level "world"
    20:11:58 [INFO] Preparing start region
    20:11:58 [INFO] 144 recipes
    20:11:58 [INFO] Invalid config file found and converted to proper name/format.
    20:11:58 [INFO] [Permissions] (Phoenix) was Initialized.
    20:11:58 [INFO] [GiveTo] v0.1 enabled
    20:11:58 [INFO] [NewList] v0.1 enabled
    20:11:58 [INFO] [NoMoreSlimes] v0.1 enabled
    20:11:58 [INFO] [Permissions] version [2.5.5] (Phoenix) loaded
    20:11:58 [INFO] Done (0.074s)! For help, type "help" or "?"
    20:13:29 [INFO] ltguide [/127.0.0.1:55597] logged in with entity id 94
    >gme reload <<<<I copied config.yml from link above.
    20:16:24 [INFO] Reloaded items.
    20:16:42 [INFO] Loaded world: world
    20:16:42 [INFO] [GiveTo] ->ltguide Placing 'Stone' in your inventory.
    20:17:20 [INFO] [GiveTo] ->ltguide Placing 'Cobblestone Stairs' in your inventory.
    >


    Can anyone else confirm it working with 605 or higher?
     
  14. Offline

    bloodmark3

    Nevermind i fixed it. I never grabbed the full config file xD.
    Ty for the help though.
     
  15. Offline

    ltguide

    Not a required upgrade, but 0.2 adds this:
    21:01:01 [INFO] [GiveTo] v0.2 enabled (loaded items: 219)
    and the same for /g* reload

    Maybe it'll help some :)
     
  16. Offline

    ltguide

    Version 0.3
    • No longer requires target as exact player name, will search
    For example, /gto ltg stone or /gto g stone would give me some stone. Assuming, of course, that there are no other players with 'ltg' or a 'g' in their name. You'll get a message back if more than one player matches.
     
  17. Offline

    mfnalex

    when i change the commandname (like from gme to g or giveme) it does not work, it just says "command not found". And yes, I restarted the server.

    CB is 617.
     
  18. Offline

    ltguide

    It's a two step process for changing the command name. You also have to edit plugin.yml which is inside GiveTo.jar. I use 7-zip. You open the jar, right-click plugin.yml, and choose Edit. Once you close the file, 7-zip prompts you to resave the .jar with your changes. Then reload server.
     
  19. Offline

    mikitymike

    How do I use the giveto.item.PERMISSIONS? I used the kit in the included full config.yml, and gave myself - 'giveto.item.beginnerset' and I cannot use /gme or /gto because I do not have permission. If i give myself -'giveto.item.beginnerset' and - 'giveto.self', I can give myself ANY item, even though there are only 6 items in the "beginnerset" permission. Is there a way to block a few items, but allow all others?
     
  20. Offline

    ltguide

    You can add "permission: admins" to each item that you want to restrict (tnt, bedrock, lava, etc). Then give admins access to "giveto.self" and "giveto.item.admins". Everyone else just needs "giveto.self" and they will not be able to give themselve the restricted items.

    You could also give each restricted item their own permission label so you could control what specific user/group could use them. Like giving miners and admins access to "giveto.item.tnt"
     
  21. Offline

    evanlividicus

    Okay so i must be noob. How do i put all the config into my config.yml?
     
  22. Offline

    ltguide

    Do you mean how do you edit a yml file or are you not sure what to change inside of it exactly? yml files are particular about proper indention by the spacebar not tab like many editors will automatically add for you.

    Either way, just let me know which problem you are having exactly and I'll do my best to help you.
     
  23. Offline

    rellish

    Plugin works flawlessly for me atm, thanks for the great work!
     
  24. Offline

    rusins

    What is the easiest way I can set this up for everybody in my server? (Not making them op.)
     
  25. Offline

    ltguide

    Download the full config.yml from the second link and put it in plugins/GiveTo. Then give a group permission to 'giveto.self' and 'giveto.others'

    If you don't have Permissions, I could always make another jar with the permissions code stripped. But a lot of other useful plugins will only work with Permissions.
     
  26. Offline

    rusins

    Thanks! Awsome plugin by the way, it's the best!
     
  27. Offline

    Martin-zz

    Hey thanks for the great plugin. :) Is it compatible with the new 733 update? Do i just put in the new item values in the config file or is there more to it?
     
  28. Offline

    ltguide

    Works perfectly in 733, but I made some minor changes, so:

    Version 0.4
    • properly use command aliases in plugin.yml
    • remove unnecessary if from onCommand
    • override /give
    • inventory full message
    If you prefer /give stay vanilla just change it in plugin.yml.

    Also, added new items to full config.yml:
    Show Spoiler
    Code:
        Spruce Sapling:
            id: '6:1'
        Birch Sapling:
            id: '6:2'
        Powered Rail:
            id: '27'
        Detector Rail:
            id: '28'
        Web:
            id: '30'
        Cookie:
            id: '357'
    
     
  29. Offline

    Clutchsky

    im getting errors for Spruce and birch wood, anyway to fix this?
     
  30. Offline

    johnm117

    hey every time i type /gme dirty [25] it keeps telling me "you do not have permission" what do i do Please help me!
     

Share This Page