AdvancementsAddon

Addon AdvancementsAddon 1.0.0

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

LimeGlass

VIP
Supporter ++
Regular Diner
Addon Developer
Jan 24, 2017
633
442
73
25
location of "LimeGlass" parsed as player
LimeGlass submitted a new resource:

AdvancementsAddon - A Skript addon for Minecraft 1.12+ Advancements

240px-ChallengeComplete.png


This is a Skript addon designed to allow for full control over Advancements in 1.12+

Here is a well explained wiki of what the Advancements http://minecraft.gamepedia.com/Advancements

There will be more changes and features added in the future. The current Spigot build as of posting this, doesn't allow for...

Read more about this resource...
 
Would you give me example: How to create a new advancement? I get java error maybe I'm doing some wrong.

I've found that the following works (as in, doesn't throw out an error), but I don't see it appearing anywhere.

code_language.skript:
!make an advancement with name "Test" and with title "test" and with description "testmore" and with icon "Goal Advancement" and with trigger "minecraft:construct_beacon" and with background "dirt" and for world "world" and with item arrow
 
Last edited by a moderator:
I actually found a more interesting way of disabling all advancements, just add this to spigot.yml

code_language.skript:
advancements:
  disable-saving: false
  disabled:
  - minecraft:story/disabled
  - minecraft:tick/disabled
  - minecraft:bred_animals/disabled
  - minecraft:brewed_potion/disabled
  - minecraft:changed_dimension/disabled
  - minecraft:construct_beacon/disabled
  - minecraft:consume_item/disabled
  - minecraft:cured_zombie_villager/disabled
  - minecraft:effects_changed/disabled
  - minecraft:enchanted_item/disabled
  - minecraft:enter_block/disabled
  - minecraft:entity_hurt_player/disabled
  - minecraft:entity_killed_player/disabled
  - minecraft:impossible/disabled
  - minecraft:inventory_changed/disabled
  - minecraft:item_durability_changed/disabled
  - minecraft:levitation/disabled
  - minecraft:location/disabled
  - minecraft:nether_travel/disabled
  - minecraft:placed_block/disabled
  - minecraft:player_hurt_entity/disabled
  - minecraft:player_killed_entity/disabled
  - minecraft:recipe_unlocked/disabled
  - minecraft:slept_in_bed/disabled
  - minecraft:summoned_entity/disabled
  - minecraft:tame_animal/disabled
  - minecraft:used_ender_eye/disabled

This way you don't need to toggle the gamerule in all worlds.
 
i haven't tried this addon but does it support 1.9 servers with support for 1.12 players or do you really need a 1.12 server?

asking this because i want to keep my server compatable with as most versions as possible
 
i haven't tried this addon but does it support 1.9 servers with support for 1.12 players or do you really need a 1.12 server?

asking this because i want to keep my server compatable with as most versions as possible
Advancements are a new 1.12 feature, you won't be able to use it on lower versions.
 
The grant isnt working.
code_language.skript:
[20:19:58 ERROR]: Can't understand this condition/effect: award advancement "Example" to player (Join.sk, line 24: award advancement "Example" to player')
I've create the advancement with this command, but i had need to add manually the json File to the world.
code_language.skript:
command /test [<text>]:
    trigger:
        award advancement "Example" to player
        stop
      
command /award <player> <text> <text>:
    usage: /award <player> <title> <description>
    trigger:
        create advancement with name "Example" title "%arg 2%", desc "%arg 3%", icon "minecraft:golden_apple", trigger "minecraft:consume_item", background "minecraft:textures/gui/advancements/backgrounds/stone.png" world "%player's world%" and item golden apple:1
The Vanilla Command works perfect.
Code:
/advancement grant @p only minecraft:story/example

