[GEN] GiftSend - 1.23 - Give a friend something from your inventory [740]

Discussion in 'Inactive/Unsupported Plugins' started by lonelydime, Mar 2, 2011.

  1. Offline

    lonelydime

    GiftSend

    Version: v1.22

    This plugin lets you give an item to your friends instead of /give. This allows you to give your players the option of giving a friend an item they need without allowing them access to /give or /item. It makes sure that items aren't just generated on your server, they're at least earned.

    Features:
    • /gift <player name> <item amount> <item id or name>
    • /send <player name> <item amount> <item id or name>
    Quick Links
    Install
    • Upload the SendGift.jar file into your plugins directory.
    • If you are using permissions or groupmanager, use sendgift.send to allow other groups/players to use it.
    Todo:
    • Make colored wool transferable.
    Changelog:
    Version 1.23
    • Fixed the durability exploit
    Version 1.22
    • Fixed a bug where if they receiving person does not have slot 0 filled, it won't send to them.
    Version 1.21
    • Replaced depreciated methods to work with 602.
    Version 1.2
    • Allowed turning offline transfers on and off.
    • Added max radius to send (0 for no radius)
    • Allowed sending items without having to be in exact stacks.
    Version 1.1
    • Allows the item name to be passed in as well as the item id (2 words allowed. Ex: diamond pickaxe)
    • Added ability to send offline users items.
    • Added error message if sending to someone who's inventory is full.
    • Minor code cleanup
    Version 1.0
    • Public Release
     
    Wakko likes this.
  2. Offline

    Juze

    Nice plugin, going to be useful. Maybe add gifting offline players, and maybe with a custom message?
     
  3. Offline

    Pencil

    Sounds cool, would it be possible to add a certain max, range they can send gifts? Also, does it have to be the item ID or can it be the item name?
     
    Pulec likes this.
  4. Offline

    lonelydime

    You mean a certain amount of times within a time period they're allowed to send people things?

    Right now it has to be an item id, I can make it so it can accept both like ItemId does.
     
  5. Offline

    hyoa

    I have a problem, i'm adminand i can use the command but the other can't, why?
     
  6. Offline

    lonelydime

    You may have permissions/groupmanager not set to allow other users to use the command. Try setting sendgift.send, sorry I forgot to mention that in the description.
     
  7. Offline

    Pulec

    +1
    On my server there is no iEconomy and people just exchange stuff for prices they decide, but they always need to meet at some place and then use inventory and mouse. Few players would appreciate using gift command, if I will remind them how to do often, but most of them dont know item ID, even item name could be a bit tricky, especially if when we are czech and slovaks players and are used to call items our own names. But it MUST be in some maximal range, at least 50 blocks. Otherwise the fun part of getting to meeting point would be lost, and that would be very bad and cheaty!

    To items name, it would be very good if it would use configurable items like HeroicDeath does.
    file plugins/HeroicDeath/heroicdeath.items
    Code:
    #This file contains custom names for the item a PvP killer is holding
    #The names here will be replaced in the %i marker for PvP deaths
    #File Usage:
    #NAME:ID:(optional)DATA
    #The DATA parameter is optional, and refers to materials with multiple states
    #Such as colored dyes and wool.
    #Item IDs and data values may be found on the Minecraft Wiki
    #If a mapping is not provided for an item in this file, a default name will be used automatically.
    pesti:0:-0x1
    stone:1
    grass:2
    dirt:3
    cobblestone:4
    
    For explanation pesti means fists, but thats not important. We could set our own czech and slovak names for items and people would use /gift Player vlna 10.
    Vlna means wool. And etc, of course they could all learn original english proper names, but most of them dont need that.
    Does it support /gift player 35:blue 1 for colors of wool?
     
  8. Offline

    jascotty2

    i don't think so :(
    i've tried a few color combinations, and none seem to work (get help message)
    also, if you try to send colored wool, the color is lost & they receive white wool

    also, while testing, i got the error stated above that after a few gifts, it quits working & only shows the help message
    the first i got the error was after trying to gift a used pickaxe

    i also agree that should add the ability to type a name instead of an id
    for instance, "mossstone" == "mosstone" = 48
    "stonepickaxe" == "stonepick" == 274
    (and maintain damage values)

    haven't tested against this yet, but if it's not there, another to add: (configurable?)
    if the target's inventory is full, either display a message "tried to send"/"failed to send" or drop the item in front of the target player (like give does)

    if you add gifting to offline users, the first option would be one to use
     
  9. Offline

    TechManDylan

    Oh sweet you made it thanks a million. I have been watching for this.
     
  10. Offline

    lonelydime

    I'll have to play around with the colored wool, since it looks like it shares the id with regular wool I overlooked that.

    When it stops working, did you get an error message in the log? Or did it just return the command use text.

    I'll work in the inventory full message if it doesn't already fail over.
     
  11. Offline

    jascotty2

    sorry, forgot to check [​IMG]

    when trying a string:
    (but you said you'll work on that already)

    however, no error messages from the other error..
    even stranger: i reset the server, and still getting the help message, even when i give it the correct parameter syntax
     
  12. Offline

    lonelydime

    I listened to your requests and made changes to the plugin.

    You can now send offline users items.
    You can enter in the item names as well as ids.
    You can't send items to someone who's inventory is full and it will give you both a message to that effect.
    I added /send, /gift isn't my favorite but I left it in there for compatibility.

    Please note the change to the command line, item amount and item id have been reversed.

    I still need to look into the colored wool issue.

    Unless there is high demand for a configurable radius that the players have to be in to send to each other, I don't plan on adding that feature. I wanted this plugin to be a simple drag and drop and avoid config files because they can be messy.

    Also under the "won't unless there's high demand" list, configurable names for items. Right now I use the minecraft name for the item and allow spaces, so DIAMOND_PICKAXE can be diamond_pickaxe, diamond pickaxe or DiamONd_PickAXE. Adding those to a configuration file would be a pain and for most users I would see it as a hassle.
     
  13. Offline

    deadlycwa

    I'm just going to put in here that I'm part of the group who would appreciate the radius feature
     
  14. Offline

    Sc00by22

    It would be nice if you could send more than 64 of an item, having to retype it over and over can get annoying.
     
  15. Offline

    lonelydime

    I'm going to look into doing some more complex inventory math.
     
  16. Offline

    jascotty2

    while you're at that, you could also add "all" as a valid amount (send all that the user is holding)
     
  17. Offline

    Bilkokuya

    I'm on the same boat - a radius feature would be great.
     
  18. Offline

    lonelydime

    Added the radius feature.

    Keep in mind, if someone isn't in that radius and it won't send, all they have to do is log out and then send it. If you want this radius feature, you may want to turn off offline transfers.

    Also fixed inventories so you can send items in bulk (>64).

    Wool is a bukkit bug for now, it won't return the color it is. Always comes back as white. That'll get fixed when bukkit fixes the wool color bug.
     
  19. Offline

    xGhOsTkiLLeRx

    Hey,

    I can't send things, like a door or flint and steel.

    I type:

    /send <player> 1 irondoor
    But I get: 'You don't have this item with that amount'

    Can you fix this?
    (Maybe it's because the things aren't stackable?)

    Greets
     
  20. Offline

    lonelydime

    I'll check it out. Thanks for the report.
     
  21. Offline

    xGhOsTkiLLeRx

    Great :D
    If you need more information, tell me pls!
     
  22. Offline

    lonelydime

    Any errors in your console? I tried the following on my test server:
    Code:
    /send lonelydime 1 iron door
    /send lonelydime 1 iron_door
    /send lonelydime 1 flint_and_steel
    /send lonelydime 1 259
    
    All worked without problem.

    irondoor won't work because there's a space in the wording, minecraft sees the item as IRON_DOOR and I make it so that _ can be a space or a _, but not a blank.
     
  23. Offline

    Joeyy

    How about create an error message which says that the item the user typed in doesn't exist or is not spelled correctly.
     
  24. Offline

    lonelydime

    'You don't have this item with that amount'

    That's the error message ;)

    Or just 'The item '"+itemstring+"' does not exist.'
     
  25. Offline

    Joeyy

    Second one sounds more correct.
     
  26. Offline

    lonelydime

    They both exist, just for differing conditions.
     
  27. Offline

    xGhOsTkiLLeRx

    Hey,
    thanks for your reply - seems, to work now!

    Great :D

    Greets
     
  28. Offline

    xGhOsTkiLLeRx

    Hey,

    sometimes the "transport" doesn't work...
    I try to send for example 8 buckets to my friend, but the plugin says, he will receive them, when he logs in - but he is logged in!
    (Very worse, because this happens only sometimes, and last time with diamonds...)

    Hope you can fix this problem!

    Another problem: My friend can't send any items to me, if I have an empty inventory...

    Another problem: I send something, when my friend is offline, but he hasn't received any items...
     
  29. Offline

    Kevin Forte

    You know I have to ask; has this been tested on 600+ yet?
    Also, I get a message sometimes telling me the player is too far away. I don't know if you can do anything about that, but it certainly defeats the purpose a little, you know?
     
  30. Offline

    lonelydime

    Names are case sensitive. If you send something to Bob, it won't get to bob. Could that be your problem? I'll check the empty inventory bug.

    It has not been tested in 600+, I've been moving and such so I've been busy. I should be able to get it tested soon, sorry for the delay.

    1.21 is out, it loads fine in console now. The other bugs will be looked at once bukkit updates to MC1.4

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

Share This Page