[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. Nope. They just show up if i cklick on them....
    But thanks for fast response :D
     
  3. @EchoOfTime I have this problem too. It wired because it works if i configure tooManyItems to use the /item command! But i want to use this plugin so i can limit item for some users!
     
  4. I tried to configure my TMI settings.
    But when I change the command from /item to /gme and try to use TMI it say: No matching item found
    I've done my best to help me by myself :D
     
  5. Offline

    ltguide

    Version 0.7
    • added configurable updateInventory() for client mod fix
    • updated Register support (iConomy 6, MultiCurrency, BOSE7)
    • fixed cost message showing previous balance
    @Martin-zz @EchoOfTime

    I added information to the OP about setting it up.
    Show Spoiler
    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.

    So to your config.yml, add updateinventory: ['yourplayername']

    In TooManyItems.txt, I tested it with give-command:/gme {1}:{3} {2}
     
  6. I do all like that and they still won't show up. Even when I close and open my inventory again.
     
  7. @Itguide That's great, i just tested it! And it works like a charm. You are awesome, keep up the great work! One question how do i specify multiple playsers? Like this: [palyer1, player2] ??
     
  8. Offline

    ltguide

    @Martin-zz Yeah, that would work :0

    @EchoOfTime I'm pretty sure it is case-sensitive. Other than that, I'm not sure why it wouldn't work for you.
     
  9. @ltguide
    I think I don't configure the yml. in the right way. Could you explain where I exactly put the ''updateinventory line''
    in. Or could anyone upload the .yml file?
     
  10. Offline

    ltguide

    Take a look at the Configuration spoiler in the OP. Your config should look like that.
     
  11. Offline

    briankdk

    dosent work with TooManyItems ;-(
     
  12. Offline

    ltguide

    Did you upgrade to 0.7 and add your player name to the config?
     
  13. Offline

    briankdk

    i just downloaded it from this page, so im guessing it must be the newest ?

    Im a admin so i have '*' permissions.

    It works..... it just dosent add the items before i mouse lick somewhere in inventory.
     
  14. Offline

    ltguide

    You have to add your name to the config. It is explained in the OP in the configuration spoiler. Items will appear immediately then :0
     
  15. Offline

    briankdk

    so if i want to add 20 names to the YML (so toomanyitems workd) - how should they be separated ? (brian thomas jack or brian, thomas, jack - or ???

    and...items are missing... like item 34 :-(

    i cant figure out how to add more names !

    updateinventory: [briankdk]

    i tryed : updateinventory: [briankdk, nicklasdk]
    i tryed: updateinventory: [briankdk] [nicklasdk]

    please help :-(

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

    ltguide

    If the majority of your users are using TooManyItems or you dont feel like adding 20 names, you can use
    updateinventory: ['*']

    Otherwise,
    updateinventory: ['player1','player2']
    It is recommended to surround the names with apostrophes just in case the yaml reader doesn't like any special characters, etc. Also, no spaces after comma.

    Placing 34 didn't work for me when I tested it, iirc. You can always add it to the config.
     
  17. Offline

    briankdk

    and its capital sencitive (nicklasDK) cant be nicklasdk - does it have to be like that ?

    And can i use *, so it refeshes inventory for all ? (because all players on my server is using Toomanyitems)

    Thank you !!!! Great service from you - thank you !!!

    how do i get those missing items to work ? (like nr. 34) ? (i dint understand your previous reply, sorry)

    its working with ['*'] thansk :)

    regarding to item 34 i did this:

    Piston:
    id: '33'
    Unknown:
    id: '34'
    Wool:
    id: '35'

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

    ltguide

    Yeah, it is currently case-sensitive. I thought about that after releasing. I'll change it in a future update.

    Sure, you can do
    updateinventory: ['*']
    but make sure you do that exactly or it will error.
     
  19. Offline

    briankdk

    Would i be possible to program it so that if a number shows up that is NOT in the list...it just take the number, and adds it and says ADDING "unknown"
     
  20. Offline

    ltguide

    Bad item ids will crash the client, so I don't think it is a good idea to let it blindly accept numbers.

    And what I meant about placing 34 not working... have you tried it yet? I gave myself it, but I can't put it on the ground :0 I think it is wrong in TooManyItems. Maybe the dev expected 34 to be a different item and not just a piece of a piston.
     
  21. Offline

    Skelly1996

    hi .. when i type in
    /gto
    it say's YOU DO NOT HAVE PERMISSION TO DO THIS

    Can u help me
     
  22. Offline

    ltguide

    What sort of permissions system are you using?

    None: Are you an op?
    Permissions 2/3: Have you added 'giveto.others' to yourself?
    PermissionsBukkit w/ SuperpermsBridge: Have you set 'superpermbrige.giveto.others' (or it might have to be 'superpermbridge.giveto') to true?
     
  23. Offline

    NikkyyyHD

    How do I make it so i can only give myself certain items?
     
  24. Offline

    ltguide

    Can you give me an example of what you mean? You can currently restrict certain items.
     
  25. Offline

    NikkyyyHD

    I think I've sorted it out now, I wanted to make it so a group like Architect can spawn the normal items like wood, dirt ect. and cannot spawn items like Diamonds
     
  26. Offline

    ArtooHD

    Does this work with 1.8.1? If not will it ever?
     
    MationMac likes this.
  27. Offline

    ltguide

    Yes it does. I'll be adding the new items sometime soon. In the meantime you can easily add them to your config.yml. You can find the ids in the wiki.
     
    MationMac likes this.
  28. Offline

    MationMac

    Can't believe you actually answered that quickly!
    Good job.
     
  29. Offline

    ArtooHD

  30. Offline

    ltguide

    Do you have SuperpermsBridge as well? I am also using the 'dev' download of PermissionsBukkit.

    One of the changes I want to make before updating is having it fall back to superperms without needing the bridge.
     
  31. Offline

    ArtooHD

    No, Im just opening up my server again after a fairly long hiatus and before that I pretty much only used Permissions, so all off this is new to me. Should I use "SuperpermsBridge"?
     

Share This Page