Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
6e983f6
[ci-skip] Update fusion api / feather plugin
ryderbelserion Jun 3, 2025
b032f89
[ci-skip] Update dependencies etc
ryderbelserion Jun 8, 2025
11aed21
[ci-skip] Fix hangar publish?
ryderbelserion Jun 12, 2025
f3c87cc
[ci-skip] Fix version application
ryderbelserion Jun 12, 2025
c430c46
[ci-skip] Remove useless workflow step
ryderbelserion Jun 12, 2025
1e0ecc8
[ci-skip] Add hangar publish tasks
ryderbelserion Jun 12, 2025
29f044d
[ci-skip] Remove toml version
ryderbelserion Jun 12, 2025
8be1368
Fix dropItem on Folia (#856)
Euphillya Jun 12, 2025
b1690a9
[ci-skip] Revert "[ci-skip] Fix version application"
ryderbelserion Jun 12, 2025
11da6e3
[ci-skip] We already know the plugin is crazycrates
ryderbelserion Jun 12, 2025
ac99438
[ci-skip] Add multiple links to publish webhooks
ryderbelserion Jun 12, 2025
a855257
[ci-skip] Update dl information to not be hardcoded
ryderbelserion Jun 14, 2025
5e4acb6
Fix crates debug command
ryderbelserion Jun 17, 2025
d567691
Fix re-location issue causing the plugin not to boot
ryderbelserion Jun 19, 2025
5169129
[ci-skip] fix hangar publish
ryderbelserion Jun 19, 2025
fa4ba52
Fix an issue with the shield banners using the new item format.
ryderbelserion Jul 6, 2025
0bcb7d0
Merge remote-tracking branch 'origin/dev' into dev
ryderbelserion Jul 6, 2025
3fd6d3e
Update fusion api
ryderbelserion Jul 13, 2025
96f86ae
Bump fusion api
ryderbelserion Jul 14, 2025
de922af
Add data.yml on startup
ryderbelserion Jul 14, 2025
e224ca8
Remove run files
ryderbelserion Jul 14, 2025
76625ba
Add toggle to disable opening tracking crate
ryderbelserion Jul 14, 2025
90da35b
Add final to exceptions
ryderbelserion Jul 14, 2025
304d53e
Remove dead imports / whitespace
ryderbelserion Jul 14, 2025
ad9b522
Clean up file logger impl
ryderbelserion Jul 14, 2025
7ef9d6f
Simplify logger checks
ryderbelserion Jul 14, 2025
d6f2ca0
Crate type is labeled as NotNull, because we fall back on CSGO crate …
ryderbelserion Jul 14, 2025
530c60b
Fix an issue in fusion api
ryderbelserion Jul 14, 2025
02ddd21
[ci-skip] fix hangar publishing
ryderbelserion Jul 14, 2025
b52485f
[ci-skip] bump gradle version
ryderbelserion Jul 14, 2025
5654508
Fix issue with potion color not applying with the new items section
ryderbelserion Jul 16, 2025
31b2b5f
Fix issue with additem command
ryderbelserion Jul 16, 2025
6e8e663
Fill the bottom border with air to prevent item overfill with the but…
ryderbelserion Jul 16, 2025
8894d22
Strip the crate name correctly when making the itemstack for the keys
ryderbelserion Aug 2, 2025
3d426ab
[ci-skip] Update dev build publishing
ryderbelserion Aug 25, 2025
7c3b2f2
Update session manager cache for QuadCrates
ryderbelserion Aug 26, 2025
aa29712
[ci-skip] Update dev build webhook again
ryderbelserion Aug 26, 2025
c828a8d
[ci-skip] Update webhooks again
ryderbelserion Aug 26, 2025
0e139f6
Added Folia support to every section I know of that was lacking Folia…
ryderbelserion Aug 26, 2025
3a4150b
Do not call the PlayerReceiveKeyEvent twice if the command is give-all
ryderbelserion Aug 26, 2025
92d21c5
[ci-skip] Move plugin manager calls up
ryderbelserion Aug 26, 2025
91a23cf
[ci-skip] chore: Update code style, a few nitpicks of things.
ryderbelserion Aug 27, 2025
55af5e1
Added folia scheduler to 2 locations related to command execution
ryderbelserion Aug 27, 2025
4241727
Remove the brackets from custom name
ryderbelserion Aug 27, 2025
13968e3
Utilize built in methods from CMI/DecentHolograms to handle coloring …
ryderbelserion Aug 27, 2025
ea710bf
Return "N/A" if the file is empty, because files#getFirst() throws an…
ryderbelserion Aug 27, 2025
e1530d1
Fix issue with the migrators due to FileType not being overridden pro…
ryderbelserion Aug 27, 2025
a81d617
Fix an issue by using #runNow instead of #run which calls the interna…
ryderbelserion Aug 28, 2025
c17ff63
[ci-skip] chore: janitor clean up
ryderbelserion Aug 28, 2025
5eec53b
Renamed `ChestLines` to `Rows` in the Crate config files.
ryderbelserion Sep 3, 2025
95de41e
Added ability to customize the csgo animation to either have the top/…
ryderbelserion Sep 3, 2025
91507b3
Condense the `if else` check by moving the isEmpty check into the loop.
ryderbelserion Sep 3, 2025
ecef83e
Added the ability to customize the row/column of the back/next and me…
ryderbelserion Sep 5, 2025
1fe6bde
[ci-skip] Update config.yml
ryderbelserion Sep 5, 2025
3af2d36
Add command syntax annotation to all commands
ryderbelserion Sep 5, 2025
bc92cef
Send message when a player uses too many or too few arguments
ryderbelserion Sep 6, 2025
68ecd37
Fixed issue with new crate files not being added on plugin reload
ryderbelserion Sep 13, 2025
1efdceb
Always break if the value is less than or equal to 0.0
ryderbelserion Sep 17, 2025
876f3a7
Fix typo in CosmicCrateManager (#873)
MelodyYuuka Sep 24, 2025
1e861ff
[ci-skip] Bump paperweight/minecraft version
ryderbelserion Sep 26, 2025
308f1c4
[ci-skip] Add maven publish for paper module
ryderbelserion Sep 26, 2025
0ac569e
[ci-skip] Update workflow files/gradle version
ryderbelserion Oct 3, 2025
a8e39c2
[ci-skip] Update build script
ryderbelserion Oct 3, 2025
66ecf2c
[ci-skip] Update build script
ryderbelserion Oct 3, 2025
8828d7f
[ci-skip] Remove zip jar task
ryderbelserion Oct 3, 2025
94d2e81
[ci-skip] Update api module
ryderbelserion Oct 3, 2025
47abcd7
[ci-skip] Update workflow once again
ryderbelserion Oct 3, 2025
1632234
[ci-skip] Combine core and paper module
ryderbelserion Oct 3, 2025
290522a
[ci-skip] Move maven-publish to api module
ryderbelserion Oct 3, 2025
7bdcb19
[ci-skip] Update buildscript again
ryderbelserion Oct 3, 2025
1b31448
[ci-skip] Update gradle files
ryderbelserion Oct 7, 2025
c0b8105
Fix an issue where players couldn't open crates by default due to non…
ryderbelserion Oct 12, 2025
faa838a
[ci-skip] Add webhook task when a build fails
ryderbelserion Oct 26, 2025
ca60f79
[ci-skip] Fix oraxen not being found
ryderbelserion Oct 26, 2025
f2c5fbd
Disable CMI Support temporarily as the API available seems not to mat…
ryderbelserion Oct 26, 2025
83b8484
[ci-skip] Update version name
ryderbelserion Oct 28, 2025
f99bb83
Add %chance% / %weight% placeholder to the prize/default message
ryderbelserion Oct 28, 2025
0bb5912
[ci-skip] Update build script
ryderbelserion Nov 10, 2025
b79c347
[ci-skip] Add more variables for the build script
ryderbelserion Nov 10, 2025
77e970c
[ci-skip] Fix build script
ryderbelserion Nov 10, 2025
6c580b1
Run the command on click with gui customizer, instead of on open.
ryderbelserion Nov 10, 2025
5a034a1
[ci-skip] Fix build script
ryderbelserion Nov 10, 2025
f8a5bee
[ci-skip] Update gradle version
ryderbelserion Nov 10, 2025
f3b9926
[ci-skip] Remove unused dependencies
ryderbelserion Nov 11, 2025
269fe42
[ci-skip] Update contributing.md
ryderbelserion Nov 11, 2025
e3d85d5
Update placeholder api support
ryderbelserion Nov 11, 2025
b269661
[ci-skip] Update CMI dependencies
ryderbelserion Nov 11, 2025
496e4d0
Allow server owners to manually pick CMI
ryderbelserion Nov 11, 2025
8232cd5
[ci-skip] Update default gui-customizer loadout
ryderbelserion Nov 11, 2025
94142a2
Remove legacy itembuilder completely
ryderbelserion Nov 12, 2025
131083f
Start updating to fusion 3.0.0
ryderbelserion Nov 12, 2025
65b83b1
Improve placeholder parsing
ryderbelserion Nov 13, 2025
a67d2b8
A bit of clean up
ryderbelserion Nov 13, 2025
e862f03
Update migrators
ryderbelserion Nov 13, 2025
861c056
Remove HideItemFlags option as it was useless
ryderbelserion Nov 13, 2025
7778f1a
Update /crate preview item impl by moving it under Preview.Display
ryderbelserion Nov 13, 2025
4e7cd40
Update item builder usage
ryderbelserion Nov 13, 2025
c0f09e9
Update example file loading
ryderbelserion Nov 13, 2025
355d682
Add extra constructor
ryderbelserion Nov 13, 2025
fd62797
Fix multiple issues
ryderbelserion Nov 14, 2025
1ef6553
Fix placeholder typo
ryderbelserion Nov 14, 2025
834e182
Remove item flag loop
ryderbelserion Nov 14, 2025
2806994
Fix multiple issues with items
ryderbelserion Nov 14, 2025
377cf15
Remove the ability to create a spawner as it no longer worked.
ryderbelserion Nov 14, 2025
745b978
Remove unnecessary prize loop
ryderbelserion Nov 14, 2025
0971d3c
Remove straggling spawner builder code
ryderbelserion Nov 14, 2025
ecd9acf
Update placeholders on prize messages/commands
ryderbelserion Nov 14, 2025
5cfc069
Add missing item reward to prize #2 on first startup
ryderbelserion Nov 14, 2025
2b95fd0
Enable different item layout by default now
ryderbelserion Nov 14, 2025
b375bf0
Fix the NewItemMigrator not getting the correct enchant levels.
ryderbelserion Nov 14, 2025
48a6bac
Remove almost all usage of replaceAll
ryderbelserion Nov 14, 2025
3ae8c0e
Add example of a potion prize with effects/color to CrateExample.yml
ryderbelserion Nov 14, 2025
ce9ac12
Merge branch 'dev' into big-change
ryderbelserion Nov 14, 2025
8feb32c
Update changelog.md
ryderbelserion Nov 14, 2025
66d457f
Merge remote-tracking branch 'origin/big-change' into big-change
ryderbelserion Nov 14, 2025
1816483
Reduce the changelog character count
ryderbelserion Nov 14, 2025
b92b47f
Fix placeholders requiring a player name
ryderbelserion Nov 15, 2025
2e73bce
Replace all double brace initializers with immutable maps, or new Has…
ryderbelserion Nov 15, 2025
b688093
Merge branch 'dev' into big-change
ryderbelserion Nov 15, 2025
1581bba
Fix merge conflicts
ryderbelserion Nov 15, 2025
b50110b
Merge main branch into big-change
ryderbelserion Jan 9, 2026
51bf288
Merge branch 'main' into big-change
ryderbelserion Jan 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ default File getDataFolder() {
/**
* Gets a list of crate files with the option to keep or remove the extension.
*
* @param keepExtension true or false
* @param removeExtension true means remove it, false means keep it
* @return {@link List<String>}
* @since 0.9.0
*/
List<String> getCrateFiles(final boolean keepExtension);
List<String> getCrateFiles(final boolean removeExtension);

/**
* Gets a list of crate files without the extension.
Expand Down
113 changes: 15 additions & 98 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,15 @@
## 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()

```java
/**
* 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](https://github.com/Crazy-Crew/CrazyCrates/commit/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](https://github.com/Crazy-Crew/CrazyCrates/commit/95de41e)
- 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.
- [6c580b1](https://github.com/Crazy-Crew/CrazyCrates/commit/6c580b1)
- 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.
- [76625ba](https://github.com/Crazy-Crew/CrazyCrates/commit/76625ba961367be51a75fc907faa75ad87676b79)

## 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](https://github.com/Crazy-Crew/CrazyCrates/commit/876f3a7)
- Fixed a typo with %crate_opened_raw%.
- [1ef6553](https://github.com/Crazy-Crew/CrazyCrates/commit/1ef6553)
- Fixed an issue with items dropping on Folia. [#856](https://github.com/Crazy-Crew/CrazyCrates/pull/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.
- [0e139f6](https://github.com/Crazy-Crew/CrazyCrates/commit/0e139f6)
- 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 an issue with the tier chance per prize not properly showing.
- Fixed crates debug command.

As always, Report 🐛 to https://github.com/Crazy-Crew/CrazyCrates/issues
## Changes
- Updated the remaining default internal placeholders to be wrapped in {} instead of %%, The previous placeholders using %% will still work.
- Removed all `HideItemFlag` options as we provide the ability to set Item Models which achieve the same result!
- Updated, and improved the migration types.
- Removed all old usage of the Legacy ItemBuilder.
- Removed the ability to create a Spawner with an entity type, It no longer worked. and Mojang provides a perfectly good command to create spawners.
- Removed unnecessary code that picked a prize 2,000+ times after it was already picked.

## Bug Fixed
- Fixed a bug where enchant levels were not being migrated properly.

## Configuration Changes
- Updated configuration for item displayed in /crates. You must run /crazycrates migrate -mt CratesDeprecated.
- `use-different-items-layout` if on a fresh install, is now true out of the box.
- The old `Items` section is now considered stale, receives no new updates, and will likely be removed.
186 changes: 93 additions & 93 deletions gradlew.bat
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions paper/src/main/java/com/badbones69/crazycrates/core/Server.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.badbones69.crazycrates.core;

import com.badbones69.crazycrates.core.impl.Settings;
import com.ryderbelserion.fusion.core.api.utils.FileUtils;
import com.ryderbelserion.fusion.core.FusionProvider;
import com.ryderbelserion.fusion.paper.FusionPaper;
import com.ryderbelserion.fusion.paper.files.PaperFileManager;
import org.jetbrains.annotations.NotNull;
import us.crazycrew.crazycrates.CratesProvider;
import us.crazycrew.crazycrates.api.KeyManager;
Expand All @@ -14,6 +16,10 @@

public class Server implements IServer {

private final FusionPaper fusion = (FusionPaper) FusionProvider.getInstance();

private final PaperFileManager fileManager = this.fusion.getFileManager();

private final Path path;
private final Path crates;

Expand Down Expand Up @@ -66,8 +72,8 @@ public void reload() {
}

@Override
public @NotNull final List<String> getCrateFiles(boolean keepExtension) {
return keepExtension ? FileUtils.getNamesByExtension("crates", this.path, ".yml") : FileUtils.getNamesWithoutExtension("crates", this.path, ".yml");
public @NotNull final List<String> getCrateFiles(final boolean removeExtension) {
return this.fileManager.getFileNames("crates", this.path, ".yml", removeExtension);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void registerComments(CommentsConfiguration conf) {
"",
"Take a backup before you run the migration as there may be bugs."
})
public static final Property<Boolean> use_different_items_layout = newProperty("root.use-different-items-layout", false);
public static final Property<Boolean> use_different_items_layout = newProperty("root.use-different-items-layout", true);

@Comment("Sends anonymous statistics to https://bstats.org/plugin/bukkit/CrazyCrates/4514")
public static final Property<Boolean> toggle_metrics = newProperty("root.toggle-metrics", true);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.badbones69.crazycrates.core.constants;

import com.ryderbelserion.fusion.core.FusionKey;
import java.util.List;

public class PluginSupport {

public static final FusionKey decent_holograms = FusionKey.key("crazycrates", "DecentHolograms");

public static final FusionKey fancy_holograms = FusionKey.key("crazycrates", "FancyHolograms");

public static final FusionKey cmi = FusionKey.key("crazycrates", "CMI");

public static final List<FusionKey> dependencies = List.of(
decent_holograms,
fancy_holograms,
cmi
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public enum Comments {
"The damage to apply to the item."
)),
glowing(List.of(
"Should the item glow?"
"Available Types: add_glow, remove_glow, or none.",
"None, or blank value means no state will be applied."
)),
amount(List.of(
"The amount of the item to give."
Expand Down Expand Up @@ -67,7 +68,7 @@ public enum Comments {
)),
enchantments(List.of(
"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",
"A list of enchantments https://jd.papermc.io/paper/1.21.10/io/papermc/paper/registry/keys/EnchantmentKeys.html",
"enchantment: amount"
)),
potions(List.of(
Expand Down
Loading