mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Make players logging out take damage from bleeding.
Done as per suggestion by nossr50 Closes #131
This commit is contained in:
parent
fe9db6c9ad
commit
5cbee8a4ab
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user