Skip to content
Justin_SGD edited this page Apr 29, 2023 · 3 revisions

Introduction to JuByteCase

JuByteCase is a plugin for Minecraft servers that provides players with the ability to open "cases" containing various items or rewards.

What are Cases?

In JuByteCase, a case is a virtual container that can be opened by players to receive random items or rewards. Each case has a set of items that can be obtained from it, and the chance of receiving each item can be configured by the server administrator.

Cases can be earned by players through various means, such as by completing quests, winning mini-games, or purchasing them from a server's in-game store.

How does JuByteCase work?

When a player opens a case, a virtual chest is displayed on their screen, and it will open and close randomly for a set amount of time. During this time, the player can see the items inside the chest, but cannot interact with them until the chest has fully opened.

After the chest has fully opened, the player will receive one or more items from the case, with the number and type of items being determined randomly based on the configuration set by the server administrator.

Conclusion

In summary, JuByteCase is a plugin for Minecraft servers that adds the ability for players to open cases and receive random rewards. Cases can be earned through various means and can be customized by server administrators to provide unique and exciting experiences for players.

How do add cases?

Here's a step-by-step guide on how to add a test case to the cases.yml configuration file in JuByteCase:

  1. Open the cases.yml file using a text editor.

  2. Create a new case under the existing cases. In this example, we will add a new case named "test".

test:
  1. Specify the properties of the case. The properties include visible, material, headValue, displayName, slot, lore, and caseItems. The visible property determines whether the case is visible in the case menu. The material property specifies the material of the case. The headValue property specifies the custom head value of the case (use "none" if none is desired). The displayName property specifies the display name of the case. The slot property specifies the slot where the case will appear in the case menu. The lore property specifies the description of the case. The caseItems property specifies the items that can be obtained from the case.

Here's an example of how to define the test case:

test:
  visible: true
  material: CHEST
  headValue: 'none'
  displayName: '&bTest Case'
  slot: 12
  lore:
    - '&7This is a test case.'
    - '&aLeft-click to open.'
  caseItems:
  1. Define the items that can be obtained from the case using the caseItems property. Each item is defined under a numerical key starting from 1. For each item, specify its properties such as material, displayName, itemLore, commands, enchantments, giveAsItem, amount, glow, announce, chance, checkHasAlreadyPermissions, checkPermissions, checkHasAlreadyRanks, and checkRanks.

Here's an example of how to define the items that can be obtained from the test case:

test:
  visible: true
  material: CHEST
  headValue: 'none'
  displayName: '&bTest Case'
  slot: 12
  lore:
    - '&7This is a test case.'
    - '&aLeft-click to open.'
  caseItems:
    '1':
      material: DIAMOND_SWORD
      headValue: 'none'
      displayName: '&bDiamond Sword'
      itemLore: []
      commands: []
      enchantments:
        - sharpness:5
      giveAsItem: true
      amount: 1
      glow: false
      announce: false
      chance: 50
      checkHasAlreadyPermissions: false
      checkPermissions: []
      checkHasAlreadyRanks: false
      checkRanks: []
      consolationPrizeCommands: []
  1. Save the cases.yml file and restart the server to apply the changes.
  2. Ingame or in the console type /case reload now. Now the new box is implemented. If this doesn't work, restart the server.

Note: You can add multiple items in a case by adding more items under the caseItems property.

How do add items to a case?

  1. Open the cases.yml configuration file in a text editor.
  2. Add a new case under the existing cases. In this example we will add three new cases to the existing "vote" case.
vote:
  visible: true
  material: CHEST
  headValue: 'none'
  displayName: '&6Vote'
  slot: 11
  lore:
   - '&7Du hast {case_amount} Truhe'
    - '&6'
    - '&aLinksklick &7zum Öffnen'
    - '&cRechtsklick &7zum Anschauen'
  caseItems:
    '1':
      material: DIAMOND_SWORD
      headValue: none
      displayName: '&bTest'
      itemLore: []
      commands: []
      enchantments:
       - sharpness:5
      giveAsItem: true
      amount: 1
      glow: false
      announce: false
      chance: 70
      checkHasAlreadyPermissions: false
      checkPermissions: []
      checkHasAlreadyRanks: false
      checkRanks: []
      consolationPrizeCommands: []
    '2':
      material: NETHERITE_SWORD
      headValue: none
      displayName: '&bOP'
      itemLore: []
      commands: []
      enchantments:
       - sharpness:10
       - unbreaking:3
       - mending:1
       - looting:3
       - fire_aspect:2
      giveAsItem: true
      amount: 1
      glow: true
      announce: true
      chance: 1
      checkHasAlreadyPermissions: false
      checkPermissions: [ ]
      checkHasAlreadyRanks: false
      checkRanks: [ ]
      consolationPrizeCommands: []
    '3':
      material: DIAMOND_SWORD
      headValue: none
      displayName: '&7Test'
      itemLore: []
      commands: []
      enchantments: []
      giveAsItem: true
      amount: 1
      glow: false
      announce: false
      chance: 29
      checkHasAlreadyPermissions: false
      checkPermissions: [ ]
      checkHasAlreadyRanks: false
      checkRanks: [ ]
      consolationPrizeCommands: []
    '4':
      material: DIAMOND_BLOCK
      headValue: none
      displayName: '&6Diamond Block'
      itemLore: []
      commands: []
      enchantments: []
      giveAsItem: true
      amount: 5
      glow: false
      announce: false
      chance: 50
      checkHasAlreadyPermissions: false
      checkPermissions: [ ]
      checkHasAlreadyRanks: false
      checkRanks: [ ]
      consolationPrizeCommands: []
  1. Save the cases.yml file and restart the server/reload the plugin to apply the changes.
  2. After restarting the server/reloading the plugin, players will now be able to obtain the new items you added to the vote case. In this example, the vote case now has three new items: a Diamond Sword with Sharpness V, an enchanted Netherite Sword with a glow effect and an announcement message, and another Diamond Sword with a lower chance of being obtained.

Note: When defining the chance property for an item, keep in mind that the chances for all items in the case must add up to 100. If the chances do not add up to 100, the plugin will automatically adjust the chances so that they do.

Clone this wiki locally