Skip to content

Commit

Permalink
v 1.4.4, 1.21 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hraponssi committed Jun 15, 2024
1 parent 1b03f4b commit 3240d66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>DragonDmg</groupId>
<artifactId>DragonDmg</artifactId>
<version>1.4.3</version>
<version>1.4.4</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/net/hraponssi/dragondmg/main/EventHandlers.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public void onEntityDamagedByEntity(EntityDamageByEntityEvent e) { //Track diffe
} else {
dragonDamage.put(p.getName(), e.getDamage());
}
} else if (type.equals(EntityType.ENDER_CRYSTAL)) {
// hacky way to get around END vs ENDER
} else if (type.name().startsWith("END") && type.name().endsWith("_CRYSTAL")) {
if (crystalKills.containsKey(p.getName())) {
int num = crystalKills.get(p.getName());
crystalKills.replace(p.getName(), num + 1);
Expand All @@ -157,7 +158,7 @@ public void onEntityDamagedByEntity(EntityDamageByEntityEvent e) { //Track diffe
} else {
dragonDamage.put(p.getName(), e.getDamage());
}
} else if (type.equals(EntityType.ENDER_CRYSTAL)) {
} else if (type.name().startsWith("END") && type.name().endsWith("_CRYSTAL")) {
if (crystalKills.containsKey(p.getName())) {
int num = crystalKills.get(p.getName());
crystalKills.replace(p.getName(), num + 1);
Expand All @@ -178,7 +179,7 @@ public void onEntityDamagedByEntity(EntityDamageByEntityEvent e) { //Track diffe
} else {
dragonDamage.put(p.getName(), e.getDamage());
}
} else if (type.equals(EntityType.ENDER_CRYSTAL)) {
} else if (type.name().startsWith("END") && type.name().endsWith("_CRYSTAL")) {
if (crystalKills.containsKey(p.getName())) {
int num = crystalKills.get(p.getName());
crystalKills.replace(p.getName(), num + 1);
Expand Down

0 comments on commit 3240d66

Please sign in to comment.