Skip to content

Commit

Permalink
Release 3.2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioDP committed Oct 18, 2023
1 parent dc47e3f commit 376b0b5
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 28 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>

<artifactId>parties-api</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions bukkit/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-bukkit</artifactId>
Expand Down Expand Up @@ -80,7 +80,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-common</artifactId>
<version>3.2.13</version>
<version>3.2.14</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>

<artifactId>parties-bukkit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import lombok.RequiredArgsConstructor;
import org.bukkit.entity.Animals;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.FishHook;
import org.bukkit.entity.SpectralArrow;
import org.bukkit.entity.EnderPearl;
import org.bukkit.entity.LivingEntity;
Expand Down Expand Up @@ -51,12 +52,16 @@ public void onPlayerHit(EntityDamageByEntityEvent event) {
type = DamageType.PLAYER;
else if (event.getDamager() instanceof Arrow)
type = DamageType.ARROW;
else if (event.getDamager() instanceof SpectralArrow)
type = DamageType.SPECTRALARROW;
else if (event.getDamager() instanceof EnderPearl)
type = DamageType.ENDERPEARL;
else if (event.getDamager() instanceof FishHook && BukkitConfigParties.ADDITIONAL_FRIENDLYFIRE_PREVENT_FISH_HOOK)
type = DamageType.FISH_HOOK;
else if (event.getDamager() instanceof Snowball)
type = DamageType.SNOWBALL;
try {
if (event.getDamager() instanceof SpectralArrow)
type = DamageType.SPECTRAL_ARROW;
} catch (NoClassDefFoundError ignored) {}
try {
if (event.getDamager() instanceof Trident)
type = DamageType.TRIDENT;
Expand All @@ -69,17 +74,17 @@ else if (event.getDamager() instanceof Snowball)
attacker = (Player) event.getDamager();
break;
case ARROW:
shooterSource = ((Arrow)event.getDamager()).getShooter();
shooterSource = ((Arrow) event.getDamager()).getShooter();
if (shooterSource instanceof Player)
attacker = (Player) shooterSource;
break;
case SPECTRALARROW:
shooterSource = ((SpectralArrow)event.getDamager()).getShooter();
case ENDERPEARL:
shooterSource = ((EnderPearl) event.getDamager()).getShooter();
if (shooterSource instanceof Player)
attacker = (Player) shooterSource;
break;
case ENDERPEARL:
shooterSource = ((EnderPearl)event.getDamager()).getShooter();
case FISH_HOOK:
shooterSource = ((FishHook) event.getDamager()).getShooter();
if (shooterSource instanceof Player)
attacker = (Player) shooterSource;
break;
Expand All @@ -88,8 +93,13 @@ else if (event.getDamager() instanceof Snowball)
if (shooterSource instanceof Player)
attacker = (Player) shooterSource;
break;
case SPECTRAL_ARROW:
shooterSource = ((SpectralArrow) event.getDamager()).getShooter();
if (shooterSource instanceof Player)
attacker = (Player) shooterSource;
break;
case TRIDENT:
shooterSource = ((Trident)event.getDamager()).getShooter();
shooterSource = ((Trident) event.getDamager()).getShooter();
if (shooterSource instanceof Player)
attacker = (Player) shooterSource;
break;
Expand Down Expand Up @@ -354,6 +364,6 @@ public void onPlayerFish(PlayerFishEvent event) {
}

private enum DamageType {
UNSUPPORTED, PLAYER, ARROW, SPECTRALARROW, ENDERPEARL, SNOWBALL, TRIDENT
UNSUPPORTED, PLAYER, ARROW, ENDERPEARL, FISH_HOOK, SNOWBALL, SPECTRAL_ARROW, TRIDENT
}
}
1 change: 0 additions & 1 deletion bukkit/src/main/resources/bukkit/parties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ additional:
# => command: Toggle the party protection with "/party protection" command
#
# You can enable 'warn-players-on-fight' to warn leaders on friendly fire hits
# 'prevent-fish-hook' works only in 1.15+
# 'prevent-damage-with-magic' prevents friendly fire damage of Magic plugin
friendly-fire:
enable: true
Expand Down
4 changes: 2 additions & 2 deletions bungeecord/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-bungeecord</artifactId>
Expand Down Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-common</artifactId>
<version>3.2.13</version>
<version>3.2.14</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion bungeecord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>

<artifactId>parties-bungeecord</artifactId>
Expand Down
1 change: 0 additions & 1 deletion bungeecord/src/main/resources/bungee/parties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ additional:
# => command: Toggle the party protection with "/party protection" command
#
# You can enable 'warn-players-on-fight' to warn leaders on friendly fire hits
# 'prevent-fish-hook' works only in 1.15+
# 'prevent-damage-with-magic' prevents friendly fire damage of Magic plugin
friendly-fire:
enable: true
Expand Down
4 changes: 2 additions & 2 deletions common/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-common</artifactId>
Expand Down Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-api</artifactId>
<version>3.2.13</version>
<version>3.2.14</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>

<artifactId>parties-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion output/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>output</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion output/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>

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>com.alessiodp.parties</groupId>
<artifactId>parties</artifactId>
<version>3.2.13</version>
<version>3.2.14</version>
<packaging>pom</packaging>

<name>Parties</name>
Expand Down
4 changes: 2 additions & 2 deletions velocity/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>parties-velocity</artifactId>
Expand Down Expand Up @@ -75,7 +75,7 @@
<dependency>
<groupId>com.alessiodp.parties</groupId>
<artifactId>parties-common</artifactId>
<version>3.2.13</version>
<version>3.2.14</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>parties</artifactId>
<groupId>com.alessiodp.parties</groupId>
<version>3.2.13</version>
<version>3.2.14</version>
</parent>

<artifactId>parties-velocity</artifactId>
Expand Down
1 change: 0 additions & 1 deletion velocity/src/main/resources/velocity/parties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ additional:
# => command: Toggle the party protection with "/party protection" command
#
# You can enable 'warn-players-on-fight' to warn leaders on friendly fire hits
# 'prevent-fish-hook' works only in 1.15+
# 'prevent-damage-with-magic' prevents friendly fire damage of Magic plugin
friendly-fire:
enable: true
Expand Down

0 comments on commit 376b0b5

Please sign in to comment.