Skip to content

Commit

Permalink
only open tier preview if it's one of these 2 crate types
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Jul 28, 2024
1 parent 741c587 commit 5a08a4c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.jetbrains.annotations.Nullable;
import com.badbones69.crazycrates.config.ConfigManager;
import com.badbones69.crazycrates.config.impl.ConfigKeys;
import us.crazycrew.crazycrates.api.enums.types.CrateType;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -91,7 +92,7 @@ public void loadButtons() {
public void openNewCratePreview(@NotNull final Player player, @NotNull final Crate crate) {
this.crateViewers.put(player.getUniqueId(), crate);

if (crate.isPreviewTierToggle()) {
if (crate.getCrateType() == CrateType.casino || crate.getCrateType() == CrateType.cosmic && crate.isPreviewTierToggle()) {
player.openInventory(crate.getTierPreview(player));

return;
Expand Down

0 comments on commit 5a08a4c

Please sign in to comment.