Warp functionality
This commit is contained in:
parent
0c3e0adbca
commit
1c477c4816
@ -2,9 +2,14 @@
|
||||
|
||||
tellraw @s [{"text":"» ","color":"gray"},{"translate":"hhost.minigame.welcome","fallback":"Welcome %s to the %s server!","with":[{"selector":"@s","color":"yellow"},{"text":"H","color":"#fa6a52","extra":[{"text":"e","color":"#fc7551"},{"text":"r","color":"#fd8051"},{"text":"o","color":"#fe8a52"},{"text":"H","color":"#ff9454"},{"text":"o","color":"#ff9e56"},{"text":"s","color":"#ffa85a"},{"text":"t","color":"#ffb15e"}]}],"color":"white"}]
|
||||
tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"translate":"hhost.minigame.wish_welcome","fallback":"Everyone, give %s a warm welcome!","with":[{"selector":"@s","color":"yellow"}],"color":"white"}]
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step master @s ~ ~ ~ 0.7 0.7
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step record @s ~ ~ ~ 0.7 0.7
|
||||
|
||||
# tp player
|
||||
# reset player
|
||||
clear @s[tag=!hc.debug]
|
||||
execute in herohost:world run tp @s[tag=!hc.debug] 5 109 50 -90 0
|
||||
|
||||
# misc
|
||||
scoreboard players enable @s +hc.warp
|
||||
|
||||
# initialize player
|
||||
tag @s add hc.initialized
|
@ -2,9 +2,14 @@
|
||||
|
||||
tellraw @s [{"text":"» ","color":"gray"},{"translate":"hhost.minigame.welcome_back","fallback":"Welcome back %s to the %s server!","with":[{"selector":"@s","color":"yellow"},{"text":"H","color":"#fa6a52","extra":[{"text":"e","color":"#fc7551"},{"text":"r","color":"#fd8051"},{"text":"o","color":"#fe8a52"},{"text":"H","color":"#ff9454"},{"text":"o","color":"#ff9e56"},{"text":"s","color":"#ffa85a"},{"text":"t","color":"#ffb15e"}]}],"color":"white"}]
|
||||
tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"translate":"hhost.minigame.debug_warning","fallback":"You are still in debug mode, click %s to disable it.","with":[{"translate":"hhost.minigame.here","fallback":"here","color":"red","clickEvent":{"action":"run_command","value":"/tag @s remove hc.debug"},"hoverEvent":{"action":"show_text","contents":[{"translate":"hhost.minigame.operator_warning","fallback":"You need to be an operator to use this.","color":"red"}]}}],"color":"white"}]
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step master @s ~ ~ ~ 0.7 0.7
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step record @s ~ ~ ~ 0.7 0.7
|
||||
|
||||
# tp player
|
||||
# reset player
|
||||
clear @s[tag=!hc.debug]
|
||||
execute in herohost:world run tp @s[tag=!hc.debug] 5 109 50 -90 0
|
||||
|
||||
# misc
|
||||
scoreboard players enable @s +hc.warp
|
||||
|
||||
# reset player score
|
||||
scoreboard players reset @s +hc.disconnect
|
@ -7,8 +7,9 @@ tellraw @a[tag=hc.debug] [{"text":"» ","color":"gray"},{"translate":"hhost.mini
|
||||
scoreboard objectives add +hc.core dummy
|
||||
scoreboard objectives add +hc.disconnect minecraft.custom:minecraft.leave_game
|
||||
scoreboard objectives add +hc.locked dummy
|
||||
# scoreboard objectives add +hc.currency dummy
|
||||
# scoreboard objectives add +hc.currency.add dummy
|
||||
# scoreboard objectives add +hc.currency.remove dummy
|
||||
scoreboard objectives add +hc.warp trigger
|
||||
# [ WIP ] scoreboard objectives add +hc.currency dummy
|
||||
# [ WIP ] scoreboard objectives add +hc.currency.add dummy
|
||||
# [ WIP ] scoreboard objectives add +hc.currency.remove dummy
|
||||
|
||||
# remove depricated scoreboard objectives
|
||||
|
@ -5,11 +5,13 @@
|
||||
execute as @a[scores={+hc.disconnect=1..}] run function herohost:core/reconnect
|
||||
|
||||
# protection
|
||||
#kill @e[type=item,tag=!persistent]
|
||||
kill @e[type=item,tag=!persistent]
|
||||
gamemode adventure @a[tag=!hc.debug]
|
||||
|
||||
# hc.debug
|
||||
|
||||
# misc
|
||||
execute as @a[scores={+hc.warp=1..}] run function herohost:misc/warp
|
||||
|
||||
# games
|
||||
# execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core
|
||||
# [ WIP ] execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core
|
12
data/herohost/function/misc/warp.mcfunction
Normal file
12
data/herohost/function/misc/warp.mcfunction
Normal file
@ -0,0 +1,12 @@
|
||||
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
|
||||
|
||||
execute if score @s +hc.warp matches 1 in herohost:world run tp @s 5 109 50 -90 0
|
||||
execute if score @s +hc.warp matches 2 in herohost:world run tp @s 50 125 -15 -118 0
|
||||
|
||||
# effects
|
||||
execute at @s run playsound minecraft:block.amethyst_block.step record @s ~ ~ ~ 0.7 0.7
|
||||
# [ WIP ] execute as @s at @s run particle minecraft:reverse_portal ~ ~1 ~ 0.5 0.5 0.5 0.1 20
|
||||
|
||||
# reset
|
||||
scoreboard players set @s +hc.warp 0
|
||||
scoreboard players enable @s +hc.warp
|
Loading…
Reference in New Issue
Block a user