RandomBox icon

RandomBox -----

Adds random boxes (crates, lootboxes) with optional GUI




Fixes NBT parser for 1.19.
----------, Sep 6, 2022

Now supports Spigot 1.17.

Chinese translation was updated by xinghun1314.
----------, Jun 26, 2021

Added "texture" key to box config. You can use it to specify textures on player heads (PLAYER_HEAD on 1.13+, SKULL_ITEM with data 3 on 1.12-).
----------, Sep 8, 2020

Fixed box id extraction from the last lore line.
----------, Jul 4, 2020

This update changes the way of identifying boxes. Old boxes should work, but only while you don't change the box name in the config.

If you are doing clean install and do not have old box items in the world or inventories, you can change the name whenever you want, as was before.

  • Box id is now appears in the last line of the box lore. This is required because starting from 1.16 box id can not be hidden using color codes anymore.
  • A random number is now added to the lore to make box items unstackable. Th reason for the change is the same as the reason for changing box id.
  • Fixed chat message broadcasting on 1.16

If you are seeing italic font in the box name or lore that was not here before:
----------, Jul 4, 2020

  • Now you can specify search radius for @p target selector using 'r' option: @p[world=world,x=1,y=2,z=3,r=64]
  • Box now drops unique items when GUI is not used (as it was in versions before rewrite).
  • @p selector now can take location from command blocks, command minecarts and other entities.
----------, Mar 25, 2020

The plugin was rewritten to allow the development of new features. Expect some bugs.
New features
  • Added per-box opening limits supporting custom messages, multiple different limits for one box and permissions to bypass. You can see an example in the default box config in the plugin JAR.
  • Target selector format was changed, run /givebox without arguments to read about new format.
  • Added world, x, y, z options to the @p target selector. Now you can select nearest player to a given location.
  • Now you can use @p in /givebox from the console or other plugins.
  • %item%, %box% placeholders and nbtTag now work on all versions (1.8 to 1.15).
  • Added option to disable damage from fireworks launched due to box effects. It is enabled by default and is controlled by 'disableDamageFromBoxFirework' setting in the main config.
Changes and improvements
  • Config error messages were improved and made more verbose.
  • Errors in effect configuration are not ignored now, but instead prevent box from being parsed.
  • Default box (9901.yml) now has a legacy version for 1.12 servers and older.
  • Source code was temporarily removed from the JAR, it will be available on GitHub soon.
  • bStats metrics were added. This is the system used by PaperSpigot, Essentials, ProtocolLib, WE/WG, etc. Plugin page
----------, Mar 23, 2020

  • Fixed box opening when player is holding two boxes simultaneously in both main and off hand.
----------, Mar 21, 2020

  • Fixed 'IllegalArgumentException: Cannot measure distance between world_the_end and world' in /givebox @p command
----------, Mar 17, 2020

  • Added spanish translation by https://www.spigotmc.org/members/zuhir.31452/
  • Added customModelData setting for boxes and dropped items. To use it, you must run on 1.14+ and specify "customModelData: 123" in the root of the box configuration (to apply data on the box) or in the dropped item section (to apply data on the dropped item). You can see an example in the default config in the plugin JAR.
  • Added MIT license for the source code.
----------, Mar 16, 2020

  • Added message 'boxWasDroppedToGround' to player when box was dropped onto ground when player inventory is full. You need to add this message to locale files, if they already exist. Alternatively you can copy this message from default locales in plugin JAR.
  • Added possibility to specify player head texture in dropped items. To do this, 'item' must be PLAYER_HEAD (SKULL_ITEM for 1.12 and lower), and 'texture' must specify base64 texture value. You can see example in default boxconfig in plugin JAR.
  • Tested box opening and head textures on 1.8 and 1.15
----------, Mar 15, 2020

When using /givebox its now possble to drop box at player location if player inventory is full. To enable this behaviour, add to config.yml:

dropBoxWhenNotEnoughSpace: true
----------, Mar 14, 2020

  • Build for Java 8
  • Sources are now included in JAR file
  • Source code was slightly refactored and reformatted
  • Classes were repackaged and renamed
  • Metrics were removed since it does not work
----------, Mar 14, 2020

  • Removed item glow which uses invalid enchantment id, replaced with enchantment LUCK
  • Allow using new enchantments in config (like mending)
  • Default box config adapted for 1.13+ (changed item ids and sound ids)
  • Fixed parsing of animated filler period and rolling periods
----------, Mar 14, 2020

  • Custom NBT tags can be used for items (can be applied for box and drop items). Example:
    Code (Text):
    nbtTag: '{Unbreakable:1b}'
----------, May 18, 2016

  • Fixed bug with infinite boxes when in off hand (1.9)
  • Fireworks launch errors now will not cancel box opening (1.9)
  • Items, taken out of box gui, will be instnantly removed from player's inventory
