Jump to content

I need help with my dupe system


Aqua_DuckYT

Recommended Posts

 

so I'm trying to make it where you can't dupe certain named items and certain named items in shulkers but I'm having trouble figuring it our

command /dupe:
    cooldown: 2 minutes
    cooldown message: &7You last duplicated an item &2%elapsed time% &7ago, you may dupe again in &2%remaining time%
    trigger:
        give player player's held item
        if player's held item is not air:
            if player's held item is not nether star:
                if player's held item is not a shulker box:
                    play sound "ENTITY_PLAYER_LEVELUP" or "BLOCK_RESPAWN_ANCHOR_CHARGE" to player
#anti air duper
        if player's held item is air:
            cancel cooldown
            play sound "ENTITY_BAT_DEATH" or "ENTITY_ENDERMAN_HURT" or "BLOCK_RESPAWN_ANCHOR_DEPLETE" with volume 6.5 to player
            message "&cYou need to hold an item" to player
#anti heart duper
        if player's held item is nether star:
            cancel cooldown
            play sound "ENTITY_BAT_DEATH" or "ENTITY_ENDERMAN_HURT" or "BLOCK_RESPAWN_ANCHOR_DEPLETE" with volume 6.5 to player
            message "&cYou can't dupe &4Hearts"
            remove player's held item from player's inventory
#shulker anti duper
        if player's held item is a shulker box:
            cancel cooldown
            message "&cYou can't dupe shulkers"
            loop 12 times:
                remove shulker box from player's inventory
            play sound "ENTITY_BAT_DEATH" or "ENTITY_ENDERMAN_HURT" or "BLOCK_RESPAWN_ANCHOR_DEPLETE" with volume 6.5 to player

Edited by Aqua_DuckYT
Link to comment
Share on other sites

Move line 5 to the bottom of the first section, so as to apply the conditions to it.

Your code looks like this right now:

command /dupe:
    cooldown: 2 minutes
    cooldown message: &7You last duplicated an item &2%elapsed time% &7ago, you may dupe again in &2%remaining time%
    trigger:
        give player player's held item
        if player's held item is not air:
            if player's held item is not nether star:
                if player's held item is not a shulker box:
                    play sound "ENTITY_PLAYER_LEVELUP" or "BLOCK_RESPAWN_ANCHOR_CHARGE" to player

It should look like this:

command /dupe:
    cooldown: 2 minutes
    cooldown message: &7You last duplicated an item &2%elapsed time% &7ago, you may dupe again in &2%remaining time%
    trigger:
        if player's held item is not air:
            if player's held item is not nether star:
                if player's held item is not a shulker box:
                    play sound "ENTITY_PLAYER_LEVELUP" or "BLOCK_RESPAWN_ANCHOR_CHARGE" to player
                    give player player's held item

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...