Advancement Eras

Discussion in 'Plugin Requests' started by tage111, Jan 18, 2021.

  1. Offline

    tage111

    Plugin category: Role Playing

    Minecraft version: 1.16.4+

    Suggested name: Advancment Era's

    What I want: I want there to be prefix or suffix (optional) explaining what era the player is in. The era bases upon how many and wich advancment the player has completed. For exemple: If the player completes the Stone Age, it will be given a prefix saying: Ancient Era.

    In the config you can choose how many era's you want to have. Name the Era's and choose what advancments needed to be completed to achieve that era. Also you could choose if the player recieves an item, block, or effect when advancing to the next era.

    Ideas for commands:
    /era check - Explaining what advancment needed to advance
    /era %player% check - Explaining other players advancment needed to advance​

    Ideas for permissions:
    era.player.check - Allowing players to check other players progress
    era.check - Allowing players to chech their own progress
    era.advance - Allowing players to recieve prefix/suffix (This is because not all type of players
    going to have the prefix or suffix. For exemple Admins and Bots).​

    When I'd like it by: NO RUSH! As long as it is possible to be made, I'm happy =)

    Thanks to anyone doing this!
     
    Last edited: Jan 31, 2021
  2. Offline

    timtower Administrator Administrator Moderator

    @tage111 And how would somebody define those ara's? Configs? Commands? Permissions? Usage?
     
  3. Offline

    tage111

    .
     
    Last edited: Jan 23, 2021
  4. Offline

    NewtyMan

    Hello there,

    I've probably over-complicated this a bit, but it's my first a bit bigger project. Here is a quick run-down of how this plugin works.

    At the moment the era name is a prefix in the chat. If you want it anywhere else, I can look into adding it.

    Commands:
    /era check -> Check your status to next era (missing requirements). Requires era.check permission
    /era check (playername) -> Same as above but displays info for another player. Requires era.player.check

    Permissions:
    By default all permission are set to false, so they will need to be assigned before players can advance into new eras.
    • era.advance
    • era.check
    • era.player.check

    config.yml
    When the plugin is first started, it will generate a config file. I believe that the example I provided makes it quite clear how to configure it, but here is a quick tutorial.

    First you define the name of the era inside the "eras" section. ! This is not the name that will be displayed !
    This names should have no whitespaces (replace them with _ or anything similar)
    Eras also have "strict" advancement, meaning you can't skip eras. In order to get to era 3, you first need to unlock era 2 and era 1. The order of them in config is also important. Go from the earliest (first) to latest/last era.

    -----------------------------------------------------

    Each era then has a few additional configurations you can put in it:
    label (required) -> Display name of the era (supports formatting/color codes)
    requirements (optional) -> List of required advancements needed to advance to new era. If empty, players will always be able to advance to this era without doing anything.
    awards (optional) -> list of all awards player receives upon advancing to this era. If you want to give multiple items within one era award, you can name them like "itemx" where you replace x with any number (make sure two entries don't have same name)

    -----------------------------------------------------

    To add requirements to advance, you need to do a small formatting of advancements. Here is a link where you can find all advancements ( https://minecraft.gamepedia.com/Advancement )

    To add a new requirement you will need string like this: minecraft:NamespaceID where NamespaceID can be for example: story/root, story/mine_stone, ...

    Final string: minecraft:story/mine_stone



    If I forgot to cover anything or if there are any issues/questions with the plugin, feel free to post it here and I'll look into it as quick as possible ^-^
     

    Attached Files:

  5. Offline

    tage111



    I love the configuration file. It's just the way I envisioned it! Testing the plugin a bit now.

    Issues:
    [chest]Resetting:
    So I've tried the plugin out a little bit. Love it! But i noticed that when i change the config, and restart the server, my changes disappears.

    So this are the changes that i tried to do:
    Code:
    eras:
      ice_era:
        label: '&b[&9Ice Age&b]&r'
      wood_era:
        label: '&6[&2Wood Era&6]&r'
        requirements:
        - minecraft:story/root
      cobblestone_era:
        label: '&6[&7Cobblestone Era&6]&r'
        requirements:
        - minecraft:story/mine_stone
        - minecraft:story/upgrade_tools
        awards:
          item1:
            name: STICK
            amount: 2
          effect:
            name: STRENGTH
            duration: 60
            amplifier: 2
      stone_era:
        label: '&6[&8Stone Era&6]&r'
        requirements:
        - minecraft:adventure/root
        - minecraft:adventure/kill_a_mob
        awards:
          item1:
            name: APPLE
            amount: 1
          effect:
            name: STRENGTH
            duration: 60
            amplifier: 2
      iron_era:
        label: '&6[&fIron Era&6]&r'
        requirements:
        - minecraft:story/smelt_iron
        - minecraft:story/iron_tools
        awards:
          item1:
            name: IRON_NUGGET
            amount: 8
          effect:
            name: STRENGTH
            duration: 60
            amplifier: 3
      armored_era:
        label: '&6[&fArmored Age&6]&r'
        requirements:
        - minecraft:story/obtain_armor
        - minecraft:story/lava_bucket
        - minecraft:adventure/sleep_in_bed
        - minecraft:adventure/shoot_arrow
        - minecraft:story/deflect_arrow
        - minecraft:husbandry/root
        awards:
          item1:
            name: EXPERIENCE_BOTTLE
            amount: 2
          item2:
            name: BREAD
            amount: 4
          effect:
            name: STRENGTH
            duration: 60
            amplifier: 3
      villager_era:
        label: '&6[&eVillager Age&6]&r'
        requirements:
        - minecraft:husbandry/breed_an_animal
        - minecraft:husbandry/fishy_business
        - minecraft:husbandry/plant_seed
        - minecraft:husbandry/tactical_fishing
        awards:
          item1:
            name: EMERALD
            amount: 1
          effect:
            name: REGENERATION
            duration: 30
      magma_era:
        label: '&6[&cMagma Era&6]&r'
        reguirements:
        - minecraft:story/form_obsidian
        - minecraft:story/mine_diamond
        - minecraft:story/enter_the_nether
        - minecraft:nether/root
        awards:
          effect:
            name: FIRE_RESISTANCE
            duration: 60
            amplifier: 3
      gold_era:
        label: '&f[&6Gold Era&f]&r'
        requirements:
        - minecraft:nether/distract_piglin
        - minecraft:nether/return_to_sender
        - minecraft:nether/obtain_crying_obsidian
        awards:
          item1:
            name: GOLD_NUGGET
            amount: 8
          item2:
            name: COOKED_PORKCHOP
            amount: 2
      hell_era:
        label: '&6[&4Hell Age&6]&r'
        requirements:
        - minecraft:story/shiny_gear
        - minecraft:nether/find_bastion
        - minecraft:nether/find_fortress
        - minecraft:adventure/summon_iron_golem
        awards:
          item1:
            name: COOKED_PORKCHOP
            amount: 4
          effect:
            name: HEALTH_BOOST
            duration: 60
            amplifier: 5
      advanced_hell_era:
        label: '&6[&4Advanced Hell Age&6]&r'
        requirements:
        - minecraft:nether/obtain_blaze_rod
        - minecraft:nether/loot_bastion
        - minecraft:nether/charge_respawn_anchor
        - minecraft:nether/explore_nether
        - minecraft:nether/brew_potion
        - minecraft:nether/get_wither_skull
        award:
          item1:
            name: GOLDEN_APPLE
            amount: 1
          effect:
            name: SPEED
            duration: 60
            amplifier: 5
          effect:
            name: FIRE_RESISTANCE
            duration: 60
            amplifier: 4
      dark_era:
        label: '&6[&8Dark Era&6]&r'
        requirements:
        - minecraft:nether/obtain_ancient_debris
        - minecraft:nether/ride_strider
        - minecraft:nether/summon_wither
        - minecraft:nether/create_beacon
        - minecraft:adventure/voluntary_exile
        - minecraft:adventure/ol_betsy
        - minecraft:adventure/whos_the_pillager_now
        - minecraft:story/enchant_item
        - minecraft:story/cure_zombie_villager
        awards:
          item1:
            name: ENCHANTED_GOLDEN_APPLE
            amount: 2
          item2:
            name: WITHER_SKELETON_SKULL
            amount: 1
          item3:
            name: COOKED_PORKCHOP
            amount: 8
          effect:
            name: GLOWING
            duration: 60
          effect:
            name: NIGHT_VISION
            duration: 60
      trident_era:
        label: '&6[&bTrident Era&6]&r'
        requirements:
        - minecraft:adventure/trade
        - minecraft:adventure/throw_trident
        - minecraft:adventure/sniper_duel
        - minecraft:adventure/bullseye
        awards:
          item1:
            name: ARROW
            amount: 16
      piston_era:
        label: '&6[&2Piston Age&6]&r'
        requirements:
        - minecraft:husbandry/safely_harvest_honey
        - minecraft:husbandry/tame_an_animal
        - minecraft:husbandry/silk_touch_nest
        - minecraft:husbandry/obtain_netherite_hoe
        - minecraft:nether/netherite_armor
        - minecraft:nether/fast_travel
        awards:
          item1:
            name: HONEY_BOTTLE
            amount: 3
      ender_era:
        label: '&6[&dEnder Era&6]&r'
        requirements:
        - minecraft:story/follow_ender_eye
        - minecraft:story/enter_the_end
        - minecraft:end/root
        awards:
          effect:
            name: ABSORPTION
            duration: 120
            amplifier: 4
          effect:
            name: STRENGTH
            duration: 120
            amplifier: 5
          effect:
            name: GLOWING
            duration: 120
      rebellion_era:
        label: '&6[&5Rebellion Era&6]&r'
        requirements:
        - minecraft:end/kill_dragon
        - minecraft:end/dragon_egg
        awards:
          item1:
            name: DRAGON_EGG
            amount: 1
          effect:
            name: LUCK
            duration: 600
            amplifier: 5
      liberation_era:
        label: '&6[&5Liberation Era&6]&r'
        requirements:
        - minecraft:end/enter_end_gateway
        - minecraft:end/find_end_city
        - minecraft:end/elytra
        - minecraft:end/levitate
        awards:
          item1:
            name: SHULKER_SHELL
            amount: 1
      alchemy_era:
        label: '&1[&dAlchemy Era&1]&r'
        requirements:
        - minecraft:nether/all_potions
        - minecraft:end/dragon_breath
        awards:
          item1:
            name: ENCHANTED_APPLE
            amount: 8
          item2:
            name: END_CRYSTAL
            amount: 3
          effect:
            name: INVISIBILITY
            duration: 1800
      diamond_era:
        label: '&3[&l&bDiamond Era&r&3]&r'
        requirements:
        - minecraft:ether/uneasy_alliance
        - minecraft:nether/use_lodestone
        - minecraft:nether/all_effects
        - minecraft:end/respawn_dragon
        - minecraft:adventure/honey_block_slide
        - minecraft:adventure/hero_of_the_village
        - minecraft:adventure/kill_all_mobs
        - minecraft:adventure/totem_of_undying
        - minecraft:adventure/two_birds_one_arrow
        - minecraft:adventure/arbalistic
        - minecraft:adventure/adventuring_time
        - minecraft:adventure/very_very_frightening
        - minecraft:husbandry/bred_all_animals
        - minecraft:husbandry/complete_catalogue
        - minecraft:husbandry/balanced_diet
        awards:
          item:
            name: DIAMOND_BLOCK
            amount: 1
          effect:
            name: LUCK
            duration: 1800
            amplifier: 5
          effect:
            name: HERO_OF_THE_VILLAGE
            duration: 1800
            amplifier: 5
    data:
    But as I wroted earlier. All changes vanishes when I restart my server.

    [glass]Prefix not working:
    I don't seem to get the prefix either.

    Questions:
    1. If I want more than one effect, do I type effect on all of them or do I type effect1, effect2... and so on?

    2. Could you add so that the server broadcast when someone advance to a new era. An make editable in config maybe?
    What I mean with editble in config is that:
    There should be a standard broadcast if it is not defined with in an era, and this could be edited.
    Exemple:
    Code:
    broadcast:
      message: '%player% has advanced to %era%'
    And if it is defined for an era, Only that era displayes that broadcast when reached. The standard broadcast will of course be canceled for this era.
    Exemple:
    Code:
      stone_era:
        label: '&6[&7Stone Era&6]&r'
        broadcast: '%player% stepped into %era%'
        requirements:
        - minecraft:story/mine_stone
        - minecraft:story/upgrade_tools
        awards:
          item1:
            name: STONE_PICKAXE
            amount: 1
          item2:
            name: IRON_INGOT
            amount: 64
          effect:
            name: FIRE_RESISTANCE
            duration: 60
            amplifier: 3
     
    Last edited: Feb 2, 2021

Share This Page