Give To
GiveTo
Give Items (& Kits) w/ Permissions & Economy Support
Version: v0.8
CraftBukkit: 1597 (1337, 1240, 1185, 1060, 1000)
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
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)
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
Does this plugin work for 1.7.2? It won't load the files for my server.
This plugin will give hacked blocks?
Still works for 1.4.2
@Gunnerrrrr
Nop
@Physikbuddha
Enchantments anytime soon? lol
@asb1230
It's broken in 1.2.5? Strange... it's working fine on my server. Sorry, I will update it asap, probably Friday!
I'm not sure how to set the permissions to allow people to only spawn certain types of items. Is it giveto.item.stone or giveto.item.glass etc?
I would love to have this on my 1.2.5 server! Let's have an update eh?
1.2.4 update coming? Or does this still work?
@Zombiemold
Alright, I'll take a look to realize these features as soon as I'm back home, which is Tuesday evening.
I'm not sure if I understood 3), but I thought that you will get all items stacked.
/gme wood sword 64 will give you a stack of wooden swords, won't it?
EDIT: If you mean that you want to give a user 64 wooden swords in a kit (for example), that's no problem. The source code should be ready for that :D
@physikbuddha
I have a few small feature requests for you, if you have the time. As an avid user of your plugin, I have run into a few things that I would love to see support for.
1) Support for enchantments, multiple if possible would be absolutely amazing. I have donor kits that get enchanted items, and I normally do it all by hand. Having a config and using Giveto would be a huge help to me. Additionally, this would benefit anyone, as there are many uses to enchanted items.
2) Having the ability to specify a certain amount of items for a kit in one line, to keep the kit from getting freakishly long with lots of items.
3) To have items in a kit that are stacked, that normally are not stack-able. This would easily be done in conjunction with the above suggestion. Just using commands like "/i 268" gives you a stacked set of wooden swords, so it would seem MC/Bukkit supports it by default.
Anyway, keep up the good work, big fan of your plugin.
@AS1LV3RN1NJA
Yup, as already told in the original plugin forum, this was fixed in 0.9.2 :)
@Physikbuddha
Any chance of re-adding Console commands?
UPDATE GiveTo v0.9.2 (now with Vault support for economy plugins)
Fixed by me to work with latest CB #2034 (Beta Build MC 1.2.3)
Download JAR
Old link, just for safety, not available 24/7
Download Source
Old link, just for safety, not available 24/7
Changelog:
Version 0.9.2
- FIX: Re-added support for the /gto command from the console.
Version 0.9.1
- FIX: Reload-command didn't reload the config.yml from the disc
- FIX: Reload-command wasn't accessible from the console
- Updated config.yml to include all new blocks and items from MC 1.2 (you'll have to rename your existing config.yml in order to let GiveTo create the new one)
Version 0.9
- Economy-API changed from Register to Vault
- Uses new config- and event-system
- Code cleanup
- Compiled against CB #2034
- Added new items (Thanks to jsschmitt and Darth009)
@ltguide Hello I seem to be having some issues with this plugins whenever one of my vips tries to use a kit they have no permission If it is of any help I use permissionsEx.
Any way to specify the amount for one item in a kit? I am putting together a kit for newbies, and I want to give them 1 of several things, and a few of others.
Additionally, is there any way for people to be automatically given a kit if moved to a rank? This might be a stretch, but it would be amazing.
@fernferret
Thanks :) MV2 is amazing too
@ltguide
Just wanted to say thank you for an awesome plugin. It's part of my "replace essentials" package :D
-FF
THANK YOU!!!!
@Eymberness
I finally updated. Enjoy :)