Achievements Reloaded
Achievements - made by Lolmewn
What does this plugin do?
This plugin allows you to add additional achievements to the game. This plugin requries my other plugin, Stats, to work.
Using this plugin, you can add achievements to the game, and add rewards to them. Whenever a player gets an achievement, you can let commands run, give them money and/or items, and much more using the API this plugin will have.
How do I install this?
Download the latest file from the files page and put it in your plugins folder.
Configuring the plugin
config.yml
There's nothing much to configure here yet. You can toggle whether or not it auto-updates, but that's about it.
achievements.yml
This is where you will store all your achievements. An achievement must have the following layout:
<id> name: YourAchievementName goals: - Stat <amount> <TOTAL or the variables belonging to this Stat> - another one?
The rest of the things is pretty self-explanatory. Once I have time, I will write down a good how-to-write achievements page.
Stats
These are the available Stats:
Stat | Description | Variables |
---|---|---|
Block_break | All broken blocks with their Datavalues | itemId itemData breaking |
Block_place | All placed blocks with their Datavalues | itemId itemData breaking |
Death | All deaths with their causes | cause entity(boolean, true is safest) |
Kill | All kills with their causes | type |
Move | Walking, sailing, riding a train, on the back of a pig or by horse. | type (0=walk, 1=boat, 2=train, 3=pig, 4=pig in train, 5=horse) |
Playtime | Time played in seconds | |
Arrows | Arrows shot | |
Xp_gained | Total XP gained | |
Joins | Total times joined | |
Fish_catched | Total fish Caught | |
Damage_taken | Total damage taken | |
Times_kicked | Total times kicked | |
Tools_broken | Total Tools broken | |
Eggs_thrown | Total eggs thrown | |
Items_crafted | Total items crafted | |
Omnomnom | Total times had a snack | |
On_fire | Total times being on fire | |
Words_said | Total words said | |
Commandsdone | Total commands done | |
Votes | Total times voted for the server (uses Votifier) | |
Worldchange | Total times worlds changed | |
Bucketfill | Total buckets filled | |
Bucketempty | Total buckets emptied | |
Bedenter | Total times bed entered | |
Itemdrops | Total times items dropped | |
Itempickups | Total times items picked up | |
Teleports | Total times teleported | |
Shear | Total times sheared | |
Lastjoin | The time the player joined the server last | |
Lastleave | The time the player left the server last |
Want to use a Stat that uses variables? You have to specify either the variables or use 'TOTAL'.
Variables with StatTypes
Some Stats have variables. A good example is Block_break, it has the variables <blockId> <blockData> and <breaking>.
If you want to have a goal where a player must break 5 blue wool blocks, the goal would be
- Block_break 5 35 3 true
If the block has no special blockData (e.g. there's only one type of it), use 0 as blockData. Example:
- Block_break 20 1 0 true
This means break 20 stone blocks.
Examples for the other special Stats:
- Block_place 5 TOTAL - Move 1000 1 #move 1000 blocks with transport type 1 (boat) - Kill 10 Zombie - Death 3 Creeper
The format always is - Stat Amount Total|Variables|<empty>
Item Rewards
The way Item Rewards are written down is somewhat difficult. Basically, you should write it down as
items: <itemId>.<itemData>,<amount>;<itemId>.<itemData>,amount;... etc. items: 35.3,10;1,10 items: 1,20
Note that the itemData doesn't have to be specified
The itemID obvioulsy is the ID the item has (which you can find a full list of here), the itemData is also on that list, and the amount.. well, duhh.
The first example gives you 10 colored wool, and 10 stone. The second example gives you 20 stone.
Example achievements.yml
You can find an example right here. When writing new achievements, I suggest you grab this page and see what all the options do.
Commands and permissions
Command | Permission | Description |
---|---|---|
/ach | achievements.view.self | Check out your progress |
/ach player <player> | achievements.view.others | Check out someone elses progress |
/ach reload | achievements.reload | Saves all players and reloads all achievements |
/ach page <page> | achievements.view.self | Check out page <page> of your progress |
/ach <achievement> | Check out what the achievement is all about |
Development builds
Development builds of this project can be acquired at the provided continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk, they may or may not work at all.
Development builds for Stats can be found at my CI, over at http://ci.lolmewn.nl/job/Achievements/.
Source
Want to help develop, or simply view what makes this plugin run?
Visit my bitbucket!
Metrics
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
If you wish to disable this feature (/me cries), you can do so by opt-ing out, which you can do in the config file under /plugins/PluginMetrics/
Auto-updater
This plugin has a built-in auto-updater, which connects to BukkitDev to check for updates. If you, for some reason, wish to disable this process, you can do so by setting 'update' to false in the plugins' settings file.
IRC Support
You can find me (and possibly, when I'm around, support) in my IRC channel #Lolmewn on irc.esper.net - See you there!
Hi i have a problem :
1:14:41 [SEVERE] Could not pass event StatUpdateEvent to Achievements vjenkins-Achievements-82
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
at nl.lolmewn.stats.player.Stat$1.run(Stat.java:96)
at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:67)
at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
You're going to release an update with the 1.7 for that issues ?
Would be nice if it was possible to customize which data is sent to metrics.
@aneantisseur
Might be caused by the other issue.
@Lolmewn
The lastest, 1.36. And for the list what isn't updated, what is the problem ?
@aneantisseur
Which stats version are you using? :O
@aneantisseur
Damn, I knew it. Having the same issue on my production server, but then with a TELEPORT action O.o I still have no clue where it comes from. For me it actually happens on server-startup.
@Lolmewn
This happened one time, and no specific actions was done when it's happened.
I've also another problem.
Fisrt, when a player reach an achievement, the list "players.yml" isn't update every time. So, when i'm reload the server, many achivements was reached again.
And i've got many errors in logs: >17:21:12 [WARNING] [Achievements] Unable to load achievement Xpgained, type was not found: Xpgained
17:21:12 [WARNING] [Achievements] Unable to load achievement Xpgained, type was not found: Xpgained 17:21:12 [WARNING] [Achievements] Unable to load achievement Eggsthrown, type was not found: Eggsthrown 17:21:12 [WARNING] [Achievements] Unable to load achievement Eggsthrown, type was not found: Eggsthrown 17:21:12 [WARNING] [Achievements] Unable to load achievement Itemscrafted, type was not found: Itemscrafted 17:21:12 [WARNING] [Achievements] Unable to load achievement Itemscrafted, type was not found: Itemscrafted 17:21:12 [WARNING] [Achievements] Unable to load achievement Itemscrafted, type was not found: Itemscrafted 17:21:12 [WARNING] [Achievements] Unable to load achievement Wordssaid, type was not found: Wordssaid 17:21:12 [WARNING] [Achievements] Unable to load achievement Wordssaid, type was not found: Wordssaid 17:21:12 [WARNING] [Achievements] Unable to load achievement Wordssaid, type was not found: Wordssaid 17:21:12 [WARNING] [Achievements] Unable to load achievement Itemsdrops, type was not found: Itemsdrops 17:21:12 [WARNING] [Achievements] Unable to load achievement Itemspickups, type was not found: Itemspickups//
But, my achievements files is correct. As an example, this is the achivements with xpgained: 16: name: Goku goals: - Xpgained 9000 rewards: money: items: commands: - me a accompli le haut-fait §6[%name%]§f. onComplete: messages: - §aGagner 9 000 points d'expérience - §2It's over 9000 ! 17: name: Ca en fait de l'enchantement ! goals: - Xpgained 50000 rewards: money: items: commands: - me a accompli le haut-fait §6[%name%]§f. onComplete: messages: - §aGagner 50 000 points d'expérience - §2Merlin va être jaloux !
@aneantisseur
Were you logged in when it happened?
I've got this message:
15:06:54 [WARNING] [Achievements] NPE happened in StatUpdateEvent, please give these details to Lolmewn (creator of Achievements, this plugin): 15:06:54 [WARNING] [Achievements] Stat: Move ; [0] 15:06:54 [WARNING] [Achievements] aneantisseur 15:06:54 [WARNING] [Achievements] Values: 510272.31201409054=old+0.07025628437634168
What's happened ? ^^
@aneantisseur
The creator of the web-end is having computer issues, I hope he fixes those soon.
Great job !
When I ask you for help on IRC, you tell me that a web version is in working. Can you tell us when you will release it ?
Thanks (and sorry for my english... )
@Nickbbeezy
Awesome :) No problem!
@mmuziek
There ya go!
@Lolmewn
Sweet, it worked. Thank you :)
@Nickbbeezy
If the old table is no longer being used, you can run this query:
UPDATE Stats_player SET votes=votes+oldTable.votes JOIN oldTableName oldTable ON Stats_player.player = oldTable.player;
Just replace oldTableName and possibly the column names for that table.
I'm trying to transfer players vote counts from a previous plugin to this one. Could I get some help on the SQL query that I could use the handle that. Basically, if a players name is present in both databases for the old vote recording plugin and this one, I'd like to it to take the vote count from the old one and use it to update the new one with that number. Is that possible?
@mmuziek
I'm already working on it, it's a lot of work though. Lots of stats code was changed, hence the reason achievements is currently broken
so when is a update coming to make it compatible?
Please note: the latest achievements version may not be compatible with the latest stats version. To be completely safe, use Stats 1.29 and the latest version of achievements.
@mmuziek
Oh ok sry :) Thansk everyone didn't know we could do command :) Sorry i'v haven't see the feature :p