Have you ever had the problem with adventure maps where you accidently press [Q] and drop your "Key" into a pool of lava and then have to redownload the whole map because of one single item? Well, here is the solution.
Pros and Cons
+ Instantly gives all dropped items to the player nearest to them.
+ No items can get lost or despawned.
+ No lag from dropped items.
+ Four Command Blocks cover every item.
+ Multiplayer Friendly.
+ Dropped items from mobs will also instantly go to the players.
+ There is a chance that items can be transferred between players if they are standing extremely close.
How do I get this in my world?
You can either build it with the commands below or use my 1-Command.
Firstly you need a command_block, you can get one by typing:
/give @p minecraft:command_block
Now place the Command Block in an open area and enter this long command.
Firstly we changed two game rules.
The first one causes players to not lose items on death and the second one causes the clock to not spam chat. Secondly we /tp (teleport) the items to the player nearest to them. (@p means nearest player and the /execute causes it to execute @a[type=Item] so that it takes the player nearest to the items and not the command block). Then we change the entity-data of the items so that they can be picked up instantly. We also set their age to 0 and make them invulnerable so that they cannot despawn before they are given to the player.
Or you can do /replaceitem entity @p slot.(slot) (item) and attach that to a fill clock
And if you don't know what item they dropped? This works for any item a player drops, even named items. /replaceitem will only work if you know what item they dropped. You can use a 1000 /testfors but I find this easier because it only uses 4 Command Blocks covering every Item, every enchantments, every everything.