Merge pull request #819 from goweiwen/fix-overkill-damage

Fix overkill damage with death screen
This commit is contained in:
Daniel Saukel 2020-06-15 00:26:16 +02:00 committed by GitHub
commit 298fe10463
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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;