[MECH] Mystery Box v1.4 - Create Mystery Box's Like In COD Zombies [935]

Discussion in 'Inactive/Unsupported Plugins' started by Jayjay110, May 31, 2011.

  1. Offline


    Mystery Box - Create Mystery Box's Like In COD Zombies!:

    Current Version: 1.4

    Basically this plugin allows you to create Mystery Box's like in black ops zombies etc. To use a Mystery Box right or left click it twice within 2 seconds and you can buy a random item that you specify in the config file. One thing you will notice is there are probabilities, technically the only way they become probabilities if all the items probabilities in the config file, add up to 100%, else it will just create a random guess will close probabilities but not direct ones.

    Mystery Box's are Chests! (Just so you know lol :p)

    To use type /mb or /mysterybox it doesnt matter:
    /mb create <name> - This creates Mystery Boxes, type this then place or click on a chest
    /mb remove - Toggles Removing Mode
    /mb toggle - Globally toggles Mystery Box's On and Off (Still protects Mystery Boxes from breaking)
    /mb list - List all Mystery Box's

    • Allows you to create Mystery Box's
    • Permissions
    • iConomy 4 & 5 Support
    • BOSE Economy Support
    • Essentials Economy Support
    • Op Defaulting
    • Console command support (Toggle only!)
    • Config File Support
    • MySQL and SQLite Support
    • Multi-World Support
    • Saving and Loading of different items to use
    • Automatic Config Generation
    • Cool lightning effect on purchase
    • Ability to modify price, items, amounts and probabilities :D Special thanks to @garbagemule who helped me with doing the items :D
    • Auto-Updating Built in :)
    • Choice to enable or disable lightning effect!
    • Customizable messages! (Includes the colour coding system :D!)
    • When you are in range of a mystery box you get a delightful message :p
    • Enabling or Disabling Economy / Permissions
    • Allows you to set the box's access to free

    Default Config (Generates Automatically!) (open)

    Enabled On Startuptrue
    ?: false
    Use An Economy Plugin?(False means everythings free!): false
    Item Velocity
    Database Settings
    Lightning Effect
    ?: false
    'You do not have enough money, you need: ''§cYou do not have enough money, you
            need: '
        'Creation of Mystery Box''s - Started! Name: '
    '§bCreation of Mystery Box''s
            - Started! Name: '
    Creation of Mystery Box's - Stopped!: §cCreation of Mystery Box'Stopped!
    'Creation of Mystery Box''s - Complete! Name: ''§aCreation of Mystery Box''s
            - Complete! Name: '
    Removing of Mystery Box's - Started!: §bRemoving of Mystery Box'Started!
    Removing of Mystery Box's - Stopped!: §cRemoving of Mystery Box'Stopped!
    You have successfully removed a Mystery Box!: §cYou have successfully removed a Mystery Box!
    You forgot to specify a name for the Mystery Box!: §cYou forgot to specify a name for the Mystery Box!
    Your Mystery Box name may not contain spaces!: §cYour Mystery Box name may not contain spaces!
    That block is already a Mystery Box!: §cThat block is already a Mystery Box!
    There is already a Mystery Box with that nameplease choose another!: §cThere is already a Mystery Box with that nameplease choose another!
    Stop Creating Mystery Box's First!: §cStop Creating Mystery Box's First!
    Stop Removing Mystery Box's First!: §cStop Removing Mystery Box's First!
    'To Create Mystery Box''s Type: ''To Create Mystery Box''s Type: '
        'To Toggle The Mystery Box''s Plugin Type: '
    'To Toggle The Mystery Box''s Plugin
            Type: '
        'To Remove Mystery Box''s Type: '
    'To Remove Mystery Box''s Type: '
        'You just got the item: '
    '§aYou just got the item: '
        'For: '
    '§aFor: '
        'You are currently near the Mystery Box: '
    '§aYou are currently near the Mystery
            Box: '
        'Hit the box again to confirm your purchase! (It costs: '
    '§bHit the box again
            to confirm your purchase! (It costs: '

    Permissions (open)

    • MysteryBox.Toggle - Gives access to /mb toggle
    • MysteryBox.Create - Gives access to /mb create
    • MysteryBox.Remove - Gives access to /mb remove
    • MysteryBox.Use - Gives access to using Mystery Boxes
    • MysteryBox.List - Gives access to /mb list


    Source Code

    Todo (open)

    Bugs (open)

    • No permissions, when permissions isn't enabled!
    • Null pointer on player interact :3
    • Command errors
    • Permission errors
    • Stupid block got destroyed by non permission players
    • Hashmap concurrent error thingy Thankyou to @rcjrrjcr for helping on this :D

    Version 1.4:
    • Fixed a silly bug on block breaking
    • Added free box use
    • Added economy and permission choice
    • Added item velocity fun!
    • Small code fixes
    Version 1.3:
    • Fixed tons of bugs
    • Added Auto-Updating script
    • Support for Bose Economy and Essentials Economy
    • More Options
    Changelog (Long) (open)

    Version 1.4:
    • Fixed a silly bug on block breaking
    • Added free box use
    • Added economy and permission choice
    • Added item velocity fun!
    • Small code fixes
    Version 1.3:
    • Fixed tons of bugs
    • Added Auto-Updating script
    • Support for Bose Economy and Essentials Economy
    • More Options
    Version 1.2:

    • Fixed Null pointer exception :p
    Version 1.1:

    • Fixed No Permissions bug
    Version 1.0:

    • Initial Release
    rdemanta, NEO and kahlilnc like this.
  2. Offline


    ALOT of work to do xDD
  3. Offline


    For me, lol yeah, for a good dev, not so much lol
  4. Offline


    Would it be compatible if you did have iConomy?
  5. Offline


    He changed it so that you just need an economy plugin to use it. If I'm correct, you need essentials economy, iConomy, or BOSEconomy.
  6. Offline


    2011-06-21 23:11:16 [SEVERE] Error occurred while enabling MysteryBox v1.4 (Is it up to date?): null
    at com.servegame.n1p.MysteryBox.MysteryBox.loadBlocks(MysteryBox.java:393)
    at com.servegame.n1p.MysteryBox.MysteryBox.onEnable(MysteryBox.java:83)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    And BTW, could you add an option for the auto updates?
  7. Offline


    no I changed it so u dont need One :)

    Your blocks are corrupt, and yes i will update it soon, btw idk how its corrupt im working on the new version so i wont be talking alot in the next couple of days
  8. Offline


    I know you're in work but how can I "uncorrupt" my blocks....?
  9. Offline


    Ohhhh, right! So...I was close at least. I was thinking of the previous version. Oh well. Thanks for the plugin though. I finished my zombies arena and made it a lot better, too. I added the golden revive plugin to act as "quick revive" mixed in with this, door shield, eggrenade, mob arena, archers, and essentials. Thanks so much for the plugin, it completed my arena!

    Oh, I just read the seventh post before this one. I actually have mob bounty installed but never use the commands and I haven't made any new mystery boxes recently. An idea i have is to just change the command to something like /myb so it won't conflict. I really doubt any other plugin would have a command like that.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  10. Offline


    What i am trying to do is make it so you can change the commands you use by setting them in the config file, i know that some people have tried this now im trying to figure it out...

    I dont know how they got corrupt, but in the next version anyway youll have to re-create them, im sorry for this..., but if you want a temporary fix, send me either the sqllite file with your blocks in it or the mysql file, ill see if i can fix it :)
  11. Offline


    Nah that's fine I only got one Mystery box :p
  12. Offline


    This is an insanely awesome plugin!
  13. Offline


    That's wonderful list :)
    Can I ask a little more (or maybe already included but IDK). Could you please have a config to choose "automatic checking for update" on or off.
    Don't know why it took like 10 minutes to check for update.
  14. Offline


    yeah I was going to do that lol soz :3 forgot to add to do the list :p
  15. Offline


    Any news on this plugin? Is it support 953?

    Thanks for reply.
  16. Offline


    wait, i dont understand, do you HAVE to use iconomy money? like cant u use 5 slime balls for 1 use?
    if so, can u tell me how?
  17. Offline


    Im updating it, its in progress, dont bug me lol jkes, um check first post, u have to use an economy if u dont want em to be free, im updating it so yea, look here: http://forums.bukkit.org/threads/me...e-in-cod-zombies-935.19342/page-4#post-401041
  18. Offline


    Get this when using /mb remove.

    08:19:55 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'mb' in plugin MysteryBox v1.4
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at org.bukkit.craftbukkit.TextWrapper.wrapText(TextWrapper.java:34)
        at net.minecraft.server.NetServerHandler.sendPacket(NetServerHandler.java:628)
        at org.bukkit.craftbukkit.entity.CraftPlayer.sendRawMessage(CraftPlayer.java:92)
        at org.bukkit.craftbukkit.entity.CraftPlayer.sendMessage(CraftPlayer.java:96)
        at com.servegame.n1p.MysteryBox.MysteryBox.toggleRemoveState(MysteryBox.java:274)
        at com.servegame.n1p.MysteryBox.MysteryBox.checkState(MysteryBox.java:235)
        at com.servegame.n1p.MysteryBox.MysteryBox.commandChecker(MysteryBox.java:165)
        at com.servegame.n1p.MysteryBox.MysteryBox.onCommand(MysteryBox.java:114)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
  19. Offline


    looks nice! you should talk to the creator of mobarena and make a points system like in COD zombies!!!
  20. Offline


    It's not working for me, can you please help me?
    It's working but it's not giving me any items, like i can create the box, it says it exists, then i double right click and nothing, please help it sounds sweet :D
  21. Offline


    this is great and all, however, im not sure if its just me, but it seems like one day itll only hand out like 3 different things, then another day, another 3. ive had it give me really common then uncommon things over and over and nothing else as common / uncommon even showed up once (i used it over and over and over with my 132,234,234,234 dollars)
  22. Offline


    I i get this whenever i try to use a mystery box:

    2011-07-23 02:41:26 [SEVERE] Could not pass event PLAYER_INTERACT to MysteryBox
    java.lang.IllegalArgumentException: Task cannot be null
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleAsyncRepeatingTask(CraftScheduler.java:231)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleAsyncDelayedTask(CraftScheduler.java:219)
        at com.servegame.n1p.MysteryBox.MysteryBoxPlayerListener.onPlayerInteract(MysteryBoxPlayerListener.java:100)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:457)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
  23. Offline


  24. Offline


    Is there any chance of the plugin saving each mystery box individually so that each one can be configured individually? I really wanted to make a chest that give random armor, one for random weapons, one for random food, and so on.

    I made a couple boxes to see if it added extra config's and it didn't, so I guess all boxes get the same probabilities and items.

    Any chance you could change this eventually? Seems like it would make the plugin even more useful and fun, and seems pretty simple to make each box create a default config with it's name and refer back to it for settings rather than the over all config.
  25. Offline


    @Jayjay110 i really need this because im making cod black ops zombies and i have yet to find a mystery box like yours, so please update to 953 or 1000 (Minecraft 1.7.3)
  26. Offline


    Whats the id of slimeballs ? :D
  27. Offline


    Google it lol

    For everyone else, man... its taking long because a) I have been waiting for 1.8 to come out, I ceebs doing it twice, and b) I am re-writing all the code to make it neater and fit the list of recommended items :)
  28. Offline


    No, I meant what should it be called in the config? or I can just use the id#?
  29. Offline


    umm its called Slime_Ball :) i havnt added the ID support yet :p
  30. Offline


    This plugin looks pretty cool :) I was just wondering if maybe there was an easy way to integrate it into the "Tribu" zombie plugin. The money system for Tribu is different and I don't think it is compatible with this :/
  31. Offline


    I know it is annoying making plugins compatible with other plugins but could you read into the "Tribu" mod please it allows you to create arena with waves of zombies increasing and a mystery box could be a cool addon. It would be awesome if it was compatible with the build in points and money system it uses ( i know this is hard so i will not be bothered if you cant do it) Thanks alot

Share This Page