CrazyVouchers

CrazyVouchers

Plugin

Want to make a paper that can give you an axolotl with a pretty firework display, Look no further!

Server AdventureGame MechanicsUtility

23.1k downloads
46 followers
Follow Save
Filter loader...
Filter versions...
Filter channels...
  • Fixed another issue with the LegacyColorMigrator.
  • Added new config option to vouchers.yml / vouchers folder
voucher:
  # The material.
  item: 'diamond_helmet'
  # An example of how to use custom model data
  custom-model-data: -1 
vouchers: # Where you make your vouchers.
  # The name of the voucher.
  money:
    # The material.
    item: 'diamond_helmet'
    # An example of how to use custom model data
    custom-model-data: -1
  • Added a new migrator type called VouchersDeprecated which at the moment only migrates old custom model data usage to the format above.
    • The condition to migrate is that item must follow the format diamond_helmet#1347
  • Fixed startup issue with old custom model data format i.e. diamond_helmet#1347
  • Added more verbose logging to all existing migrators.
  • Fixed issues with whitelist/blacklist checks.
  • Fixed issue with the migration messages not sending.

Please report any bugs to our GitHub issues tab!

https://github.com/Crazy-Crew/CrazyVouchers/issues

New Items section

I've made a new Items section which is currently in use in CrazyCrates, I am simply bringing it to CrazyVouchers.

You can experiment with this option by enabling it in your config.yml

  • The command /crazyvouchers migrate -mt NewItemFormat will update all Items section to the best it can.
    • The migration is one way, Please be wary of this and take backups.

Legacy Color Codes

Legacy color codes are no longer supported, They have been replaced by MiniMessage, https://docs.advntr.dev/minimessage/format

Migrate

Other migration types

We offer migration types for the following

  • VouchersDeprecated
    • Any deprecated option will be replaced/removed with this
  • VouchersNbtApi
    • Migrates old vouchers to new vouchers
  • VouchersSwitch
    • Switches between single and multiple files
  • VouchersRename
    • Renames voucher-codes.yml to codes.yml, This takes a backup of the previous file.

Permissions

Permissions are no longer the same, Permissions were renamed and the old nodes were always meant to be a temporary usage, This allows more control over what you can give a player.

/vouchers and /voucher are considered aliases for /crazyvouchers

Commands

New Old Command Aliases
crazyvouchers.giveall vouchers.admin /crazyvouchers giveall N/A
crazyvouchers.migrate vouchers.admin /crazyvouchers migrate N/A
crazyvouchers.reload vouchers.admin /crazyvouchers reload N/A
crazyvouchers.redeem vouchers.redeem /crazyvouchers redeem N/A
crazyvouchers.types vouchers.admin /crazyvouchers types /crazyvouchers list
crazyvouchers.help vouchers.admin /crazyvouchers help N/A
crazyvouchers.open vouchers.admin /crazyvouchers open /crazyvouchers admin
crazyvouchers.give vouchers.admin /crazyvouchers give N/A
crazyvouchers.access vouchers.admin /crazyvouchers N/A

Other

New Old
crazyvouchers.notify.duped vouchers.notify.duped
crazyvouchers.bypass vouchers.bypass

Other Changes

Trim Material

Before

voucher:
  # The items to give when claiming the voucher.
  items:
    - 'Item:DIAMOND_HELMET, Trim-Pattern:SENTRY, Trim-Material:QUARTZ, Amount:1'
    - 'Item:DIAMOND_CHESTPLATE, Trim-Pattern:DUNE, Trim-Material:REDSTONE, Amount:1'

After

voucher:
  # The items to give when claiming the voucher.
  items:
    - 'Item:DIAMOND_HELMET, Trim:SENTRY!QUARTZ, Amount:1'
    - 'Item:DIAMOND_CHESTPLATE, Trim:DUNE!REDSTONE, Amount:1'

Enchantments

New Old
protection PROTECTION_ENVIRONMENTAL
fire_protection PROTECTION_FIRE
feather_falling PROTECTION_FALL
blast_protection PROTECTION_EXPLOSIONS
projectile_protection PROTECTION_PROJECTILE
respiration OXYGEN
aqua_affinity WATER_WORKER
sharpness DAMAGE_ALL
smite DAMAGE_UNDEAD
bane_of_arthropods DAMAGE_ARTHROPODS
looting LOOT_BONUS_MOBS
sweeping SWEEPING_EDGE
efficiency DIG_SPEED
unbreaking DURABILITY
fortune LOOT_BONUS_BLOCKS
power ARROW_DAMAGE
punch ARROW_KNOCKBACK
flame ARROW_FIRE
infinity ARROW_INFINITE
luck_of_the_sea LUCK
  • No longer rely on ItemMeta anymore which means a large performance increase due to the nature of how ItemMeta works.
  • Commands have been overhauled which will make adding new commands easier!
  • Replaced plugin.yml with paper-plugin.yml.
  • Added support for item models which serves as a replacement for Custom Model Data
  • Fixed an issue with anti-craft not working.
  • Sounds are now mojang mapped, i.e. we use sounds from minecraft.wiki sounds.json, https://minecraft.wiki/w/Sounds.json
  • Updated to 1.21.8
  • Added new config option to fusion.yml, recursion_depth which lets you define how many folders to loop through in codes or vouchers
