
# Gamerules #
gamerule naturalRegeneration false
#gamerule sendCommandFeedback false

# Global Variables #
scoreboard objectives add nl.HealthCheck dummy
scoreboard objectives add nl.WriteDamage dummy
scoreboard objectives add nl.GlobalLevel dummy 
scoreboard objectives add nl.Count dummy 
scoreboard objectives add nl.Rng dummy
scoreboard objectives add nl.Timer dummy
scoreboard objectives add nl.DetectDamage minecraft.custom:minecraft.damage_dealt
scoreboard objectives add nl.OreUses dummy
scoreboard objectives add nl.DetectEntity dummy
scoreboard objectives add nl.DetectSneak minecraft.custom:minecraft.sneak_time

# Player Variables # 
    # Statistics #
scoreboard objectives add nl.WellRested minecraft.custom:minecraft.sleep_in_bed
scoreboard objectives add nl.RestTimer dummy
scoreboard objectives add nl.Xcoord dummy
scoreboard objectives add nl.Ycoord dummy
scoreboard objectives add nl.Zcoord dummy
    # Magic # 
scoreboard objectives add nl.MP.Base dummy
scoreboard objectives add nl.MP.Current dummy
scoreboard objectives add nl.MP.Max dummy
scoreboard objectives add nl.MP.Regen dummy
scoreboard objectives add nl.MagicDamage dummy
scoreboard objectives add nl.Staff.Trigger minecraft.used:minecraft.carrot_on_a_stick
scoreboard objectives add nl.Staff.Damage dummy

# Custom Enchantments #
    # Enchantments #
scoreboard objectives add nl.HasteTimer dummy
scoreboard objectives add nl.SoulTimer dummy
    # Status Effects #
scoreboard objectives add nl.DMG.Bleed dummy
scoreboard objectives add nl.DMG.Infect dummy
scoreboard objectives add nl.DMG.Timer dummy
scoreboard objectives add nl.DMG.Leech dummy
scoreboard objectives add nl.DMG.Stun dummy

# Quality scores # 
scoreboard objectives add nl.Reroll dummy
scoreboard objectives add nl.Quality dummy
scoreboard objectives add nl.ToolSwap dummy

# Health Display #
scoreboard objectives add nl.Health dummy
scoreboard objectives add nl.HPCheck dummy
scoreboard objectives add nl.FullHealth dummy
    # Health Display Teams #
team add nl_HP100 "Health 100%"
team add nl_HP90 "Health 90%"
team add nl_HP80 "Health 80%"
team add nl_HP70 "Health 70%"
team add nl_HP60 "Health 60%"
team add nl_HP50 "Health 50%"
team add nl_HP40 "Health 40%"
team add nl_HP30 "Health 30%"
team add nl_HP20 "Health 20%"
team add nl_HP10 "Health 10%"
team add nl_HP0 "Health 0%"
    # Set Health bar # 
team modify nl_HP100 suffix [{"text":" [","color":"dark_aqua"},{"text":"||||||||||","color":"green"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP90 suffix [{"text":" [","color":"dark_aqua"},{"text":"|||||||||","color":"green"},{"text":"|","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP80 suffix [{"text":" [","color":"dark_aqua"},{"text":"||||||||","color":"green"},{"text":"||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP70 suffix [{"text":" [","color":"dark_aqua"},{"text":"|||||||","color":"green"},{"text":"|||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP60 suffix [{"text":" [","color":"dark_aqua"},{"text":"||||||","color":"gold"},{"text":"||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP50 suffix [{"text":" [","color":"dark_aqua"},{"text":"|||||","color":"gold"},{"text":"|||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP40 suffix [{"text":" [","color":"dark_aqua"},{"text":"||||","color":"gold"},{"text":"||||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP30 suffix [{"text":" [","color":"dark_aqua"},{"text":"|||","color":"red"},{"text":"|||||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP20 suffix [{"text":" [","color":"dark_aqua"},{"text":"||","color":"red"},{"text":"||||||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP10 suffix [{"text":" [","color":"dark_aqua"},{"text":"|","color":"red"},{"text":"|||||||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]
team modify nl_HP0 suffix [{"text":" [","color":"dark_aqua"},{"text":"","color":"red"},{"text":"||||||||||","color":"dark_gray"},{"text":"] ","color":"dark_aqua"}]

# Custom Blocks #
    # Crafter # 
scoreboard objectives add nl.Slot1 dummy 
scoreboard objectives add nl.Slot2 dummy 
scoreboard objectives add nl.Slot3 dummy 
scoreboard objectives add nl.Slot4 dummy 
scoreboard objectives add nl.Slot5 dummy 
scoreboard objectives add nl.Slot6 dummy 
scoreboard objectives add nl.Slot7 dummy 
scoreboard objectives add nl.Slot8 dummy 
scoreboard objectives add nl.Slot9 dummy 
scoreboard objectives add nl.CraftID dummy 
scoreboard players set @a nl.CraftID 0
    # Enchanter # 
scoreboard objectives add nl.Enchant dummy 
scoreboard players set @a nl.Enchant 0
    # Crystal Ball # 
scoreboard objectives add nl.Recipe dummy 
scoreboard objectives add nl.RecipeID dummy
scoreboard players set @a nl.Recipe 0

# Credits #
scoreboard objectives add nl.Credits trigger "Credits"
scoreboard players enable @a nl.Credits

# Load Successful chat log # 
tellraw @a ["",{"text":"[======================================]\n    Welcome to ","color":"gold"},{"text":"⚔ Minecraft:Next_Level ⚔","color":"aqua"},{"text":" \n        By ","color":"gold"},{"text":"SirPumpkinstein","color":"dark_purple"},{"text":"      ","color":"gold"},{"text":"[CREDITS]","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger nl.Credits set 1"},"hoverEvent":{"action":"show_text","value":"Click here to see credits..."}},{"text":"  \n[======================================]","color":"gold"},{"text":"   Public Release 1.0","color":"dark_gray"}]

# Dev stuff # 

team add nl_dev 