🎰Loot System

Create exciting loot crates with animations and rewards!


Overview

The Loot System allows you to create randomized reward crates with different animation styles. Players can purchase or earn crates, then open them for a chance at various rewards with configurable rarity weights.


Animation Types

InfiniteShops supports three distinct loot animation types:

Type
Description

RANDOM

Instant random reward selection (no animation required)

MINESWEEPER

Minesweeper-style minigame where players click to reveal prizes

SLOT_MACHINE

Spinning slot machine animation


Creating Loot Crates

Basic Configuration

Loot configurations are stored in plugins/InfiniteShops/loot/:

# loot/loot.yml - Main loot configuration

# Animation type configuration
loot_shop_animation:
  animation_type: RANDOM  # RANDOM, MINESWEEPER, or SLOT_MACHINE
  animation_id: null  # Required for MINESWEEPER and SLOT_MACHINE

# Items that can be won
items:
  common_reward:
    material: IRON_INGOT
    amount: 16
    
  uncommon_reward:
    material: GOLD_INGOT
    amount: 8
    
  rare_reward:
    material: DIAMOND
    amount: 4
    
  legendary_reward:
    material: NETHERITE_INGOT
    amount: 1

RANDOM Animation

The simplest animation type - instantly selects a random reward.


SLOT_MACHINE Animation

Creates a spinning slot machine effect. Requires a separate animation configuration file.

Step 1: Configure Loot to Use Slot Machine

Step 2: Create Slot Machine Animation

Create a file in plugins/InfiniteShops/loot/slot/:


MINESWEEPER Animation

Creates an interactive minesweeper-style minigame where players click tiles to reveal prizes or bombs.

Step 1: Configure Loot to Use Minesweeper

Step 2: Create Minesweeper Animation

Create a file in plugins/InfiniteShops/loot/mine/:


Weight System

Weights determine the probability of each reward:

Example calculation with weights totaling 100:

  • Common (weight: 50): 50/100 = 50%

  • Uncommon (weight: 30): 30/100 = 30%

  • Rare (weight: 15): 15/100 = 15%

  • Legendary (weight: 5): 5/100 = 5%


Reward Configuration

Item Rewards

Reward with Commands


Opening Loot Crates

From Shop

Add loot crates to your shops using the COMMAND item type:

From Command


Commands

Command
Description

/ishop loot create <name>

Create new loot configuration

/ishop loot open <loot> [player]

Open a loot crate for a player

/ishop loot reload

Reload loot configurations


Loot Actions

Configure what happens when different animation types complete in loot/loot.yml:


Placeholders

Available placeholders for loot displays:


Display Items

Configure how each animation type appears in menus:


Permissions

Permission
Description
Default

infiniteshops.loot.admin

Admin loot commands

op

infiniteshops.loot.use

Use loot crates

true


Tips

  1. Balance weights carefully - Make rare items exciting but achievable

  2. Use appropriate animations - SLOT_MACHINE for excitement, RANDOM for quick rewards

  3. Add sound effects - Enhance the experience with audio feedback

  4. Test bomb ratios - For MINESWEEPER, ensure fair bomb/prize balance

  5. Broadcast rare wins - Creates server-wide excitement

Last updated