Skip to content
Justin_SGD edited this page Feb 1, 2026 · 4 revisions

Introduction to JuByteCase Cases

In JuByteCase, a case is a virtual container that players can open to receive random rewards.

A case can be opened either:

  • via the case menu (/case)
  • via a CaseBlock placed in the world (/case setcaseblock <material>)

Players can also preview a case’s possible rewards.


Recommended: manage cases in-game

JuByteCase now provides an in‑game editor:

  • /case edit → create, edit, and manage cases
  • /case rarity → manage rarities (optional system)

YAML editing is still possible, but the editor is the recommended workflow.


Case structure (cases.yml)

Each case has:

  • visible (true/false)
  • material (Item icon)
  • headValue (for PLAYER_HEAD icons)
  • displayName
  • slot (menu slot)
  • lore (menu lore)
  • caseItems (reward list)

Example:

vote:
  visible: true
  material: CHEST
  headValue: none
  displayName: '&6Vote'
  slot: 11
  lore:
    - '&7Du hast {case_amount} Truhe'
    - '&aLinksklick &7zum Öffnen'
    - '&cRechtsklick &7zum Anschauen'
  caseItems:
    '1':
      material: DIAMOND_SWORD
      headValue: none
      displayName: '&bTest'
      itemLore: []
      commands: []
      enchantments:
        - sharpness:5
      potionEffect: []
      giveAsItem: true
      amount: 1
      glow: false
      announce: false
      firework: false
      chance: 70
      rarity: ''        # optional, see rarities.yml
      drawCount: -1     # -1 = unlimited, 0 = disabled, >0 = global remaining draws
      checkHasAlreadyPermissions: false
      checkPermissions: []
      checkHasAlreadyRanks: false
      checkRanks: []
      consolationPrizeCommands: []

CaseItem fields (current)

Reward / Item

  • material – Bukkit material name
  • headValue – for PLAYER_HEAD (Base64 texture), otherwise none
  • displayName, itemLore
  • amount
  • giveAsItem – if true: give the built item to the player
  • commands – commands executed on win

Effects

  • enchantments – list of minecraft_key:level (e.g. sharpness:5)
  • potionEffect – list of effect:duration:amplifier (e.g. speed:60:1)
  • glow – adds a hidden enchant to make the item glow
  • announce – broadcast a win message
  • firework – launch a firework on win (if enabled per item)

Chance / rarity

  • chance – numeric chance weight
  • rarity – optional; if rarities are enabled, the item’s chance will be taken from the configured rarity

Limits

  • drawCount
    • -1 → unlimited
    • 0 → item gets removed/ignored
    • >0 → each time the item is drawn, the value is reduced by 1 and stored back into cases.yml
      • when it reaches 0, the item will be removed from the case pool

“Already owned” checks / compensation

  • checkHasAlreadyPermissions + checkPermissions
  • checkHasAlreadyRanks + checkRanks
  • consolationPrizeCommands – commands executed when the player already owns the reward

Notes

  • Chances are used as weights (not necessarily “must sum to 100”).
  • If Rarities are enabled, chances can be managed via rarities.yml instead.

JuByteCase Wiki

Plugin Usage

Setup

API

Clone this wiki locally