----------, May 18, 2016

  • Added cooldowns for boxes.
----------, Feb 20, 2016

  • 'storedEnchants' section for drop items - allows to specify enchantments that enchanted book stores.
----------, Jan 16, 2016

  • Added possibility to make boxes drop another boxes. To do this, you need to add 'box' setting in drop item section, and set it to required box id.
  • Now when 'dontGiveItem' is true, items amount will be not removed from box lore
  • Amount ranges now displays as ranges 'm-n', not as random number from the range.
  • Fixed bugs
----------, Dec 23, 2015

  • Added gui customization
  • Added effects for boxes
  • Added support for variable amount of items in stacks
  • Added support for %box% and %item% strings in broadcast messages
  • Added 'inBoxLoreFormat' setting for items
  • Added 'data' key for box item
  • Added 'skullOwner' key for boxes and drop items (works when item = 397 & data = 3)
  • Box parse errors are printed when /givebox executed
  • Removed support for placing box id in box item's data
  • Removed 'gui' and 'fillers' keys from main config, now every box has it's own gui settings
  • Added full plugin documentation on Bukkit
----------, Dec 13, 2015

  • Fixed stackable boxes
  • Added full customization of boxes lore
----------, Oct 25, 2015

  • Fixed bug, that allows players to drop items out of gui.
  • Fixed bug: when player clicks on RandomBlock, item in hand is removed
----------, Aug 27, 2015

  • Fixed inventory bug.
----------, Aug 26, 2015

  • Fixed duplication bug.
----------, Aug 19, 2015

  • You can create RandomBlocks - blocks, that can open RandomBox gui (or just give you random items) when you clicking on it. These blocks can take some money (requires Vault and some economy plugin) from players, if its' cost is more than 0. New command have been added - /randomblock <create...|remove>
  • Now you can set a limit to item list in box lore. Set "loreLimit" parameter in box config to some value, and box lore will be truncated (-1 or any negative number will remove lore at all).
----------, Jun 16, 2015

  • Removed console messages, that apperas when someone opens a box.
----------, Jun 12, 2015

  • Fixes error in console, that appears when a box opened and gui is disabled
  • Fixed items' amount decreasing
----------, May 23, 2015

  • Now box disappears when gui opens, if gui closes, random items (not from gui) will drop.
  • If there is not enough space in inventory, dropped items will drop near player
  • Added simple selectors for /givebox command: @p, @a and @r. Also, you can specify players amount in square brackets: for example, @p[10] will select ten near players
----------, May 16, 2015

  • Randomized drop delay
  • Fixed long drop time
----------, May 8, 2015

  • Fixed stopping GUIs
  • Fixed startup error on Bukkit 1.5.2
  • Fixed metrics error on Bukkit 1.5.2
----------, May 7, 2015

  • Now boxes stores in separate files in 'boxes' directory.
  • Now locales stores in separate files in 'locales' directory.
  • Configurations from old versions will be automatically split.
  • Box setting 'enchant' has been replaced with 'addGlow' setting. Setting 'encnantment' in main config has been removed.
  • Added 'fillers' setting in main config, now you can set gui fillers to your items.
  • Bugfix: now when gui closes item giving will be cancelled.
----------, May 3, 2015

  • Added gui for boxes. You can disable it by setting "gui" in config to false.
  • Optimized items select method.
  • Now for every item you must set valid material and amount more than 0.
----------, May 2, 2015

  • If item has "dontAssignName" option set to true, then item stack won't have a name.
----------, Mar 13, 2015

  • Fix: item's data values not assigned.
----------, Mar 3, 2015

  • Added "useDataValue" setting in config. If it set to true, then box id will be write in data value, instead of lore. Not recommend use it on 1.8, because boxes will show as blocks with "missing texture".
  • If some item in box has missing name, then that box will not be parsed.
----------, Feb 21, 2015

  • Plugin has been completely rewritten, and performance has been improved.
  • Now boxes parses when plugin enables, and parsing errors printing in console.
  • /rb list command now shows items in boxes, and commands that assigned to items.
  • Added broadcast function: if item has "broadcastMessage" string in config, then when that item drops, specified message will broadcasts to all players.
----------, Feb 9, 2015

Changes:
  • To use randombox.infinitebox permission, you need to set "useInfinitePermission" setting in config to true.
  • Added translation: simple chinese (znch)
----------, Jan 24, 2015

Changes:
  • Added command /randombox list, it shows ids and names of all boxes in config.
----------, Jan 21, 2015

Resource Information
Author:
----------
Total Downloads: 31,920
First Release: Jan 16, 2015
Last Update: Sep 6, 2022
Category: ---------------
All-Time Rating:
54 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings