Skip to content

Releases: Crazy-Crew/CrazyCrates

v5.2.0

Choose a tag to compare

@ryderbelserion ryderbelserion released this 18 Jul 00:50
197d840

Changes

  • Ability to add slot based items to the crate previews.
  • All instances where a crate is opened will now respect when you disable a world.
  • Settings.Border.Glass-Border.Air is now a config option.
    • If the value is set to false, AIR is not set to these slots which allows pagination to use the bottom row.
    • This is in unique scenarios where you never exceed 27 slots, and pagination effectively won't function properly.
  • Improved message handling internally.
  • Replaced ConfigMe with our own "copy-cat" system of it wrapped around Configurate
    • You will notice in the config.yml that comments are preserved, and there is extra lines added as result which I cannot change this currently!
    • Automatic migration for very old config files has not been coded yet.
    • The files will automatically apply comments, and add missing/new config options.
  • Improved location storage, and loading locations on startup. Existing locations should continue to work.
    • Locations are now stored with random uuids, which removes the need to weirdly increment a number like before.
    • If crate locations are broken, the names of them will be printed to console on startup or reload.
  • /crazycrates fix is now a command, and has replaced the automatic variant of fixing crate locations on startup.
  • Added {broken_locations} as a placeholder for /crazycrates list.

Crate Changes

Configuration Changes

All existing options in the config.yml will be respected first if they exist. You can find update examples in examples/crates for updated usage!

  • crate.knock-back in config.yml can now be configured per crate, and no longer is added to config.yml in new setups.
  • crate.disabled-worlds in config.yml can now be configured per crate, and no longer is added to config.yml in new setups.
  • crate.quad-crate.timer in config.yml can now be configured per crate, and no longer is added to config.yml in new setups.
  • crate.types.csgo.cycling-material in config.yml can now be configured per crate, and no longer is added to config.yml in new setups.
  • crate.types.csgo.finished-material in config.yml can now be configured per crate, and no longer is added to config.yml in new setups.
  • crate.keys.key-sound.toggle & crates.keys.key-sound.name in config.yml can now be configured per crate, and no longer is added to config.yml in new setups.

API Changes

CrazyCrates API has been bumped to 1.0.0

  • ISettings has been removed from the CrazyCrates API
    • You can rely on the ConfigManager class through CratesProvider#api()#getConfigManager(), but it is subject to be refactored at any point.
    • I did not like the impl of ISettings, and with how I do configurations. It's best to interface directly for now.
  • IServer is deprecated, and marked for removal. Please use CrazyCrates instead of IServer
    • IServer usage should still work(you will lack anything new). Please let me know if it doesn't

Known Issues

  • FireCracker is not working properly.

Removed

  • use-different-random has been removed from the config.yml as internally it did not make a difference.

Fixes

  • Fixed incorrect spelling of netherite_chestplate in the AdvancedExample.yml.
  • Fixed recursion depth not working in fusion.yml.
  • Fixed damage component being applied to an item when not told to.
    • This causes issues with plugins that prevent damaged items from interacting with their plugins.
  • No longer trying to action bar messages if the sender is console sender.
  • No longer allow people to constantly exit the editor mode
    • Adds a new message to tell the player they are not in editor mode.
  • No longer checking if the items of a prize are empty when running /crates debug .

What's Changed

Full Changelog: v5.1.0...v5.2.0

v5.1.0

Choose a tag to compare

@ryderbelserion ryderbelserion released this 18 Jul 00:50
a67e30e

