-
Notifications
You must be signed in to change notification settings - Fork 0
Cases
JuByteCase is a plugin for Minecraft servers that provides players with the ability to open "cases" containing various items or rewards.
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.
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.
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.
Here's a step-by-step guide on how to add a test case to the cases.yml configuration file in JuByteCase:
-
Open the
cases.ymlfile using a text editor. -
Create a new case under the existing cases. In this example, we will add a new case named "test".
test:- Specify the properties of the case. The properties include
visible,material,headValue,displayName,slot,lore, andcaseItems. Thevisibleproperty determines whether the case is visible in the case menu. Thematerialproperty specifies the material of the case. TheheadValueproperty specifies the custom head value of the case (use "none" if none is desired). ThedisplayNameproperty specifies the display name of the case. Theslotproperty specifies the slot where the case will appear in the case menu. Theloreproperty specifies the description of the case. ThecaseItemsproperty 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:- Define the items that can be obtained from the case using the
caseItemsproperty. Each item is defined under a numerical key starting from 1. For each item, specify its properties such asmaterial,displayName,itemLore,commands,enchantments,giveAsItem,amount,glow,announce,chance,checkHasAlreadyPermissions,checkPermissions,checkHasAlreadyRanks, andcheckRanks.
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: []- Save the
cases.ymlfile and restart the server to apply the changes. - 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.
- Open the cases.yml configuration file in a text editor.
- 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: []- Save the cases.yml file and restart the server/reload the plugin to apply the changes.
- 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.