DirectExp
Intro
DirectExp was created at the request of Certain, a member of the Bukkit forum. After releasing several builds on the thread, and having more then one person suggest that I upload this to BukkitDev, I have finally decided to release it here. Hopefully others can benefit from it as much as those who have been following the original thread have been!
Using/Installing DirectExp
Using DirectExp is very simple. Just drop the jar file into your plugins folder. The plugin will automatically generate a default configuration file if it can't find one. All of the values used in the default configuration file are the same as that of vanilla Minecraft. If you want to edit those values, navigate to dbstudios/DirectExp/config/ and edit the config.yml file.
Gain Message
In config.yml, there is a line near the top called "gain-message". This is the message that will be displayed to players when the gain experience. You can make this anything you want, just make sure it is enclosed in "double quotes"!
Special Strings
The "gain-message" node accepts the following special strings:
- {exp}
- The number of experience points gained.
- {damage}
- The amount of damage that player dealt.
- {dper}
- The percentage of damage the player dealt.
- {target}
- The name of the creature or player that was killed.
Additionally, it will also accept any color name enclosed in {curly braces}. So, for example, lets say I want a player to see this when they gain experience for killing a zombie: [DirectExp] You have gained 10 experience for dealing 27 (56.25%) damage to a zombie. To achieve this, I would enter this for my "gain-message":
gain-message: "{dark_green}[DirectExp] {aqua}You have gained {red}{exp} {aqua}experience for dealing {dark_red}{damage} ({dper}%) {aqua}damage to {blue}{target}{aqua}."
@LartTyler
Error in 1.3:
2012-08-16 17:16:16 [WARNING] Task of 'DirectExp' generated an exception java.lang.NoSuchMethodError: org.bukkit.event.entity.EntityDeathEvent.<init>(Lorg/bukkit/entity/Entity;Ljava/util/List;I)V at me.dbstudios.directexp.DEEntityListener$1.run(DEEntityListener.java:54)
@LartTyler
No worries!
@Darkhand81
I'm sorry for the delay, RL got in the way of the time I needed to finish the plugin, and my other project SolusRpg, has been dominating the majority of my free time. I'll do what I can to get something out ASAP :)
I promised myself I'd never push for updates, but this is looking like it's going to be a central plugin on my server once the hashmap issue is fixed... Any word? :)
Help me Obi-wan Lartobi, you're our only hope!
@S3thc0n
Oh, I understand now! Yes, I can see about addingsomething like that. I've been really busy with school and stuff the last new weeks, but I'll do my best to get a new build out ASAP.
So people which don't want to see these messages can disable them, and I can force them in some worlds or prevent them.
@S3thc0n
I'm not quite sure what you mean, could you elaborate a bit?
How about permissions or a toggle command?
This is awesome! I like it even more by the fact that my idea have come so far! ^^
<c> Certain
Looks awesome!