Hello guys and ladies.
I did that code, and it works perfectly so far, but, I don't know how exactly it work
It can cause some bug in the future ?
My objective is prevent chunkbans using furnaces. establishing a limit to place furnace, that is 8, and the player have to break old furnaces to place again. I know that the furnace blow up it will bug my code, and I will fix this using an expression in skquery lime.
I prevented that players break furnaces from each other, which can cause some bug too.
My doubt is: there are some things can cause some bugs that I'm not finding?
Thanks.
[doublepost=1601487226,1601403765][/doublepost]
SOLVED.
I did that code, and it works perfectly so far, but, I don't know how exactly it work
It can cause some bug in the future ?
My objective is prevent chunkbans using furnaces. establishing a limit to place furnace, that is 8, and the player have to break old furnaces to place again. I know that the furnace blow up it will bug my code, and I will fix this using an expression in skquery lime.
I prevented that players break furnaces from each other, which can cause some bug too.
My doubt is: there are some things can cause some bugs that I'm not finding?
Code:
on place:
if event-block is a furnace:
if size of {chunkban.risk.place::furnace::%event-player%::*} is 8:
cancel event
message "&4&l[ChunkBan-Check]&f&l Você já colocou %size of {chunkban.risk.place::furnace::%event-player%::*}% fornalhas, remova alguma para por mais" to event-player
else:
add event-block to {chunkban.risk.place::furnace::%event-player%::*}
if size of {chunkban.risk.place::furnace::%event-player%::*} is greater than 9:
loop all players:
if loop-player has permission "OP" or "Admin" or "Sub-Admin" or "Moderator":
message "&4&l[ChunkBan-Check]&f&l %event-player% está colocando muitas fornalhas (%size of {chunkban.risk.place::furnace::%event-player%::*}%).max= 8" to loop-player
on break:
if event-block is a furnace:
cancel event
loop {chunkban.risk.place::furnace::%event-player%::*}:
if "%location of event-block%" is "%location of loop-value%":
set block at location of event-block to air
remove loop-value from {chunkban.risk.place::furnace::%event-player%::*}
else:
cancel event
Thanks.
[doublepost=1601487226,1601403765][/doublepost]
Code:
if event-block is a furnace:
if size of {chunkban.risk.place::furnace::%event-player%::*} is 8:
cancel event
message "&4&l[ChunkBan-Check]&f&l Você já colocou %size of {chunkban.risk.place::furnace::%event-player%::*}% fornalhas, remova alguma para por mais" to event-player
else:
add location of event-block to {chunkban.risk.place::furnace::%event-player%::*}
if size of {chunkban.risk.place::furnace::%event-player%::*} is greater than 9:
loop all players:
if loop-player has permission "OP" or "Admin" or "Sub-Admin" or "Moderator":
message "&4&l[ChunkBan-Check]&f&l %event-player% está colocando muitas fornalhas (%size of {chunkban.risk.place::furnace::%event-player%::*}%).max= 8" to loop-player
on break:
if event-block is a furnace:
if {chunkban.risk.place::furnace::%event-player%::*} contains location of event-block:
remove location of event-block from {chunkban.risk.place::furnace::%event-player%::*}
else:
cancel event
broadcast "&cEsta fornalha não te pertence"
SOLVED.