RandomBox
RandomBox
Adds the MysteryBoxes from Call of Duty to your Server!
Define items to be in a box. Then the items will shuffle and the user gets a random one.
(See pictures below for better understanding)
Idea from: shaqniak
Features:
- RandomBoxes from CoD on your Server
- Gives a player a random item from a list you defined
- Works with enchantments, item stacks, custom names and lores
- Payment via items or your economy system (e.g. iConomy, EssentialsEco, ...)
- Requires VAULT, if you use a non item economy system, to work!
Screenshots:
Video
Had to change the name from MysteryBox to RandomBox, so don't wonder.
Installation:
- Place RandomBox.jar in your plugins folder
- Restart the server
- Open the config.yml in the RandomBox folder
- Modify the base block, costs and shuffled items
- (Modify the chat messages)
- Restart your Server!
Config:
Should be self-explanatory.
# ID of the RandomBox base block: base_id: 33 # Money a player has to pay to use a MysterBox: price_for_usage: 50 # Amount of items to shuffle on the RandomBox: shuffles: 6 # [...] Message configuration [...]
Commands:
/randombox create
Makes the block you're looking at to a RandomBox (must have the ID you defined in the config)
Alias: /rb create
/randombox reload
Reloads the config.
Alias: /rb reload
/randombox additem
Adds the item in your hand to the items in RandomBoxes
Alias: /mbi add
Permissions:
randombox.create
Allows a player to create a RandomBox.
randombox.destroy
Allows a player to destroy a RandomBox.
randombox.reload
Allows a player to reload the config file.
randombox.use
Allows a player to use a RandomBox.
randombox.additem
Allows a player to add items to all RandomBoxes.
How to use:
- Open the config.yml and change settings to your needs.
- Place the block you defined as the RandomBox base block in the config.
- Run /randombox create or alias: /rb create
- Add the items in RandomBoxes by taking the item in your hand (can be enchanted or a stack) and running: /randombox additem or the alias: /rb additem
- If you right click the block now you should be withdrawn the price you defined in the config. Items start shuffeling then as often as you defined in the config and the last item added to your inventory.
Planned features:
=Implemented in next version
- Allow to use items as payment
- Support for custom item lores and names
- Changeable prefix and colours in messages
Any more suggestions, feel free to post a comment!
You like my work? I'd really appreciate a donation to buy some coke ;D
Has not worked since 1.8
Can you make this update fast 'Changeable prefix and colours in messages' fast because i'm building server and i need this Plugin :D ?
i dont think the message when you receive the item makes sense "What did you got" ?
Also is it possible to set a cooldown for a random box?
Very fun plugin, my players are happy with this, thanks you.
Can you add some features:
The money taken from the player goes to particular account. Enchanted items. Custom named items.
Todo pls this!
@traipop
Support for custom item names and lores will be implemented in the next update :)
if you could fix this for lored and customized items i would be so happy
hey this is an awesome plugin, problem is that it does not support item with lores which let me down alot
@Shnitzalcraft
I think I could make this for you but I won't implement it in the "official" version. By "compass selector" you mean an inventory with clickable items?
@masef21
Added this to the "planned features" list. Thanks for that idea :)
Is there any way your could possibly change this around a bit so that when a player clicks an icon in a compass selector (this one acts as a shop for a minigame), the player will recieve a random item from the list?
A suggestion that I have is the ability to change the message in all ways. Like, be able to choose what color the text is and the prefix for the message too. Just a thought.
@PanniCraft
i set shuffle to 10
@appletechandhelp
Which values did you use? I only get this error if I set the shuffles to zero.
@PanniCraft
I changed the random number, the economy number and the base layer.
@appletechandhelp
Did you change anything in the files? I tried it out again and it still worked for me. Which items did you add?
@PanniCraft
Yes items was added. I opened the chest and it spat every item out at me.
Then when i click again it said in use. And i then checked console and had that error.
@appletechandhelp
When do you get this error? Have you added some items?
01.05 06:47:32 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:283) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:628) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.scheduler.CraftTask.run(CraftTask.java:58) [spigot-latest.jar:git-Spigot-1446] 01.05 06:47:32 [Server] INFO at de.panni.mysterybox.MysteryBox$2.run(MysteryBox.java:446) [?:?] 01.05 06:47:32 [Server] INFO java.lang.ArrayIndexOutOfBoundsException: 7 01.05 06:47:32 [Server] WARN Task #428 for MysteryBox v1.0.0 generated an exception