[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


    This plugin is broken. It worked for the first 2 starts of my server then I deleted it and put it back and then it said it has been updated restart server and wouldn't generate the file. I have the newest updated version... I shall wait for an update :D
  3. Offline


    Thank you so much. Now I can make a zombies arena.

    I have the same error. I'll try to see if theres a way to fix this.

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


    so how did u do it?
  5. Offline


    Ah, you must have run your server at the time I was testing something on github, let It re-update one more time ill fix it now, f*** I hate it when shit works for yourself but not for others :p

    Everyone Restart Your Server Or Re-Download The Jar NOW :) (If it doesnt Update by restarting, re-download, Im sorry about this error, not all devs can get stuff right the first...second...third or fourth time lol!)

    p.s: If it repeatedly asks u to update, stop the server, delete it and then post it here!

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


    Yeah no problem aint blaming you. keep up the good work great plugin :D
  7. Offline


    Woot :D
  8. Offline


    thanks man. awesome plugin.
    Jayjay110 likes this.
  9. Offline


    HUZZAH 5/5
    :) It's a fu***ng good combo with Mobarena

    the box should change place after 10 times or sorta..

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


    I could make it, but then there would be confusion on were to randomize it, in an area or in the entire world, it also may cause bugs if you reload the server before 10 minutes, but its possible, and quite easy
  11. Offline


    I really wanna install the plugin but afraid it might does somthing crazy like last time :p
  12. Offline


    The combo is even better if you use it with the Archers plugin. So...AWESOME.
  13. Offline


    Can you make a barebones version with only flatfile support and no integration from Permissions, iConomy, and Register? o3o
  14. Offline


    works!!! no bugs no errors thank you!
    Jayjay110 likes this.
  15. Offline


    uhhh, ok, it will probably be a bit more laggy with flatfile, without permissions i can do, ill just make it so you have to enable it in the config, but wats the point of removing register and iconomy... then people just go zomg hax clicky clicky clicky, do u just want infinite items?
  16. Offline


    (I just changed accounts so I hope you don't mind)

    I don't mind flatfile being a bit laggy. My server can handle the tiny lag.

    The reason I am requesting this special editions is because apparently, the person who developed the plugin I use on my server, said his plugin conflicts with Permissions AND iConomy. My use for this plugin is to use place it in a very unsheltered area of a small arena. People have to ninja loot, hide, and kill others.

    You're making it so only OPs can use the in game commands and everyone else can loot it, right?
  17. Offline


    uuhhh yeah sure
  18. Offline



    Is it possible to use decimals in the config where probability is? For example .1 or .5. I would love to fine tune this.
  19. Offline


    so you want a 0.1% chance of sumthing?
  20. Offline



    Seems to stop working after a few hits. I get hit the box several times to confirm. I then start getting these errors.

    2011-06-08 07:32:06 [SEVERE] java.util.ConcurrentModificationException
    2011-06-08 07:32:06 [SEVERE]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
    2011-06-08 07:32:06 [SEVERE]     at java.util.HashMap$EntryIterator.next(HashMap.java:880)
    2011-06-08 07:32:06 [SEVERE]     at java.util.HashMap$EntryIterator.next(HashMap.java:878)
    2011-06-08 07:32:06 [SEVERE]     at com.servegame.n1p.MysteryBox.Timer3.run(Timer3.java:16)
    2011-06-08 07:32:06 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-06-08 07:32:06 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    Also yes 0.1% chance of getting something.
  21. Offline


    only occurs when u hit it super fast right?
  22. Offline


    Exactly. Some freeze up, others start working again after a few moments. Perhaps add a configurable delay before you can use a box again, and an option in the config to allow only 1 user per box at once. Users aren't going to obey the wait your turn and go slowly signs :p
  23. Offline


    I believe its a synchorizing error ill look into it
  24. Offline


    maybe i am a dumpass, but how to buy it? it say $950, but how can i pay? :(
  25. Offline


    Double click it fast.
  26. Offline


    i know, but how to pay $950? it says i dont have it, with what i need to pay?
  27. Offline


    Oh you need Iconomy, Essentials eco, or r ecoBOS.
  28. Offline


    Not anymore :)
  29. Offline


    Oh nice what doe velocity do? Ill test it out tonight :>
  30. Offline


    so, if i dont need it, how to pay then? :O
  31. Offline


    It just got updated it u can set it to free in the config file

Share This Page