Translate & Advancement
This commit is contained in:
		
							
								
								
									
										25
									
								
								data/herohost/advancement/herohost/root.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								data/herohost/advancement/herohost/root.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
{
 | 
			
		||||
    "display": {
 | 
			
		||||
        "icon": {
 | 
			
		||||
            "id": "minecraft:axolotl_bucket"
 | 
			
		||||
        },
 | 
			
		||||
        "title": {
 | 
			
		||||
            "translate": "hhost.minigame.advancement.herohost.root.title",
 | 
			
		||||
            "fallback": "HeroHost servers."
 | 
			
		||||
        },
 | 
			
		||||
        "description": {
 | 
			
		||||
            "translate": "hhost.minigame.advancement.herohost.root.description",
 | 
			
		||||
            "fallback": "Welcome to the HeroHost minigame server!"
 | 
			
		||||
        },
 | 
			
		||||
        "frame": "task",
 | 
			
		||||
        "show_toast": true,
 | 
			
		||||
        "announce_to_chat": false,
 | 
			
		||||
        "hidden": false,
 | 
			
		||||
        "background": "minecraft:textures/block/white_concrete_powder.png"
 | 
			
		||||
    },
 | 
			
		||||
    "criteria": {
 | 
			
		||||
        "tick": {
 | 
			
		||||
            "trigger": "minecraft:tick"
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										16
									
								
								data/herohost/advancement/misc/lock.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								data/herohost/advancement/misc/lock.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
{
 | 
			
		||||
    "criteria": {
 | 
			
		||||
        "requirement": {
 | 
			
		||||
            "trigger": "minecraft:player_interacted_with_entity",
 | 
			
		||||
            "conditions": {
 | 
			
		||||
                "entity": {
 | 
			
		||||
                    "type": "minecraft:interaction",
 | 
			
		||||
                    "nbt": "{Tags:[\"locked\"]}"
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "rewards": {
 | 
			
		||||
        "function": "herohost:misc/lock"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# --- 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 ~ ~ ~ 1
 | 
			
		||||
tellraw @s [{"text":"» ","color":"gray"},{"fallback":"Welcome ","translate":"hhost.minigame.initialize.welcome_01","color":"white"},{"selector":"@s","color":"yellow"},{"fallback":" to the ","translate":"hhost.minigame.initialize.welcome_02","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"},{"fallback":" server!","translate":"hhost.minigame.initialize.welcome_03","color":"white"}]
 | 
			
		||||
tellraw @a[tag=hc.initialized] [{"text":"» ","color":"gray"},{"fallback":"Everyone, give ","translate":"hhost.minigame.initialize.wish_welcome_01","color":"white"},{"selector":"@s","color":"yellow"},{"fallback":" a warm welcome!","translate":"hhost.minigame.initialize.wish_welcome_02","color":"white"}] 
 | 
			
		||||
execute at @s run playsound minecraft:entity.chicken.egg master @s ~ ~ ~ 0.6 0.7
 | 
			
		||||
 | 
			
		||||
# tp player
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# --- 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 ~ ~ ~ 1
 | 
			
		||||
tellraw @s [{"text":"» ","color":"gray"},{"fallback":"Welcome back ","translate":"hhost.minigame.reconnect.welcome_back_01","color":"white"},{"selector":"@s","color":"yellow"},{"fallback":" to the ","translate":"hhost.minigame.reconnect.welcome_back_02","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"},{"fallback":" server!","translate":"hhost.minigame.reconnect.welcome_back_03","color":"white"}]
 | 
			
		||||
tellraw @s[tag=hc.debug] [{"text":"» ","color":"red"},{"fallback":"You are still in debug mode, click ","translate":"hhost.minigame.reconnect.debug_01","color":"white"},{"fallback":"here","translate":"hhost.minigame.reconnect.debug_02","color":"red","clickEvent":{"action":"run_command","value":"/tag @s remove hc.debug"},"hoverEvent": {"action": "show_text","value": {"fallback":"You need to be an operator to use this.","translate":"hhost.minigame.reconnect.debug_hover","color": "#fc2003"}}},{"fallback":" to disable it.","translate":"hhost.minigame.reconnect.debug_03","color":"white"}]
 | 
			
		||||
execute at @s run playsound minecraft:entity.chicken.egg master @s ~ ~ ~ 0.6 0.7
 | 
			
		||||
 | 
			
		||||
# tp player
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
# --- 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"}]
 | 
			
		||||
tellraw @a [{"text":"» ","color":"green"},{"fallback": "Datapack resources loaded successfully.","translate": "hhost.minigame.init.reload","color": "#ffffff"}]
 | 
			
		||||
tellraw @a[tag=hc.debug] [{"text":"» ","color":"gray"},{"fallback":"If any issues occur, click ","translate": "hhost.minigame.init.reload_issue_01","color":"white"},{"fallback":"here","translate": "hhost.minigame.init.reload_issue_02","color":"red","clickEvent":{"action":"run_command","value":"/reload"},"hoverEvent": {"action": "show_text","value": {"fallback": "You need to be an operator to use this.","translate": "hhost.minigame.init.reload_issue_hover","color": "#fc2003"}}},{"fallback":" to reload the server.","translate": "hhost.minigame.init.reload_issue_03","color":"white"}]
 | 
			
		||||
 | 
			
		||||
# create scoreboard objectives
 | 
			
		||||
scoreboard objectives add +hc.core dummy
 | 
			
		||||
 
 | 
			
		||||
@@ -5,15 +5,11 @@ execute as @a[tag=!hc.initialized] run function herohost:core/initialize
 | 
			
		||||
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]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
clear KingNugget minecraft:splash_potion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# hc.debug
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
# execute in herohost:world if entity @p[x=-125,y=50,z=-376,dx=250,dy=100,dz=250] run function herohost:tnt/core
 | 
			
		||||
							
								
								
									
										5
									
								
								data/herohost/function/misc/lock.mcfunction
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								data/herohost/function/misc/lock.mcfunction
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
 | 
			
		||||
 | 
			
		||||
advancement revoke @s only herohost:misc/lock
 | 
			
		||||
title @s actionbar [{"fallback":"You can't do that! This is not yours to touch.","translate":"hhost.minigame.misc.locked"}]
 | 
			
		||||
playsound minecraft:block.nether_wood.break master @s ~ ~ ~ 1 1 1
 | 
			
		||||
							
								
								
									
										10
									
								
								pack.mcmeta
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								pack.mcmeta
									
									
									
									
									
								
							@@ -1,6 +1,14 @@
 | 
			
		||||
{
 | 
			
		||||
  "pack": {
 | 
			
		||||
    "pack_format": 48,
 | 
			
		||||
    "pack_format": 57,
 | 
			
		||||
    "description": "HeroHost - HeroChris 2024"
 | 
			
		||||
  },
 | 
			
		||||
  "filter": {
 | 
			
		||||
      "block": [
 | 
			
		||||
          {
 | 
			
		||||
              "namespace": "minecraft",
 | 
			
		||||
              "path": "advancement/.*"
 | 
			
		||||
          }
 | 
			
		||||
      ]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user