Make players logging out take damage from bleeding.

Done as per suggestion by nossr50
Closes #131
This commit is contained in:
NuclearW 2012-02-10 23:29:19 -05:00
parent fe9db6c9ad
commit 5cbee8a4ab

View File

@ -45,6 +45,8 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.Combat;
import com.gmail.nossr50.Item;
import com.gmail.nossr50.Users;
import com.gmail.nossr50.m;
@ -153,6 +155,9 @@ public class mcPlayerListener implements Listener
mmoHelper.containers.remove(player);
}
//Bleed it out
if(Users.getProfile(player).getBleedTicks() > 0) Combat.dealDamage(player, Users.getProfile(player).getBleedTicks()*2);
//Save PlayerData to MySQL/FlatFile on player quit
Users.getProfile(player).save();