#How to make a player eat after clearing an item

1 messages · Page 1 of 1 (latest)

calm blaze
#

every 0.1 ticks:
loop all players:
if loop-player's gamemode is survival:
remove end portal frame from loop-player's inventory
remove spawn egg from loop-player's inventory
remove bedrock from loop-player's inventory
remove barrier from loop-player's inventory
remove command block from loop-player's inventory

I can't eat while doing this. Is there a fix?

hidden siren
#

ummm dont clear items like that.

  1. 0.1 ticks isn't a thing. You can't do anything less than 1 tick
  2. that is so bad for performance
    find another way to clear items.
    Theres no way a player should be able to get those items anyways
calm blaze
hidden siren
#

you dont need to use reply and therefor tag me. Im the only one here

#

how are the players getting those items?

calm blaze
#

They get random items every few seconds

hidden siren
#

well dont give them random items then, dur

calm blaze
#

thats the gamemode

hidden siren
#

why are you giving them items and then taking them away?

calm blaze
#

its a gamemode where you spawn with random items and you can build stuff etc
I am only taking away things they arent supposed to get

hidden siren
#

well, just dont give them those items to begin with

calm blaze
hidden siren
#

stop tagging me

calm blaze
#

sorry

hidden siren
#

you dont need to reply to the LAST message in chat, plus we're the only 2 people here

#

this is when you need to put some basic logic to the test.
Like come on buddy, you have figured out how to remove items from a player, so do the same thing before you give a random item, just dont give them the items you dont want them to have

calm blaze
#

so like put the skript I posted under where it gives a random item

hidden siren
#

or just create a list of valid items