Boo Treasure
BooTreasure
BooTreasure allows you to have some treasure's chest spawn in you world.
The chest will be available to grab for a predefined duration, after that it disappear with its contents or if you decided to set your treasure with the 'preservecontent' flag the next treasure will gain all the non-grab stuff.
How it works ?
To create a treasure's chest launch this command in game:
/bootreasure chest create
This command launch a Conversation procedure, follow and answer the questions.
For the cron pattern asked, please report yourself here:
http://www.sauronsoftware.it/projects/cron4j/manual.php#p02
Explanations:
This plugin is a work in progress on Beta so be careful if you want to use it.
I can't be responsible of eventuakky lose on your server. Use it at your own risks.
For better performance the plugin don't search on all blocks to find a valid block where it can appear.
The plugin take one loaded chunk at random, it didn't browse all chunks. When it has a loaded chunk it searchs a block at random without browsing all the blocks. When the random block fullfill all requirements it uses it for future treasure's chest.
This is what it does :
- onlyonsurface: true
the search deal with only the highest blocks vertically - onlyonsurface: false
take a random loaded chunk and take the first block with air space
More things coming ..
TODO
- Add the support's block setup
- Add a WorldGuard condition
- Add a PreciousStones condition
- Add a fixed region condition
- Add a group only treasure
Credits
This plugin depends on :
- Vault
The plugin use a copy of:
BooTreasure-0.5
Beta release.
Please report me all errors that you'll can find.
A file 'errors.txt' will contain warning and errors, if you want to help me please provide me its content when you post errors.
Changes
- Initial Beta release, use it at your own risks, i can't be responsible for lose in your server
- for the moment the 'places' approach is not implemented
- to create a chest launch command -> /bootreasure chest create and follow the questions
Installation
Put the .jar in your 'plugins' folder.
On first start it creates its own folder with a config.yml, a messages.yml and a file 'treasures.yml'.
The treasures.yml will contain a treasure, it will be launched every minute multiple of 2 ( CronPattern: */2 * * * * ) and the chest will contains a bread.
If error or warning occured a file 'errors.txt' will be created with the error's message.
Usage
To create a treasure's chest :
/bootreasure chest create
This command launch a Conversation procedure, answer all the questions. If a question wait for a 'yes/no' answer use 'true' for 'yes' and 'false' for no. The sentences of this procedure is set on 'messages.yml'.
A serialized version of appeared treasure's chest will be stored in the folder 'lost+found'. On next restart to not let chest all other your worlds the plugin will remove this lost chests.
Warning
Please don't edit the 'treasures.yml' in the 'setup.contents' part because this is the chest's content representation except if you know what you're doing.
Need help ?
Feel free to join me at #boo on esper.net and hl me.
@CJHacker
Your treasure yaml seems correct yes.
One thing is bad i think because your cron pattern say that the treasure must appear every 5 minutes and you set the duration to 10 minutes.
You also set 'preservecontent' to true so this treasure will have problems to pop.
I think i must explain more how this plugin works.
So each BooTreasure is always the same object every time they pop.
-> Try setting your cron pattern to something more longer than the 'duration'.
-> Can you confirm me that with your latest treasure pasted you tested it with players online ? (to be sure that there is a good loaded chunk to pop)
@boozaa
Excellent! Thanks for taking a look at that. I've got one other issue when trying to use the places part of the setup. Does this config look correct?
http://pastebin.com/BnxJT4Wq
I don't get any error messages, but if I take out the:
places:
ids:
- '2'
part it works fine. With that in there, it does not produce errors, but it never spawns a chest either. Am I missing something?
@CJHacker
Hello, you're right and i know the reason why. I'll try to correct this bug and post a new version today.
Thank you for your report.
For the roof pop yes the 'places' part would solve this problem :).
This is a really fun plugin! Seems to work good, just hate it when it appears on the roof of houses that people can't reach. :-) I'll have to try the 'places' variables you list above and teak things a bit. Keep it up!
Tonight I just happened to notice an error on my console when opening and closing double chests. Posted ticket.