This commit is contained in:
HeroChris
2023-09-15 19:52:54 +02:00
commit f8951522bb
17 changed files with 271 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
tellraw @s [{"text":"» ","color":"gray"},{"text":"Welcome ","color":"white"},{"selector":"@s","color":"yellow"},{"text":", to the ","color":"white"},{"text":"H","color":"#fa6a52"},{"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"},{"text":" server!","color":"white"}]
tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"text":"Everyone, give ","color":"white"},{"selector":"@s","color":"yellow"},{"text":" a warm welcome!","color":"white"}]
execute at @s run playsound minecraft:entity.player.levelup master @s
execute in herohost:world run tp @s 0 101 0 0 0
gamemode adventure @s[tag=!hc.debug]
# initialize player
tag @s add hc.initialized

View File

@ -0,0 +1,10 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
tellraw @s [{"text":"» ","color":"gray"},{"text":"Welcome back ","color":"white"},{"selector":"@s","color":"yellow"},{"text":", to the ","color":"white"},{"text":"H","color":"#fa6a52"},{"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"},{"text":" server!","color":"white"}]
tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"text":"You are still in debug mode, click ","color":"white"},{"text":"here","color":"red","clickEvent":{"action":"run_command","value":"/tag @s remove hc.debug"},"hoverEvent": {"action": "show_text","value": {"text": "You need to be an operator to use this.","color": "#fc2003"}}},{"text":" to disable it.","color":"white"}]
execute at @s run playsound minecraft:entity.player.levelup master @s
execute in herohost:world run tp @s 0 101 0 0 0
gamemode adventure @s[tag=!hc.debug]
# reset player score
scoreboard players reset @s +hc.disconnect

View File

@ -0,0 +1,4 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
tellraw @a [{"text":"» ","color":"green"},{"text": "Datapack resources loaded successfully.","color": "#ffffff"}]
tellraw @a[tag=hc.debug] [{"text":"» ","color":"gray"},{"text":"If any issue occurs, click ","color":"white"},{"text":"here","color":"red","clickEvent":{"action":"run_command","value":"/reload"},"hoverEvent": {"action": "show_text","value": {"text": "You need to be an operator to use this.","color": "#fc2003"}}},{"text":" to reload the server.","color":"white"}]

View File

@ -0,0 +1,8 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
# core handling
execute as @a[tag=!hc.initialized] run function herohost:core/initialize
execute as @a[scores={+hc.disconnect=1..}] run function herohost:core/reconnect
# 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

View File

@ -0,0 +1,7 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
# give and remove tnt
item replace entity @a[tag=hc.get_tnt] armor.head with tnt{HideFlags:1,Enchantments:[{id:"minecraft:binding_curse",lvl:1s}]} 1
item replace entity @a[tag=hc.give_tnt] armor.head with air 1
tag @a remove hc.get_tnt
tag @a remove hc.give_tnt

View File

@ -0,0 +1,4 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
advancement revoke @s only herohost:tnt/get_tnt
tag @s add hc.get_tnt

View File

@ -0,0 +1,4 @@
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
advancement revoke @s only herohost:tnt/give_tnt
tag @s add hc.give_tnt