Repository: PaperMC/Paper
File: paper-api/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java (Java)

Code before:
    /**
     * Get whether the death message should be shown.
     * By default, this is determined by {@link org.bukkit.GameRule#SHOW_DEATH_MESSAGES}.
     *
     * @return whether the death message should be shown
     * @see #deathChatMessage()
     * @see #deathScreenMessage()
     */
    public boolean shouldDisplayDeathMessage() {
        return displayDeathMessage;
    }

    /**
     * Set whether the death message should be shown.
     * By default, this is determined by {@link org.bukkit.GameRule#SHOW_DEATH_MESSAGES}.
     *
     * @param displayDeathMessage whether the death message should be shown
     * @see #deathChatMessage()
     * @see #deathScreenMessage()
     */
    public void setShouldDisplayDeathMessage(boolean displayDeathMessage) {
        this.displayDeathMessage = displayDeathMessage;
    }

    /**
     * Set the death message that will appear in chat and on death screen to everyone on the server.
     *
     * @param deathMessage Component message to appear to other players on the server.
     */
    public void deathMessage(final @Nullable Component deathMessage) {
        this.deathChatMessage = deathMessage;
        this.deathScreenMessage = deathMessage;
    }

    /**
     * Get the death message that will appear to everyone on the server.
     *
     * @return Component message to appear to other players on the server.
     * @deprecated in favour of {@link #deathChatMessage()} and {@link #deathScreenMessage()}
     */
    @Deprecated
    public @Nullable Component deathMessage() {
        return this.deathChatMessage;
    }

    /**
     * Set the death message that will appear in chat and on death screen to everyone on the server.
     *
     * @param deathMessage Message to appear to other players on the server.
     * @deprecated in favour of {@link #deathMessage(Component)}
     */

Review comment (suggestion):
Sounds a bit weird imo.

```suggestion
     * Set the death message that will be broadcasted and appear on the players death screen.
```

Code after:
        this.newExp = exp;
    }

    /**
     * Gets the Level the Player should have at respawn.
     *
     * @return New Level of the respawned player
     */
    public int getNewLevel() {
        return this.newLevel;
    }

    /**
     * Sets the Level the Player should have at respawn.
     *
     * @param level New Level of the respawned player
     */
    public void setNewLevel(int level) {
        this.newLevel = level;
    }

    /**
     * Gets the Total EXP the Player should have at respawn.
     *
     * @return New Total EXP of the respawned player
     */
    public int getNewTotalExp() {
        return this.newTotalExp;
    }

    /**
     * Sets the Total EXP the Player should have at respawn.
     *
     * @param totalExp New Total EXP of the respawned player
     */
    public void setNewTotalExp(int totalExp) {
        this.newTotalExp = totalExp;
    }

    /**
     * Set the death message that will appear to everyone on the server.
     *
     * @param deathMessage Component message to appear to other players on the server.
     */
    public void deathMessage(final @Nullable Component deathMessage) {
        this.deathMessage = deathMessage;
    }

    /**
     * Get the death message that will appear to everyone on the server.
     *