Skip to content

Commit

Permalink
fixed endcrystal revive bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KartoffelChipss committed May 15, 2024
1 parent f5473de commit 1e3fd5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.strassburger</groupId>
<artifactId>LifeStealZ</artifactId>
<name>LifeStealZ</name>
<version>1.1.13</version>
<version>1.1.14</version>
<description>A LifeSteal SMP plugin providing you all the features you need!</description>
<build>
<resources>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.strassburger</groupId>
<artifactId>LifeStealZ</artifactId>
<version>1.1.13</version>
<version>1.1.14</version>
<packaging>jar</packaging>

<name>LifeStealZ</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ public void onPlayerDeath(PlayerDeathEvent event) {
if (!WorldGuardManager.checkHeartLossFlag(player)) return;
}

boolean isDeathByPlayer = killer != null && !killer.getUniqueId().equals(player.getUniqueId());

// Player died a natural death (e.g. fall damage)
if (killer == null && LifeStealZ.getInstance().getConfig().getBoolean("looseHeartsToNature")) {
if (!isDeathByPlayer && LifeStealZ.getInstance().getConfig().getBoolean("looseHeartsToNature")) {
if (playerData.getMaxhp() - 2.0 <= minHearts) {
for (String command : elimCommands) {
LifeStealZ.getInstance().getServer().dispatchCommand(LifeStealZ.getInstance().getServer().getConsoleSender(), command.replace("&player&", player.getName()));
Expand Down Expand Up @@ -83,7 +85,7 @@ public void onPlayerDeath(PlayerDeathEvent event) {
}

// Player was killed by another player
if (killer != null && LifeStealZ.getInstance().getConfig().getBoolean("looseHeartsToPlayer")) {
if (isDeathByPlayer && LifeStealZ.getInstance().getConfig().getBoolean("looseHeartsToPlayer")) {
PlayerData killerPlayerData = LifeStealZ.getInstance().getPlayerDataStorage().load(killer.getUniqueId());

String victimIP = getPlayerIP(player);
Expand Down

0 comments on commit 1e3fd5c

Please sign in to comment.