IDragonfire / DragonAntiPvPLeaver

AntiPvPLogger for Minecraft
5 stars 4 forks source link

I forked your project! #2

Closed Rephistorch closed 12 years ago

Rephistorch commented 12 years ago

Please review my changes, and if you like them, please feel free to incorporate them into your main build!

Players die upon log-in (if NPC was killed), and drop an appropriate amount of XP when their NPCs are killed. Also clears the player's XP before death to ensure nothing duplicates.

Thanks, Chris

IDragonfire commented 12 years ago

I like it, expect that you committ class files ... and you calculate the xp. If you have plugins like Heroes you have a problem ... Also a config would be nice ;) I try my best zo integrate it^^

IDragonfire commented 12 years ago

Is there any reason, why you don't use:

http://jd.bukkit.org/apidocs/org/bukkit/entity/Player.html#getTotalExperience()

Rephistorch commented 12 years ago

Yes, I needed to calculate the experience drop rate, which is normally done internally. Players always drop their level times 7 experience points. Up to a maximum of 100. While looking through the API I didn't see anything that calculated the dropped experience. Sorry for the inclusion of the class files, it was an accident ;).

Experience calculation reference: http://www.minecraftwiki.net/wiki/Experience

IDragonfire commented 12 years ago

Thanks for the information and your help ;) I pull these, but outsource the meachnism tomorrow to have more control over it. I think l add a config-node like expDrop ... with .. vanilla, all, none, percentage ...

Rephistorch commented 12 years ago

Awesome, thanks for implementing in the main build!