Changes 🔨

  • Improved performance when checking placeholders via PlaceholderAPI
    • This has also lessened maintenace burden internally!
  • Improved updating the examples folder.
  • Removed LegacyItemBuilder as maintaining 2 ItemBuilders was not fun.
    • There should be no need to change configurations unless you use HideItemFlags: true
    • If you do use HideItemFlags, Click Me
  • Improved migration types by looping through the folders instead of the FileManager cache which led to unnecessary checks.
  • Improved verbose logging across the plugin.
  • Improved placeholder migrations in config migrator.
  • Improved /crazycrates teleport <crate_id>.
  • Improved placeholder parsing throughout the plugin.
  • Replaced {key_amount} from the not_enough_keys message with {amount}.
    • {key_amount} is no longer usable.
  • Placeholders that normally could've only been used in the DisplayName of items can now be used in DisplayLore as well.
  • Cleaned up code related to sending messages to the player, or broadcasting messages to the server.
  • Removed an unnecessary prize loop for Cosmic Crate, if we do the math right initially... we shouldn't need this.
  • Switched to using StringUtils#tryParseInt which uses an optional for better verbosity instead of Integer#parseInt.
  • Updated default configuration files.

Crate Changes

  • Improved tracking code for crates.
  • Improved performance & readability when building crate objects.
  • Improved performance when loading/adding crate locations.
  • Improved cleaning up crate tasks, and other caches when a crate opening ends.
    • This should fix a few other weird issues.

Key Changes

  • Fixed a logical issue with taking keys using /crazycrates mass-open or sneaking on QuickCrate after giving the prizes, it should be the other way around to minimize the free loot gain if something happens.
    • In addition to this, if they are keys not taken for any reason like your inventory being full, they should be refunded to you.

Crate Types

  • CrateOnTheGo now passes through the openCrate method, so things like Required Keys, and other features the other crates have are now respected.

Item Layout

  • By default, use-different-items-layout is set to true now.
    • Existing servers with an up-to-date config will not have to change anything.

Item Changes

  • Removed the option to configure the spawner preview.
    • This is pointless, because they all look the same in crate menus.
  • Updated glow configuration, Glowing now accepts values like "add_glow", "remove_glow", or "none"
    • Existing true/false should work, but you should update it as soon ass possible.

Removals

Permissions

  • Removed the use-new-permission-system toggle, and keep the original behaviour everyone liked.

Additions

Key Placeholders

  • Added shorthand formatting to key placeholders, so 1,000 would become 1k and so on.

Plugin Support

Note: replace <item_id> with the correct identifier from the custom item plugins.
Second Note: Any place you can input diamond_axe allows you to use this format.
Third Note: You can still use emerald_helmet as in direct ids as well

  • Added support for HMCWraps.
    • DisplayItem: hmcwraps@<item_id>
  • This introduces new formats for other plugins like Oraxen, Nexo, CraftEngine, and ItemsAdder
    • DisplayItem: nexo@<item_id>
    • DisplayItem: oraxen@<item_id>
    • DisplayItem: itemsadder@<item_id>
    • DisplayItem: craftengine@<item_id>

New Commands

  • Added /crates version which includes the git commit, previous git commit, and current version.
    • If any value is not found, it will return "N/A"

Other

  • Added custom item support in areas that didn't have it.
  • Added text shadow support for FancyHolograms.

Configuration Changes

Glowing

  • Glowing no longer is true/false, however existing configurations using true/false will still work as we look for that internally as well.
  # Should the item glow?
  # Available Types: add_glow, remove_glow, none
  Glowing: "none"

Hidden Components

If you are using Hidden-Components or Components in places, It has been replaced by flags.components, Existing configurations will still work.

