Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kadotcom committed Jul 8, 2024
1 parent aa85574 commit 80b799d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.kadotcom</groupId>
<artifactId>LifeStolen</artifactId>
<version>5.1</version>
<version>5.2.1</version>
<packaging>jar</packaging>

<name>LifeStolen</name>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ public void onPlayerDeath(PlayerDeathEvent event) {

} else if (HealthManager.getMaxHealth(p) <= 2.0) {
System.out.println("Player " + e.getName() + " Killed " + p.getName());
if(event.getEntityType() != EntityType.PLAYER && !event.getEntityType().equals(EntityType.TNT) && !event.getEntityType().equals(EntityType.TNT_MINECART) && event.getEntityType() != EntityType.CREEPER && event.getEntityType() != EntityType.SKELETON && event.getEntityType() != EntityType.ARROW && event.getEntityType() != EntityType.SPECTRAL_ARROW) {
if(event.getEntityType() != EntityType.PLAYER && !event.getEntityType().equals(EntityType.PRIMED_TNT) && !event.getEntityType().equals(EntityType.MINECART_TNT) && event.getEntityType() != EntityType.CREEPER && event.getEntityType() != EntityType.SKELETON && event.getEntityType() != EntityType.ARROW && event.getEntityType() != EntityType.SPECTRAL_ARROW) {
dm = plugin.getConfig().getString("translation.deathMessages.generic").replace("&", "§").replace("${player}", p.getName()).replace("${attacker}", event.getEntityType().name());
event.setDeathMessage(dm);
}else if(event.getEntityType() == EntityType.PLAYER){
dm = plugin.getConfig().getString("translation.deathMessages.generic").replace("&", "§").replace("${player}", p.getName()).replace("${attacker}", e.getName());
event.setDeathMessage(dm);
}else if (event.getEntityType() == EntityType.CREEPER || event.getEntityType().equals(EntityType.TNT) || event.getEntityType().equals(EntityType.TNT_MINECART)) {
}else if (event.getEntityType() == EntityType.CREEPER || event.getEntityType().equals(EntityType.PRIMED_TNT) || event.getEntityType().equals(EntityType.MINECART_TNT)) {
dm = plugin.getConfig().getString("translation.deathMessages.explosion").replace("&", "§").replace("${player}", p.getName()).replace("${attacker}", event.getEntityType().name());
event.setDeathMessage(dm);
}else if(event.getEntityType() == EntityType.SKELETON || event.getEntityType() == EntityType.ARROW || event.getEntityType() == EntityType.SPECTRAL_ARROW) {
Expand Down

0 comments on commit 80b799d

Please sign in to comment.