Skip to content

3.10 - An Early Christmas

Latest
Compare
Choose a tag to compare
@ZakShearman ZakShearman released this 06 Dec 13:07
· 126 commits to master since this release

BattlePass 3.10 - An Early Christmas

Go here if you want working hyperlinks. GitHub releases are horrid.
Added:

Fixes:

  • Redid a lot of the quest pipeline - cleaner and more efficient now.
  • holding.item variable will now be none if the player is not holding an item.
  • use-improved-tier-points added to fix an off case where maybe points didn't work as expected by default. (When disabled, the points specified on tier 2 are those to reach tier 3, not those to reach tier 2).
  • Fix executing certain command actions async causing errors.
  • PAPI placeholders finally work in menus!
  • Recoded daily quest reset - no longer affected by server lag.

Details & Config Changes

Convert Excess Points Into Currency

This feature allows you to make excess points be converted into currency. E.g if you have a total of 7800 points for every point over 7800 points they will be given the specified amount of currency. There is support for both an internal system (using PlaceholderAPI + commands to add/remove money) and directly into vault for support with other plugins.

Config Changes:

plugins/BattlePass/settings.yml

reward-excess-points: # If set to vault, Vault & an economy plugin is required. If set to internal, no other plugins are required.
  method: none # Set this to none, vault or internal. If it's internal, the value will be stored within BattlePass and you must use commands to add/remove and placeholders to get.
  currency-per-point: # The amount of currency given per every excess point.
    free: 50
    premium: 100

Base64 and Username Head Support

Anywhere the material: X flag is used you can now specify a head using a username or using the Base64 texture.

Tip for base64: You want the Value section from the textures if you're getting the base64 from a /give command. minecraft-heads is a good website for getting these heads.

Permission Node to Disable BattlePass for Specific Users

Added this version you can give users the battlepass.block permission to block them from using the BattlePass. It must be enabled in the settings.ymland the player must not be OP.

Config Changes:

plugins/BattlePass/settings.yml

enable-ban-permission: false # Enables the battlepass.block permission which blocks users from using the battlepass.

Per Tier Reward Menu Items

In the free.yml and premium.yml you can already specify the locked-tier-item, unlocked-tier-item, claimed-tier-item, etc... Now you can do this individually for each tier. They must be inserted under the section for X tier in the free.yml & premium.yml (the old items section will act as a fallback. If a tier doesn't have an item specified, it'll use the one for that pass).

Example From the New premium.yml:

tiers:
  '2': # The tier number
    rewards: ['1'] # The reward numbers to give to the player (see rewards.yml).
    required-points: 120 # The amount of points the player must get to advance to the tier.
  '4':
    rewards: ['4', '2']
  '10':
    rewards: ['1', '2', '3', '4']
    required-points: 500
    locked-tier-item: # You can specify any of the items in the 'items' section above per tier. They're completely optional for each tier.
      material: 'barrier:0'
      name: '&eTier %tier%'
      lore:
        - ''
        - '&7Rewards:'
        - '%lore_addon%'
        - ''
        - '&7Status: &cSpecial Locked Item'

The Playtime Quest

The playtime quest type has been added. Since it uses a scheduled task, to remove any unnecessary performance defects, it must be enabled via the settings.yml. See the description of the quest type here.

Config Changes:

plugins/BattlePass/settings.yml

enable-play-time: false # Switch this to true if you're going to use a playtime quest.

Example Quest Usage:

1: # Quest id
  name: 'Week 5 - Insomnia' # Name used in quest messages.
  type: playtime # Type must be playtime here
  variable: none # Variable for playtime must be none
  required-progress: 86400 # The user must play for 86400 seconds, equivalent to 24 hours.
  points: 200 # User is rewarded with 200 points for completion
  item: # The item that will be displayed in menus.
    material: diamond_pickaxe:0
    amount: 1
    name: '&eInsomia'
    lore:
      - '&7Get &a1 day &7of playtime'
      - ''
      - '%progress_bar% &7(&a%percentage_progress%&7)'

Permanent Daily Quests

You can now specify that a specific daily quest will be selected every day. It will still have its progress reset.

Config Changes:

plugins/BattlePass/settings.yml

permanent-daily-quest-ids: [] # ['1', '3', '5']

Example Usage:

permanent-daily-quest-ids: ['1', '3', '5']

It's important to remember that these use the IDs not the names of the quests. This is the quest ID:

The close-on-claim Option for Rewards

With the close-on-claim option added to the rewards.yml menu file, you can now make the menu close when they click to claim a reward. This of course only works if they don't automatically receive rewards.

Config Changes:

plugins/BattlePass/menus/rewards.yml

close-on-reward-claim: true # If set to true, the menu will be closed when a reward is claimed

The dont-give-premium-free-rewards Option

This option allows you to make it so that users with the premium battlepass will only receive premium rewards. This requires a config change.

Config Changes:

plugins/BattlePass/passes/free.yml

dont-give-premium-free-rewards: false

Boss Bar Support

You can now enable a boss bar to display quest progress & completion. This requires quite a few config changes and also bear in mind, there are more options available on 1.9+ server versions. Don't forget the lang.yml changes

Config Changes:

plugins/BattlePass/settings.yml

boss-bar:
  enabled: true
  persistent: false # If true, the boss bar will always be displayed after it's displayed once (it will never hide after shown)
  hide-after: 5 # How long to show the boss bar after a quest is progressed (IN SECONDS). If persistent, this setting does not apply
  use-notify-percentages: true # If true, the boss bar will only be shown when one of the progression thresholds is reached
  disabled-quest-types:
    - 'fly'
    - 'glide'
    - 'sneak'
    - 'walk'
    - 'sprint'
    - 'move'
  # 1.9+ settings ONLY
  color: PINK # must be a color from https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarColor.html and in all caps
  style: SOLID # must be a style from https://hub.spigotmc.org/javadocs/spigot/org/bukkit/boss/BarStyle.html and in all caps

plugins/BattlePass/lang.yml

quests: # This section already exists, you just need to add the sub values
  boss-bar-message-progressed: "&7&e%quest_name% Quest Progressed &8(&e%progress%&7/&8&e%required_progress%&8)"
  boss-bar-message-completed: "&7&e%quest_name% Quest Completed"
daily-quests: # Same applies here
  boss-bar-message-progressed: "&7&e%quest_name% Quest Progressed &8(&e%progress%&7/&8&e%required_progress%&8)"
  boss-bar-message-completed: "&7&e%quest_name% Quest Completed"

Using RGB On Leather Items

Within menus you can now specify items that have RGB via adding an rgb section to the config (this only works if the item is leather).

Example:

material: leather_boots:0
rgb: 100, 100, 100