[GEN] GiveIt V1.3 A "give" item plugin with more control [1240]

Discussion in 'Inactive/Unsupported Plugins' started by cian1500ww, Feb 5, 2011.

  1. Offline

    cian1500ww

    GiveIt - A "give" item plugin with more control [1240]
    Version: 1.3

    The idea behind this plugin is to allow players to use a special command called "/giveme" which can be controlled.

    By controlled, I mean that the server admin can only allow certain items with a max amount to be given. That way, you won't have players building giant gold structures unless you'd like them to ;)

    You can also restrict an item to a single player for those extra special projects.

    Players are able to see what items are available ingame.

    Players that are added to the mods.txt file, will have the ability to add and remove items from the allowed.txt file ingame.

    They will also have the ability to give other players items.

    The usernames of players that are listed in the blocked.txt file will not be able to use the /giveme command.

    I've been using GiveIt for a while on my server to see how well it worked and so far it's been working quite well so I've decided to release it and share the source code.

    This is my first plugin for CraftBukkit so do go easy on me :p

    Features:
    • Only allow specified items to be "given"
    • Restrict the amount that can be "given"
    • Restrict the giving of certain items to a single player
    • Full logging of every item requested by every player
    • Players can see what items are allowed ingame
    • Mods can add or remove items from the allowed list ingame
    • Certain players can be blocked from using the /giveme command
    • ItemId's don't need to be in the 3 digit format ie. 75 will work instead of 075
    • Support for Permissions plugin v2.5 (Permissions plugin is optional)
    [​IMG]


    [​IMG]

    [​IMG]

    Download:

    Download GiveIt v1.3 Plugin
    Source Code
    Hudson

    Installation Instructions:
    1. Download GiveIt using the link above and place it in your plugins folder
    2. Enable GiveIt by starting your server
    3. GiveIt will automatically create a directory called GiveIt in your plugins folder
    4. In the GiveIt folder there should be a file called allowed.txt
    5. Add a new item to the allowed.txt file by following this:
      1. ItemID=MaxAmount.username
      2. eg. 278=01.cian1500ww
      3. This command allows cian1500ww to give themselves one diamond pickaxe
      4. eg. 278=01
      5. This command allows any player to give themselves one diamond pickaxe
    6. Make sure that you only add one item per line.
    7. The plugin does NOT need to be reloaded after adding items to the allowed.txt file.
    8. Add the usernames of the players to mods.txt that you'd like to have access to the /givemeadd and /givemeremove commands. (Only if you are not using Permissions)
    9. Add the usernames of the players to blocked.txt that you would like to stop from using /giveme. (Only if you are not using Permissions)
    10. Reload the plugin after adding usernames to mods.txt or blocked.txt
    11. A log file called GiveIt.log will be created in the GiveIt folder after the plugins first use.
    Sample allowed.txt file:

    Code:
    #ItemID=Amount.username
    278=01
    052=01
    078=64
    079=64
    066=30
    074=32
    011=10.cian1500ww
    
    Usage Instructions:

    A player can give themselves an item by using the following command:


    Code:
    /giveme <itemid> <amount> <durability>
    Example:
    Code:
    /giveme 052 1
    Note: In version 1.3+, it's possible to /giveme and /giveto items with durability

    An important point to remember is that the item id must always be 3 digits so item 40 will be 040.No longer an issue in V1.2 :)

    If the player requests an item that isn't allowed, they will be notified. Also, if they request too many of one item, they will be asked to choose a lower amount.

    Players can see what items are available by using the following command:
    Code:
    /givemeinfo
    Players that are specified in the mods.txt file, can add items to the allowed.txt file with the following command:
    Code:
    /givemeadd <itemid> <quantiy> <username if required>
    Example:
    Code:
    /givemeadd 278 30 cian1500ww
    Example without username:
    Code:
    /givemeadd 278 30
    They can also remove items from the file using this command:
    Code:
    /givemeremove <itemid>
    Example:
    Code:
    /givemeremove 50
    The /giveto command allows players listed in the mods.txt file to give items in allowed.txt to other players. The command is as follows:
    Code:
    /giveto <playername> <item> <amount> <durability>
    Example:
    Code:
    /giveto cian1500ww 35 10 2
    Permissions Plugin Instructions:


    Add the following permission to the groups or users that you'd like to have access to the "/giveme" command:
    Code:
    giveit.allow

    All users will still have access to the "/givemeinfo" command.

    Add the following permission to the groups or users that you'd like to have access to the "/givemeadd" and "/givemeremove" command:
    Code:
    giveit.modify
    To give users access to the "/giveto" command:
    Code:
    giveit.to
    If you are using Permissions, the mods.txt and blocked.txt files will not be used but will still be generated.
    Changelog:

    Version 1.3:
    • Added support for CraftBukkit build 617
    • Added the /giveto command
    • Added support for durability so players can now set the durability of the item they are spawning
    • Fixed problems where players could give themselves more than the allowed amount
    • Fixed the example command being shown everytime /giveme was used
    • Tested with Permissions v2.5.5
    Version 1.2:
    • Added support for Permissions v2.5
    • Removed TSLPC
    • Added support for builds 254+
    • Ability to add items and remove items from the allowed.txt file ingame.
    • Added a blocked.txt file that will contain a list of usernames that aren't allowed to use the plugin
    • Allowed for the use of item ids that don't begin with 0 ie. 74 instead of 074
    • Allowed for the spawning of item quantities greater than 64
    Version 1.1:
    • Added support for Permissions plugin
    • Improved incorrect command checking
    • Split the code into separate classes and tidied it up a bit
    Version 1.0:

    • Initial Release
    Let me know of any problems here or feel free to drop me an email -> [email protected]


    If you have any ideas or feature requests, please do tell me and I'll do my best to implement them!!
     
  2. Offline

    efstajas

    Is this working properly with Build 860?
    And how can I allow every item at once?
     
  3. Offline

    Pablomittens

    Can you make it so you can add giveable blocks in permissions like 'GiveIt.Give.72' so you can make it so only certain groups could get certain items and also you could just add 'GiveIt.Give.*' so you can spawn everything. Tell me if there is another plugin that already does that or somthing but yea.
     
  4. Offline

    TD0615VFX

    do you know how this could be used with too many items? because when i change the config file to /giveme {1} {2} it doesnt give me the items untill i restart or somtimes it just randomly coems later so do you know how I could make it work with it?
     
  5. Offline

    KRFenigma

    Ok so i am on Bukkit RB 920, and i am getting this server error

    null
    org.bukkit.command.CommandException: Unhandled exception executing command 'giveme' in plugin GiveIt v1.3

    Do you know what this means and not wo fix it, please get back to me as I need to get it sorted out.

    This is the Allow text file, and every item has a 3 digit format, but still getting the error

    Show Spoiler
    #ItemID=Amount.username
    001=128
    002=1
    003=128
    004=128
    005=128
    012=128
    013=128
    017=128
    018=128
    020=128
    024=128
    035=128
    037=128
    038=128
    044=128
    045=128
    047=128
    048=128
    050=128
    053=128
    064=128
    085=128
    087=128
    088=128
    089=128
    260=5
    263=128
    265=128
    276=1
    277=1
    278=1
    279=1
    293=1
    322=1
    328=1
    331=128
    345=1
    352=128
    355=1
    357=128


    Thanks for looking.

    KRFenigma
     
  6. Try making those '1's into double digit numbers that's the way I have it set up and it's working with 920. Worth a try.

    002=1 - 002=01
     
  7. Offline

    KRFenigma

    Hi thanks for the tip ill give it ago
     
  8. Offline

    wick3d

    Is the Filehoster down?
     
  9. Offline

    cian1500ww

    There's an alternative mirror available here
     
  10. Offline

    KRFenigma

    So i have tried to change the setting like you said to try 002=1 - 002=01 and im still getting the same error, im guessing the plugin is not getting updated, so ill look for a new one to use, but thanks for your help with this :)
     
  11. Offline

    raoulster

    Is there any way i can make it so that i can let some people get infinite items? Like in the Allowed.txt i can put:
    All=Infinite.PlayerName I would Be Very Very Gratefull If there was a way I could do that :) If there isnt a way of doing it, could u add it to the actual plugin. Thank you. If you have a donation thing set up, i would be prepared to donate atleast £10 :)
     
  12. Offline

    np98765

    The link is broken..


    Also, just assuming from what you wrote... Can't they spawn the number of items over and over again? If there isn't one, can you add a time-limit on there?
     
  13. As long as your cmd window logs player issued commands you can see who is abusing the giveme command. A cooldown would be nice but not needed. Anyway /giveme is a secret command I only let trusted users know about if they want to abuse it's up to them :D
     
  14. Offline

    Wiinick

    used it...didnt work, no matter what i changed, /i wouldnt work.

    lol wrong post

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

    cian1500ww

    Plugin is confirmed working with CB #1240
     
  16. Offline

    michaelc2528

    @cian1500ww could you include a text file with every item allowed so i dont need to do it plox would help loads or someone who has upload it ?
     
  17. Here's mine, it's not exactly what you're asking for but the way I have it set up its pretty hard to abuse.
    The way its currently set up is for block building exclusively, and a few other likes like cook ham are allowed.
    Things like ore, ore blocks, diamond block, armor, weapons and so on are blocked.

    In short, most raw materials available. I'm weird and still prefer to take my blocks and craft them into stairs rather than spawning ex: id 44

    Edit to your liking. It's a good place to start off from.

    http://dl.dropbox.com/u/29091586/giveit/GiveIt.rar
     

Share This Page