mirror of
https://github.com/kaboomserver/weapons.git
synced 2025-02-05 06:02:57 +00:00
Fix deprecation warning (#11)
* Bump dependencies * Fix deprecation warning * Fix small issue
This commit is contained in:
parent
b665cbd192
commit
8513443147
3 changed files with 16 additions and 27 deletions
4
pom.xml
4
pom.xml
|
@ -15,7 +15,7 @@
|
|||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.18.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>checkstyle</id>
|
||||
|
|
|
@ -18,8 +18,6 @@ import org.bukkit.event.entity.ProjectileHitEvent;
|
|||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.destroystokyo.paper.event.entity.ProjectileCollideEvent;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.TextDecoration;
|
||||
|
||||
|
@ -72,25 +70,14 @@ public final class WeaponBlobinator implements Listener {
|
|||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onProjectileCollide(final ProjectileCollideEvent event) {
|
||||
if (event.getEntityType() == EntityType.SNOWBALL) {
|
||||
final Projectile projectile = event.getEntity();
|
||||
|
||||
if (Component.text("WeaponBlobinatorBall").equals(projectile.customName())) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onProjectileHit(final ProjectileHitEvent event) {
|
||||
if (event.getEntityType() == EntityType.SNOWBALL) {
|
||||
final Block hitBlock = event.getHitBlock();
|
||||
final Projectile projectile = event.getEntity();
|
||||
|
||||
if (hitBlock != null
|
||||
&& Component.text("WeaponBlobinatorBall").equals(projectile.customName())) {
|
||||
if (Component.text("WeaponBlobinatorBall").equals(projectile.customName())) {
|
||||
if (hitBlock != null) {
|
||||
final int radius = 4;
|
||||
final World world = projectile.getWorld();
|
||||
final Material color = Main.getColors().get(
|
||||
|
@ -104,6 +91,8 @@ public final class WeaponBlobinator implements Listener {
|
|||
}
|
||||
}
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
name: Weapons
|
||||
main: pw.kaboom.weapons.Main
|
||||
description: Plugin that implements various kinds of weapons.
|
||||
api-version: 1.13
|
||||
api-version: '1.20'
|
||||
version: master
|
||||
folia-supported: true
|
||||
|
||||
commands:
|
||||
weapons:
|
||||
aliases: weapon
|
||||
aliases: [ weapon ]
|
||||
description: Gives you a weapon
|
||||
permission: weapons.command
|
||||
|
|
Loading…
Reference in a new issue