Skip to content

Commit

Permalink
deprecate {key_amount} and replace it with {required_amount}
Browse files Browse the repository at this point in the history
{key_amount} will work until the next major version of Minecraft
  • Loading branch information
ryderbelserion committed Jul 25, 2024
1 parent 11b21b8 commit 4852b39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public void registerComments(CommentsConfiguration conf) {
@Comment("A list of available placeholders: {number}")
public static final Property<String> not_a_number = newProperty("crates.requirements.not-a-number", "{prefix}<gold>{number} <red>is not a number.");

@Comment("A list of available placeholders: {prefix}, {amount}, {key_amount}, {crate}")
public static final Property<String> required_keys = newProperty("crates.requirements.not-enough-keys", "{prefix}<gray>You need <red>{key_amount} <gray>keys to open <red>{crate}. <gray>You have <red>{amount}.");
@Comment("A list of available placeholders: {amount}, {required_amount}, {crate}")
public static final Property<String> not_enough_keys = newProperty("crates.requirements.not-enough-keys", "{prefix}<gray>You need <red>{key_amount} <gray>keys to open <red>{crate}. <gray>You have <red>{amount}.");

public static final Property<String> not_on_block = newProperty("crates.not-a-block", "{prefix}<red>You must be standing on a block to use <gold>{crate}.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void onRightClick(PlayerInteractEvent event) {
final Map<String, String> placeholders = new HashMap<>();

placeholders.put("{required_amount}", String.valueOf(requiredKeys));
placeholders.put("{crate}", crate.getPreviewName());
placeholders.put("{key_amount}", String.valueOf(requiredKeys)); // deprecated, remove in next major version of minecraft.
placeholders.put("{amount}", String.valueOf(totalKeys));
placeholders.put("{crate}", crate.getPreviewName());
placeholders.put("{key}", crate.getKeyName());
Expand Down

0 comments on commit 4852b39

Please sign in to comment.