Fix overkill damage with death screen

This commit is contained in:
Goh Wei Wen 2020-06-15 04:44:36 +08:00
parent df26bf3705
commit e09a6fa084

View File

@ -107,6 +107,7 @@ public class DPlayerListener implements Listener {
return;
}
if (event.getEntity() instanceof Player && !gameWorld.getDungeon().getRules().getState(GameRule.DEATH_SCREEN)) {
event.setDamage(0);
GamePlayer gamePlayer = plugin.getPlayerCache().getGamePlayer((Player) event.getEntity());
if (gamePlayer == null) {
return;