#whitelist of block
1 messages · Page 1 of 1 (latest)
set {_whitelist::*} to honey_block and cobweb and rail and powered_rail and detector_rail and activator_rail and minecart and tnt and coal_ore and iron_ore and copper_ore and gold_ore and diamond_ore and emerald_ore and redstone_ore and nether_gold_ore and nether_quartz_ore and coal_block and iron_block and copper_block and gold_block and diamond_block and emerald_block and redstone_block
if event-block is not in {_whitelist::*}:
cancel event
send "&cBạn không thể phá block này!" to player
this is my second ver and it said can't compare a block with in {_whitelist::*}
how to fix that @vestal minnow
list does not contain event-block
😥 how to fix that, @vestal minnow
I don't understand how
set {_whitelist} to [honey_block, cobweb, rail, powered_rail, detector_rail, activator_rail, minecart, tnt, coal_ore, iron_ore, copper_ore, gold_ore, diamond_ore, emerald_ore, redstone_ore, nether_gold_ore, nether_quartz_ore, coal_block, iron_block, copper_block, gold_block, diamond_block, emerald_block, redstone_block]
if event-block is not in {_whitelist}:
cancel event
send "&cBạn không thể phá block này!" to player```
sorry i does know the [] iss contain
this my third version it still doesnt work sirr
?!?!?!?
sorry I'm stupid I don't understand what that sentence means
im using google to talk to you
Sorry to upset you I'll hope for someone else
thanks for reply Mug
We have a #1037780461142933624 here
this is what you need to use, if {_whitelist::*} contains event-block:
You also need to do {_whitelist::*} instead of {_whitelist} when setting it.
set {_whitelist::*} to honey_block, cobweb, rail, powered_rail, detector_rail, activator_rail, minecart, tnt, coal_ore, iron_ore, copper_ore, gold_ore, diamond_ore, emerald_ore, redstone_ore, nether_gold_ore, nether_quartz_ore, coal_block, iron_block, copper_block, gold_block, diamond_block, emerald_block, redstone_block
if {_whitelist::*} contains event-block:
cancel event
send "&cBạn không thể phá block này!" to player```
it succes bro but i want to allow break block in whitelist not deny it how to change the line 7 to fix that, Mug
change it to if {_whitelist::*} does not contain event-block:
it make i can break all block
Debuged it?
Also you probably should just put the setting of whitelist to on load

or aliases
on load:
set {_whitelist::*} to honey_block, cobweb, rail, powered_rail, detector_rail, activator_rail, minecart, tnt, coal_ore, iron_ore, copper_ore, gold_ore, diamond_ore, emerald_ore, redstone_ore, nether_gold_ore, nether_quartz_ore, coal_block, iron_block, copper_block, gold_block, diamond_block, emerald_block, redstone_block
on mine:
if {_whitelist::*} does not contain event-block:
cancel event
send "&cBạn không thể phá block này!" to player
it doesnt work correct
im still can break all block
how to fix that sir
still local
x8ight suggests that you read Sovde's Global vs Local Variable Tutorial
set {_whitelist::*} to "honey_block, cobweb, rail, powered_rail, detector_rail, activator_rail, minecart, tnt, coal_ore, iron_ore, copper_ore, gold_ore, diamond_ore, emerald_ore, redstone_ore, nether_gold_ore, nether_quartz_ore, coal_block, iron_block, copper_block, gold_block, diamond_block, emerald_block, redstone_block"
on mine:
if {_whitelist::*} does not contain event-block:
cancel event
send "&cBạn không thể phá block này!" to player
im just followed the your solve and it still stupid sir
i mean
i stupid
No, you didn't lol
at {} right sir
oh wait, you've stringified it...
why?
i guess that works, but now it doesnt need a list, and you'll have to check for a substring too
i see the docs have
set {whitelist::*} to honey_block, cobweb, rail, powered_rail, detector_rail, activator_rail, minecart, tnt, coal_ore, iron_ore, copper_ore, gold_ore, diamond_ore, emerald_ore, redstone_ore, nether_gold_ore, nether_quartz_ore, coal_block, iron_block, copper_block, gold_block, diamond_block, emerald_block, redstone_block
on mine:
if {whitelist::*} does not contain event-block:
cancel event
send "&cBạn không thể phá block này!" to player
it still do not work @pale berry
Debug?
what you mean bell
thats not gonna work with underscores in the block names
only if you stringify it and use the minecraft ID
otherwise, block names have spaces in them
you alo want to check contains type of event-block