Initial import
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Lobby effects
|
||||
# Logic:
|
||||
# - Effect lobby diberikan hanya 1x saat player masuk lobby.
|
||||
# - Durasi dibuat sangat panjang supaya icon effect tidak refresh/berkedip terus.
|
||||
# - Saat player keluar lobby, effect lobby dibersihkan 1x lalu tag dihapus.
|
||||
|
||||
# Player baru masuk lobby: beri semua effect lobby sekali saja.
|
||||
execute as @a[tag=!lobby_effects] at @s if predicate lobby:allowed_dimension run effect give @s minecraft:saturation infinite 2 true
|
||||
execute as @a[tag=!lobby_effects] at @s if predicate lobby:allowed_dimension run effect give @a minecraft:instant_health infinite 2 true
|
||||
execute as @a[tag=!lobby_effects] at @s if predicate lobby:allowed_dimension run tag @s add lobby_effects
|
||||
|
||||
# Saat player sudah bukan di lobby, bersihkan effect lobby sekali lalu hapus tag.
|
||||
execute as @a[tag=lobby_effects] at @s unless predicate lobby:allowed_dimension run effect clear @s minecraft:saturation
|
||||
execute as @a[tag=lobby_effects] at @s unless predicate lobby:allowed_dimension run effect clear @s minecraft:instant_health
|
||||
execute as @a[tag=lobby_effects] at @s unless predicate lobby:allowed_dimension run tag @s remove lobby_effects
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"condition": "minecraft:location_check",
|
||||
"predicate": {
|
||||
"dimension": "zombiiattack:lobby"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user