code_language.skript:
{
  "criteria": {
    "elytra": {
      "trigger": "minecraft:consume_item",
      "conditions": {
        "items": [
          {
            "item": "minecraft:golden_apple",
            "amount": 1
          }
        ]
      }
    }
  },
  "display": {
    "background": "minecraft:textures/gui/advancements/backgrounds/stone.png",
    "icon": {
      "item": "minecraft:golden_apple"
    },
    "description": "1234",
    "title": "Test",
    "announce_to_chat": true
  }
}
And how do i change the Icon Frame?
 
It would be really cool if there were an event for getting criteria of advancements, not just being awarded the whole advancement.

I'd also like to see events for unlocking recipes, etc... Just trying to make something simple that blocks creative players from getting advancements/recipes unlocked. :emoji_stuck_out_tongue:

Still, good work.

EDIT: just realized "on advancement get" detects even when you unlock recipes. neat!
 
Last edited:
I know this is two years old, but I have an issue and don't know where else to put it (I'm still fairly new SkUnity)

I have this issue where when I put %event-advancement% in a broadcast message it prints out this:
upload_2020-4-6_23-15-2.png
(Look at the green text)

And when I put %event-key% it prints out this:
upload_2020-4-6_23-15-44.png
(Again, look at the green text)

I want it to look like this (this is a broadcast message):
upload_2020-4-6_23-16-42.png
(Again, look at the green text)

Is this in someway possible?



This is the code (the {count.blue} and {count.red} are both used to make sure nothing is spammed in chat)
Code:
on player advancement complete:
    if {team.%player%} is "&bBlue":
        if {count.blue} is 0:
            broadcast "&bBlue Team &fcompleted the advancement &a[%event-key%]"
    if {team.%player%} is "&cRed":
        if {count.red} is 0:
            broadcast "&cRed Team &fcompleted the advancement &a[%event-advancement%]"

command /debug-count:
    trigger:
        send "&8DEBUG > &b{count.blue} &f= &b%{count.blue}%"
        send "&8DEBUG > &c{count.red} &f= &c%{count.red}%"

every second:
    if {count.blue} is not set:
        set {count.blue} to 0
    if {count.red} is not set:
        set {count.red} to 0
    if {count.blue} >= 1:
        wait 19 ticks
        remove 1 from {count.blue}
    if {count.blue} <= 0:
        set {count.blue} to 0
    if {count.red} >= 1:
        wait 18 ticks
        remove 1 from {count.red}
    if {count.red} <= 0:
        set {count.red} to 0
 

Attachments

  • upload_2020-4-6_23-15-42.png
    upload_2020-4-6_23-15-42.png
    26 KB · Views: 265
Yo, did u ever find an answer to this problem?




I know this is two years old, but I have an issue and don't know where else to put it (I'm still fairly new SkUnity)

I have this issue where when I put %event-advancement% in a broadcast message it prints out this:View attachment 4512(Look at the green text)

And when I put %event-key% it prints out this:
View attachment 4514(Again, look at the green text)

I want it to look like this (this is a broadcast message):
View attachment 4515(Again, look at the green text)

Is this in someway possible?



This is the code (the {count.blue} and {count.red} are both used to make sure nothing is spammed in chat)
Code:
on player advancement complete:
    if {team.%player%} is "&bBlue":
        if {count.blue} is 0:
            broadcast "&bBlue Team &fcompleted the advancement &a[%event-key%]"
    if {team.%player%} is "&cRed":
        if {count.red} is 0:
            broadcast "&cRed Team &fcompleted the advancement &a[%event-advancement%]"

command /debug-count:
    trigger:
        send "&8DEBUG > &b{count.blue} &f= &b%{count.blue}%"
        send "&8DEBUG > &c{count.red} &f= &c%{count.red}%"

every second:
    if {count.blue} is not set:
        set {count.blue} to 0
    if {count.red} is not set:
        set {count.red} to 0
    if {count.blue} >= 1:
        wait 19 ticks
        remove 1 from {count.blue}
    if {count.blue} <= 0:
        set {count.blue} to 0
    if {count.red} >= 1:
        wait 18 ticks
        remove 1 from {count.red}
    if {count.red} <= 0:
        set {count.red} to 0