TreasureChest
TreasureChest
chest / doublechest / furnace / dispenser / brewingstand / etc
can be looted by every player
Set the forget-time, so players can loot it again later.
There's more!
See the Features list, for a full list of features.
How-To's | Commands | Permissions | Source Code | Issues
Video
Check out this video (old version), to get an idea of what this plugin can do:
Features
- Normal Treasure: You see the items when you open it for the first time
- Unlimited Treasure: You see the items when you open it every time
(dispensers/droppers can dispense/drop unlimitedly)
- Random Treasure: You see a random selection of the items. Can also be unlimited!
- Shared Treasure: Instead of having a personal inventory for every player, all players share the same treasure inventory.
- Forget-Time: You can access a treasure again... after the forget-time has passed.
- Custom messages: (found first time, found again, is unlimited)
- Some treasures are for some ranks.
- Create Treasure Groups to perform operations on a bunch of treasures at once!
- Add special rewards:
- Money using Vault
- Experience, Health, Hunger, Air
- Potion effects!
- Fly for some time
- Spawn mobs in a region! Or exp bottles or whatever
- Teleport to a region
- Create explosion at some location
- Place redstone torch at some location
- Restore a region using WorldEdit's snapshots
- Execute a command... normally, or let console execute it, or make player OP for a sec.
- Broadcast a list of messages
- Bankrobber, cannot be looted, until looter is killed
- TODO: Permission reward
- TODO: Lightning reward
- TODO: Fireworks reward
- Score reward
Notes
Protection
- You can't access Treasure Chests that are protected by other plugins.
Unless you use theignore-protection
command. - You can't break, burn or blow up Treasure Chests.
Unless you use thedelete
command.
Fake Inventories
- Players always see a personal "fake inventory" to prevent others from stealing.
This "fake inventory" is temporary. So don't expect something like a private chest. - Players also see a "fake inventory" with shared treasures. But it's not personal. First come, first serve!
- Use the
peek
command to open the real inventory.
Ranks
- Use lower-case letters, in the configuration and permissions. Also see the How-To page.
TODO
- Fix issues if there are any.
- Add features when issues are fixed.
@jonnay23
Have you tried TreasureChest 4.2
Edit: It still needs approval atm. This update will fix the bug in 4.1
I don't need your backtrace ;)
@Mtihc
Actually, I uninstalled spout, and i get the same general error. Let me know if you need a backtrace.
@jonnay23
I think that's me being sloppy. I think I can fix it in a flash. I will upload soon.
@CloakedAlien
I think you misunderstand. That is not a bug. That is supposed to happen!!
Read this in the feature list: Treasure chests: adds items when a player opens it for the first time
So when 2 people open it (both for their first time)... the items are added twice!
I love this plugin! Unfortunately I had to remove it because items where duplicated =(
Issue arised after more than one user opened the chest.
3.4 I had running with RB of Bukkit 1.0.1 and a test build of 1.1. I've tested 4.0 with the test build.
As far as I can tell the issue arised back when I was running 3.4 and 1.0.1 and is still present in 1.1 test build with 4.0 even if I delete all configuration/data files and reconfigure my treasure chests (single chests).
Has there been as much as a hint of this issue before? I can compile a list of plugins and versions if you need it.
Hmm, I am getting an exception when I use this plugin in conjunction with Spout:
However, this is running a dev version of both spout and bukkit... so it could just be that.. :P
You're welcome!
@Mtihc
Thanks. Great plugin anyways. Makes my server a lot of fun now.
This is such an awesome plugin. Thank you!
@SonataHi
I've found the solution. I used getTargetedBlock, instead of getClickedBlock.
I'm upload 4.1 now. You have to wait for file approval.
Hmm, that sucks. The plugin reacts to a player rightclicking a chest.
So it's weird that a chest opens. when... technically... the player didn't rightclick it.
I should look for a InventoryOpenEvent. Not sure if it exists. I will see what I can do.
Accessing a chest with a Glass Pane, Iron Bars, or Fences in front of the direction you are trying to open the chest from, the chest acts like a regular chest.
Example:

Standing anywhere else will open the Treasure Chest, while Standing behind a Fence/Iron Bar/Glass Pane will not.
@guruflex
Maybe I should make an example on the Commands page.
The command goes like this:
/tchest setforget 0 1 30 0
In this example it's 0 days, 1 hour, 30 minutes, and 0 seconds
i cant get /tchest setforgettime to work
i have tryed /tchest setforgettime 1day
/tchest setforgettime 1
/tchest setforgettime 1d
/tchest setforgettime d1
/tchest setforgettime day1
what is the command?
Uhm.. I think you get errors, when you save a chest.. in a world.. with a world-name that has an underscore _ in it
For example, when your world is called "world_whatever".
I haven't tested it. But I'm pretty sure.
@gabizou
I'm not sure if I reacted yet.
In the current version. That is not possible. But it's not impossible to implement.
Maybe I can make a config property like:
allow_access_two_at_once: true/false
I have updated to version 4.0.
It does not yet have the "random" feature.
@ihasamoose
no way!
Hi, When I make a Treasure Chest with /tchest set, the player loots the chest... then after about 15 seconds the chest refreshes the loot, and he can still take it from the chest once again.
In reference to the problems I had before, I believe this would help clear up the problem that I'd like to avoid (not sure if you want to keep this as a feature).
Issue: 3 players that have accesss to treasurechests (3 is the minimum to make the point). Player 1, 2 and 3. The chest is created by owner and transformed into a TreasureChest. Player 2 opens the chest takes everything and leaves the chest. Player 2 opens the chest again and sees nothing is in the chest. Player 1 opens the chest and Player 2 opens the chest while Player 1 is already viewing the chest. Player 1 takes a few items and Player 2 snipes off the rest of the stuff. Player 1 can no longer get any items from this treasure chest as it has been emptied. Player 2 is now holding his set of items and a few of Player 1's set of items. (All is well as intended now) Player 3 opens the chest, while Player 2 (the sneaky thief, never dying and always at the right place at the right time) opens the chest while Player 3 is viewing the chest. Again 2 players are viewing the chest. Player 3 decides to take the good stuff Player 2 would normally get and saddened Player 2 leaves this chest alone. Player3 leaves this chest. No one is viewing the chest. Player 2 attempts to open the chest again to see if there's a glitch or bug that reset the treasurechests (I don't know, he checks it anyways, he doesn't remember which chest he's already looted or not) and he sees THE THINGS PLAYER 3 LEFT.
Quite literally, Player 2 can now retrieve the items that Player 3 left in the chest while they were both looking in the chest and empty Player 3's chest inventory. Granted it still keeps to the idea that there's only one set of items per player (only 3 sets of items given to the populous, but Player 1 has half a set, Player 3 has half a set and Player 2 has 2 sets), but it doesn't help that a player who is a complete troll can sit there and open players chests while they travel there for the first time and then the troll snipes the same items over and over again, let alone, have the ability to empty the other player's inventories when the other player alreayd logged out etc.
Can it be configurable whether tow players can be accessing the chest at the same time or not?
@Mtihc
Buttonwarp has an optional cooldown for the button teleporters, not sure how it's done, I don't understand coding, but maybe he could help you?
http:dev.bukkit.org/server-mods/buttonwarp/
It has options for a global cooldown, i.e. one player uses it and it's locked until it cools down, and a player cooldown, which then only forces the cooldown on a player that uses the button, while allowing other players to pass through as well. But you have the right idea with the random stacks, looking forward to updates!