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.
@aufdemrand
Yeah I have to think about it. To be honost I have some other priorities now. And even some other plugins that I want to work on.
But I think I am gonna go with:
(Note to myself, don't use Timer, use Calendar instead)
But, again. I'm going to start with some forget-commands. And I can't even say when that's done.
@Mtihc
It of course is totally up to you. But the solution I suggested would be unique, as I don't think any other plugin lets you do that. Phatloots however does exactly as you are suggesting. That said, I think your plugin is easier to use.
@aufdemrand
You say: First to loot...
Do you mean that when 1 player loots it. Other cannot loot it until the timer is finished? That's different than I imagined.
@Mtihc
Resetting the chests for everybody might seem like a caveat at first, but I think it would add a bit of adventure in the long run. First to loot (every day or whatever) could encourage some competition.
By the way... treasure chests cannot be broken.
But they can get blown up by creepers and i bet TNT. I guess I need to fix that too.
@Mtihc
Ok, you can forget all chest of all players maybe. But that seems a little drastic.
I feel like you really need to start a timer when a player loots the chest. The timer has to be player specific. (Correction: player->chest specific)
How about an option per chest. Like: /tchest timedforget [hours] [minutes].
When a player opens a chest (for the first time (after last timer ended))... a (new) timer is started, when that timer ends. The plugin will forget that the player found that chest. So, when the player opens it again, etc,
Anyway, I will start with some forget-commands. This might take a while, since I have something you might call a life.
I don't know if a 3rd party Timer plugin would work.
I will add those commands. Like:
/tchest forget <world> <x> <y> <z> <player>
But when it's a timed command, how do you define a player? The player could be the one executing the command. But then you have to give players permission for the command. Which means they can abuse it at any time.
@aufdemrand
I like that! So I will only provide a command.
You can choose yourself if you want that command to be Timed.
If you liked the Wooden Signs idea better... there are also plugins that let you execute commands using wooden signs.
@Mtihc
I like where your idea for random chests is going, that is perfect execution.
As far as resetting chests, maybe a companion plugin that runs a command after X amount of time would be appropriate for those of us willing to kill some processing power and memory.
@Mtihc
And I guess there can be Random TreasureChests. But also Random UnlimitedChests
@sepukacheekray The random stuff is a good idea.
So you make a treasure chest, with a whole bunch of different "stacks of items".
Then... just like the unlimited command... you make it a random chest.
Like this /tchest random [amount of randomly chosen stacks]
So, if the chest contains a stack of 2 diamonds. And a stack of 3 diamonds. And a stack of 5 iron
And you make it random via /tchest random 2.
A player has a chance of getting 2 diamonds AND 3 diamonds. Or 2 diamonds AND 5 iron. Or 3 diamonds and 5 iron.
@sepukacheekray Hmm I don't like timers. But I still need a way to "remove a player from a chest". In other words... forget that the player found a chest. But how?
Maybe I create a command that clears all found chests of a player. Also a command that clears a particular found chest(world, x, y, z) of a player. So, a command for all chests, and a command for 1 chest.
But then, to make your dungeon-idea work... that second could be binded to a wooden sign.
You would place a sign at the beginning of the dungeon... and place the treasure chest that is linked to the sign at the end of the dungeon.
When you look at the sign and do the command, (or maybe via right-click), the plugin forgets that you already found that chest. So when you finish the dungeon, you can take the loot.
Can you make an option for a timed reset, that way dungeons are re-playable? Also would it be possible to make the loot respawn at random from a set list of items?
@aufdemrand
Thanks for the nice words! And thank you for helping me squash this bug.
@aufdemrand
I fixed the issue in 3.1. Not sure if you have to wait for file approval. Anyway, the file is uploaded.
@Mtihc
Thanks for the time you're putting into this... I love the simplicity of this plugin.
Edit: Noticed that you also create MyHelpPages, which I also use. Props.
@aufdemrand
Yes, you're right. This is a bug. I wonder if it's also in version 2.
I'm looking through the code now.
@Mtihc
I can reproduce it every time. Try this on your end.
Make a double chest. Use /tchest set. Now you can find each half independently.
If I open the left side: You found a treasure chest! If I open the left side again: You already found this chest! If I open the right side: You found a treasure chest!
@Mtihc
Yeah, something funny is going on.
I have a double chest in which one side is unlimited and the other side is not.
Here's my chest configuration:
At the moment (at least up to version 3.0),
When a treasure chest is deleted using /tchest delete (or by breaking the chest)
... the chest info is only removed from the chest file. And not from the players file
So, the plugin will still remember that a player found a chest at that location.
Maybe I should make it so that the chest is also deleted from the players file. But this is an intensive process. Unless I change the structure of the players file. In other words, it's pretty much boring work. And I don't know if/when I will update it.