Skript - Drop held item

Discussion in 'Spigot Plugin Help' started by vnck-, Jun 19, 2016.

  1. Been working on some features for my prison server project, And been making this skript to disable drops of pickaxes I've gotten that part done but now I need a command that will toss out the held pickaxe.

    Here is what I have so far.

    Code (Text):
    On drop of diamond pickaxe or gold pickaxe or iron pickaxe or stone pickaxe or wooden pickaxe:
        send "&c&l(!)&c You sure you want to drop this? Do &n/droptool&c!" to player
        cancel the event
        stop

    command /droptool:
        trigger:
            if player is holding a diamond pickaxe or gold pickaxe or iron pickaxe or stone pickaxe or wooden pickaxe:
                message "&e&l(!)&b Pickaxe dropped!"
            else:
                message "&c&l(!)&c You can only use this command for pickaxes"
     
  2. Some time ago I created some of this for an event. Possibly it serves you. I leave the code for the diamond peak.
    Code (Text):
    on drop of pickaxe:
        if {Drop::%player%} is not set:
            set {Drop::%player%} to true
            send "Sure you want to release your beak?"
            wait 2 seconds
            delete {Drop::%player%}
        if {Drop::%player%} is set:
            send "You have released your beak"
            stop
       
    I hope to be helpful.
    Only with dropping the peak twice within 2 seconds you can do it, otherwise you will not leave it.
     
  3. MiniDigger

    Supporter