Bugs Fixed 🐛

  • Fixed a bugs with incorrect messages being used for things, or variables in places.
  • Fixed a bug with the log method when the uuid is null causing a console error to appear.
  • getPrize not filtering out invalid weights properly leading to weird prize winnings.
    • We did the correct check for the totalWeight variable, but when looping through prizes. Prizes with -1 weight were still present.
    • If you add -1 to a value, it increases the value which can cause issues with prize chances.
    • Any value with 0.0, 0, or numbers less than 0 will be considered filler items.
  • Paginated guis creating a second page despite there not being enough items for it.
  • Log messages potentially not being saved.
  • Updated the ExcellentCrates migrator which fixed a few migration bugs
  • Fixed an important issue with /crazycrates transfer.
    • If you cannot update, I recommend denying the permission to use this command.
  • Fixed issues with /crazycrates take/give & /crazycrates mass-open by clamping the amount to be a required amount.
  • CMI in recent updates, whether it's CMI Lib or CMI API, in short. the API broke, and I forked it, compiled it, published it to my repo... and it seems to work for now
    • It seems I shall be maintaining it until the heat death of the universe.
      • #876
      • #9919 CMI's issue on Zrips repository that is closed by a stupid bot.
  • /crazycrates debug was not working properly.
  • Use correct variables when logging messages.
  • Fix multiple issues with custom heads/skulls not being built.
  • Use correct message when a player has no keys when doing /keys.
  • Fixed an issue with mass-open where if any of the rows were null, or the tiers were empty. the keys you would've spent would've been lost. They get refunded now.
  • Message responses when running commands not being sent to console.

What's Changed

New Contributors

Full Changelog: v5.0.0...v5.1.0

v5.0.0

Choose a tag to compare

@ryderbelserion ryderbelserion released this 14 Jan 21:54
4e9736f

Changes 🔨

New API

CrazyCrates API has been bumped to 0.9.0

A new class has been added.

Key Manager class, which allows you to check Items that players are holding.

You can fetch this by doing CratesProvider#get()#getKeyManager()

/**
 * A class for the KeyManager, It handles checking physical keys, and anything else we might need soon.
 *
 * @author Ryder Belserion
 * @version 0.9.0
 * @since 0.9.0
 */
public abstract class KeyManager<I> {

    /**
     * The default constructor for {@link KeyManager<I>}.
     *
     * @author Ryder Belserion
     * @since 0.9.0
     */
    public KeyManager() {}

    /**
     * Checks if the item is a valid key.
     *
     * @param item the ItemStack
     * @return true or false
     * @since 0.9.0
     */
    public abstract boolean isKey(@NotNull final I item);

    /**
     * Checks if an item matches another item.
     *
     * @param item the initial ItemStack
     * @param comparing the ItemStack to compare
     * @return true or false
     * @since 0.9.0
     */
    public abstract boolean isMatchingKey(@NotNull final I item, @NotNull final I comparing);

    /**
     * Gets the name of the crate the key belongs to.
     *
     * @param item the ItemStack
     * @return the name of the crate
     * @since 0.9.0
     */
    public abstract String getKey(@NotNull final I item);

}

Configuration changes

  • ChestLines has been renamed to Rows in the crate config files, 5eec53b
    • All existing configurations should continue to work, You can run /crazyrates migrate -mt CratesDeprecated to change this, or simply use Find and Replace.

Other Changes

  • Added the ability to customize the row/column of the back/next and menu button.
  • Added the ability to customize the CSGO animation to either have the top/bottom be static or dynamic. 95de51e
    • If you run /crazycrates migrate -mt CratesDeprecated, The existing options you need will generate.
    • Please refer to the examples/crates/CrateExample.yml folder for a full example of how to do it.
    • It supports the same structure as the new way to do items in the Items section which can be found on the documentation.
  • Run the command on click in the Crate Menu, instead of on open.
  • Added %chance% / %weight% to the prize/default message.
  • Added command syntax suggestions to all existing commands.
  • Return "N/A" if the file is empty, because files#getFirst() throws an error because no element found.
  • Utilize built in methods from CMI/DecentHolograms to handle coloring the messages for better compatibility with their plugins.
    • This will maybe also allow other plugin specific features like CMI's countless other features for holograms.
  • Remove the brackets from custom name for the item displayed above QuickCrate.
  • Fill the bottom border with air to prevent item overfill with the buttons.
  • Added toggle to disable opening tracking crate.