voucher:
  # Any generic component for the Item.
  components:
    # Hides the entire tooltip
    hide-tooltip: false
    # Hides components defined in this list. It allows more control than above.
    # Leave the hide-tooltip false if you plan to use this.
    hide-tooltip-advanced:
      - "enchantments"
    # The item model, Mojang introduced this in 1.21.4... this replaces custom model data!
    # Set this to blank for it to do nothing.
    item-model:
      # The namespace i.e. nexo
      namespace: ""
      # The key i.e. emerald_helmet
      key: "" 
  • Fixed an issue with dupe protection
  • Added /crazyvouchers migrate which will migrate old vouchers to the new vouchers
    • The permission for the command is crazyvouchers.migrate
  • Deprecated use of voucher.admin and voucher.redeem
    • They have been replaced by crazyvouchers.admin and crazyvouchers.redeem
    • Old permissions starting with voucher will work for the time being.
  • Deprecated old /voucher command, please use /crazyvouchers as /voucher will be removed in future updates.
  • Fixed an issue where dupe protection uuids were applied twice.

Update

  • Removed NBT API as warned previously since 3.8.
    • Previous vouchers created prior to 3.8 will be useless.
  • Updated to 1.21.4.

Changes:

  • Updated to 1.21.3
  • Bumped nbt-api
    • Please make an effort to migrate existing vouchers made prior to v3.8 as nbt-api will be removed.
    • This is a notice, to give you more time until that happens.

Changes:

  • Check if player is null on /voucher give, and return early.

Fixed:

  • The argument was not being applied to the voucher, due to checking if it was empty. We have to check if it's not empty.

Changes

  • Check if item is air everywhere, before going forward to please NBT-API

A fix, but not really a fix.

  • I simply told nbt-api to shut up about the material being air.

Notice:

  • Once 1.21.2 drops, NBT-API will be stripped from the plugin.
    • This is your warning to migrate old vouchers players have and technically the second warning, I forgot to push this update.
  • All old vouchers will stop working once NBT-API is removed!
  • The migration for old configurations has been removed.
    • If you need to migrate, use 3.7.4 as the migration works there.

Future Changes:

  • MiniMessage Support
    • There will be a migration from Legacy Color Codes -> MiniMessage
  • Updates to configurations with materials, sounds, and how items work
    • Internally, all materials, and trims will be handled internally, so need not worry about that.
    • Sounds will have to be migrated manually, not much I can do about that.
      • This change with sounds will allow custom sounds from resource packs.
  • This is a step in removing a large chunk of deprecated, or otherwise outdated ways of doing things as Minecraft has changed a lot internally.

Additions:

  • Added dupe protection for vouchers which is toggled false.
    • A config option was also added to append a line to the lore.

Changes:

  • Switched vouchers to use PersistantDataContainer which is much more performant, and achieves a similar goal.
    • Previous vouchers will work until 1.21.2, so please migrate them.
  • Allowed switching between file systems on /crazyvouchers reload
    • There will not be a migration to switch between.
  • Updated vital api

Fixes:

  • Fixed an issue on Folia #73

Changes:

  • Bumped to 1.21.1
  • Bumped nbt api

Fixed:

  • Issue with file manager not properly loading/reloading files.

Fixed:

  • Apply MaxStackSize to the player's inventory when using Player#addItem, so now instead of 99 items popping up in the inventory if giving 99 keys or any items, it'll split 64/35
    • Spigot for some odd reason made Player#addItem use the max stack size for the inventories. #hardforkwhen

Changes:

  • Simplified parsing messages internally with placeholders

Removed:

  • Migration for the old folder Vouchers -> CrazyVouchers

Changes:

  • Moved all i/o operations off the main thread.
  • Bumped nbt-api out of snapshot state to 2.13.1.
  • Added PlaceholderAPI support to all messages.

Fixed:

  • Issue with voucher-codes path not being correct in the codes folder.

Fixed:

  • Player Heads were not stacking previously, they should now.

Fixed:

  • Null pointer exception with HeadDatabaseAPI

Added:

  • Added support for HeadDatabaseAPI (the previous way of doing custom heads i.e. eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTVkMzE1NTkyNjFiM2U3OTAyNDc1MWZlMDdiNzExYzhmZWVmNTFkNTZjMDM2MzUyMjY5NTU4MDViYzQyODk0ZSJ9fX0= will be removed in the next major version of Minecraft.
voucher:
  # The material.
  item: 'PLAYER_HEAD'
  # The name of the item.
  name: '&cA player head example'
  # The lore of the item.
  lore:
    - '&7Use this voucher to get fancy trims.'
    - '&7&l(&6&l!&7&l) &7Right click to redeem.'
  # Only uncomment this if using HeadDatabase by Arcaniax
  skull: '61151'
  # The items to give when claiming the voucher.
  items:
    # Only uncomment this is using HeadDatabase by Arcaniax
    - 'Item:PLAYER_HEAD, Skull:61151, Name:&cA fancy head, Lore:&eA fancy lore,&7with lines, Amount:3, Glowing:true'

Fixed:

  • Issue with one of our dependencies #70

Project members

CrazyCrew

CrazyCrew

Organization

Details

Licensed MIT
Published 3 years ago
Updated a month ago