Minecraft Blogs

How to Disable Item Dropping

  • 1 diamonds
  • 5,149 views, 4 today
  • 4 comments
  • 0 favorites
  • 1
  • 0
  • 4
avatar TheCactusMonkey
Level 43 : Master Herobrine
9
I have always tried to find a way to disable item dropping in Minecraft, I haven't found any good way so I did it by myself.
With this commands you can't drop the item and you can't move it around in your inventory.
This is awesome for PvP and Adventure maps, if you don't want the player to drop a special items.

This command is made for 1.11+ but when I have been trying it has worked for 1.8, 1.9 and 1.10 too!

I'm going to use this commands on my server, so every player has a special book in there 9th hotbar slot. Thats why the scoreboards names are Book, hotbar8lock and dropBook. Its also why Ihave written_book in the commands, you can change that to your item.


Start by doing 2 scorboards:
/scoreboard objectives add hotbar8lock dummy
/scoreboard objectives add dropBook dummy

Then place the command blocks like this: (you can look on the Picture too)

1 2 4 5 6
...\/
...3 (Ignore the dots, PlanetMinecraft dose not accept space before you write)

Commandblock 1, 2, 4, 5 and 6 shall be:
Repeat, Unconditional, Always Active

Commandblock 3 shall be:
Chain, Unconditional, Always Active

After that you can paste in these commands:
---------------------------------------------------------------------------------------------------------------------------
1. /scoreboard players set @a hotbar8lock 1 {Inventory:[{Slot:8b,id:"minecraft:written_book"}]}
---------------------------------------------------------------------------------------------------------------------------
2. /clear @a[score_hotbar8lock=0] written_book 0 64
---------------------------------------------------------------------------------------------------------------------------
3. /replaceitem entity @a[score_hotbar8lock=0] slot.hotbar.8 written_book 1 0
---------------------------------------------------------------------------------------------------------------------------
4. /scoreboard players set @e dropBook 1 {Item:{id:"minecraft:written_book"}}
---------------------------------------------------------------------------------------------------------------------------
5. /kill @e[score_dropBook_min=1]
---------------------------------------------------------------------------------------------------------------------------
6. /scoreboard players set @a hotbar8lock 0
---------------------------------------------------------------------------------------------------------------------------

I hope this helped and it also worked for you!

Made in Sweden by: TheCactusMonkey

If you have any problems with the commands. Please just comment that down below and I will help you.


First Upload: 2017-04-06 17:15 CET
Tags

2 Update Logs

Update #2 : 04/06/2017 1:25:10 pmApr 6th, 2017

Removed the hole Book scoreboard, beacuse Bertiecrafter found that it had no use.
So now the commands are a Little bit smaller! :D


Things removed:
---------------------------------------------------------------------------------------------------------------------------
1. /scoreboard players set @p Book 0
---------------------------------------------------------------------------------------------------------------------------
2. /scoreboard players set @p Book 1

Commandblock 1 and 2 shall be:
Impulse, Unconditional and Needs Redstone
(If you want want everyone to get the Book, remove numer 1 and make numer to 2 Repeat, Unconditional, Always Active)

/scoreboard objectives add Book dummy

,score_Book_min=1

,score_Book_min=1

EXTRA:
I also changed the numers so it's only 1, 2, 3, 4, 5 and 6


Special Thanks to Bertiecrafter for the help

2017-04-06 19:30 CET
LOAD MORE LOGS

1
04/06/2017 12:25 pm
Level 52 : Grandmaster Cyborg
Bertiecrafter
The "Book" objective isn't used anywhere. Since it's always (except for when it goes to 0 and back to 1) one, it can be removed.

Nice set of commands though :P
1
04/06/2017 12:55 pm
Level 43 : Master Herobrine
TheCactusMonkey
Are you sure, I used the Book objective in 4 and 5 uses it, to look if you have the Book=1

Thanks anyways! :D
1
04/06/2017 1:01 pm
Level 52 : Grandmaster Cyborg
Bertiecrafter
The Book objective is a dummy and there is no other specification anywhere, that indicates why the player would or wouldn't have a Book score of 1. You set it to 0, then set it to 1 again. So basically, it's always 1 (meaning that the Book objective doesn't have a use). If you remove the objective, of course you have to remove the score_Book_min=1 parts. Also, you can change @p into @a for command 3.
1
04/06/2017 1:09 pm
Level 43 : Master Herobrine
TheCactusMonkey
Ya you are right! I tried that and it works! Thanks!
Planet Minecraft Logo

Website

© 2010 - 2020
www.planetminecraft.com

Welcome