Bugs Fixed 🐛

  • Fixed an error with WonderCrate.yml on first install, because a prize was lacking an Items section.
  • Fixed a potential memory leak caused by using double brace initializers.
  • Fixed multiple bugs with PlaceholderAPI support.
  • Fixed a typo in CosmicCrateManager. #873
  • Fixed a typo with %crate_opened_raw%.
  • Fixed an issue with items dropping on Folia. #856
  • Fixed an issue by using #runNow instead of #run which calls the internal void method.
  • Fixed multiple issues with migration types.
  • Fixed multiple issues on Folia due to not using schedulers when needed.
  • Fixed an issue with potion color not applying with the new items section.
  • Fixed an issue with the shield banners using the new item format.
  • Fixed crates debug command.

As always, Report 🐛 to https://github.com/Crazy-Crew/CrazyCrates/issues

v4.10.5

Choose a tag to compare

@ryderbelserion ryderbelserion released this 02 Jun 02:25
d5dcb54
  • Added the prize display when opening FireCracker crate type.
  • Added the ability to hide components on items in the new Items section. (turn it on in config.yml)
    '1':
      DisplayName: <red>Diamond Helmet
      DisplayEnchantments:
      - protection:5
      - unbreaking:3
      # The item to display in the gui.
      DisplayItem: diamond_helmet
      # The amount to display in the gui.
      DisplayAmount: 1
      # The lore of the item.
      DisplayLore:
      - <gradient:#8fcfa0:#32a852>A gradient lore!
      # The chance to win i.e. 15%
      Weight: 15.0
      Items:
        1ca8f0ac:
          material: diamond_helmet
          # The name of the item.
          name: <red>Diamond Helmet
          # The configuration section for enchantments, minecraft: is not needed in front of the enchantment.
          # A list of enchantments https://jd.papermc.io/paper/1.21.4/io/papermc/paper/registry/keys/EnchantmentKeys.html
          # enchantment: amount
          enchantments:
            unbreaking: 3
            protection: 3
          # A list of components to hide.
          # https://jd.papermc.io/paper/1.21.5/io/papermc/paper/registry/keys/DataComponentTypeKeys.html, Grab the value from the description without minecraft:
          hidden-components:
            - "enchantments"
  • Fixed an issue with a try catch firing when it shouldn't.
  • Fixed a deprecation warning in the ExcellentCrates migrator.

Full Changelog: v4.10.4...v4.10.5

v4.10.4

Choose a tag to compare

@ryderbelserion ryderbelserion released this 29 May 17:37
1060438
  • Fixed a null pointer with the new Items layout.

Full Changelog: v4.10.3...v4.10.4

v4.10.3

Choose a tag to compare

@ryderbelserion ryderbelserion released this 29 May 17:37
e71fcdb
  • Fixed issue with player skulls not displaying correctly.
  • Tony stark built this in a cave with A BOX OF SCRAPS by @ryderbelserion in #852

Full Changelog: v4.10.2...v4.10.3

v4.10.2

Choose a tag to compare

@ryderbelserion ryderbelserion released this 29 May 17:36
db06d7e
  • Fix issue with the inventory titles not being colored. This issue only exists on 4.10.0 and 4.10.1.

Full Changelog: v4.10.1...v4.10.2

v4.10.1

Choose a tag to compare

@ryderbelserion ryderbelserion released this 29 May 17:36
07b13c1
  • Fixed #850 which was an issue with the examples folder loading.
    • If you still have issues, turn off update-examples-folder in the config.yml

Full Changelog: v4.10.0...v4.10.1

v4.10.0

Choose a tag to compare

@ryderbelserion ryderbelserion released this 29 May 17:36
60e6b85
  • Added authors to paper-plugin.yml

Full Changelog: v4.9.8...v4.10.0

v4.9.8

Choose a tag to compare

@ryderbelserion ryderbelserion released this 24 Apr 03:03
e70717c
  • Fixed an issue with ExcellentCratesMigrator

Full Changelog: v4.9.7...v4.9.8