From 260cbfa0349ee951e16ff788d09c1d4f8d4605d5 Mon Sep 17 00:00:00 2001 From: Tigerpanzer_02 <37453987+Tigerpanzer02@users.noreply.github.com> Date: Sat, 13 Jul 2024 01:50:13 +0200 Subject: [PATCH] Changed ServerVersion as 1.20.6+ removed package nms --- build.gradle.kts | 2 +- .../plugily/projects/murdermystery/arena/ArenaEvents.java | 2 +- .../murdermystery/arena/special/SpecialBlockEvents.java | 2 +- .../plugily/projects/murdermystery/events/PluginEvents.java | 6 +++--- .../projects/murdermystery/handlers/CorpseHandler.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a1274765..429f7156 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ repositories { } dependencies { - implementation("plugily.projects:MiniGamesBox-Classic:1.3.12") { isTransitive = false } + implementation("plugily.projects:MiniGamesBox-Classic:1.3.13") { isTransitive = false } compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT") compileOnly("org.jetbrains:annotations:24.0.1") diff --git a/src/main/java/plugily/projects/murdermystery/arena/ArenaEvents.java b/src/main/java/plugily/projects/murdermystery/arena/ArenaEvents.java index c8b0b9dc..9d38e2d2 100644 --- a/src/main/java/plugily/projects/murdermystery/arena/ArenaEvents.java +++ b/src/main/java/plugily/projects/murdermystery/arena/ArenaEvents.java @@ -240,7 +240,7 @@ public void onMurdererDamage(EntityDamageByEntityEvent e) { } //check if sword has cooldown - if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_11_R1)) { + if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_11)) { if(plugin.getUserManager().getUser(attacker).getCooldown("sword_attack") > 0) { return; } diff --git a/src/main/java/plugily/projects/murdermystery/arena/special/SpecialBlockEvents.java b/src/main/java/plugily/projects/murdermystery/arena/special/SpecialBlockEvents.java index 5361ae9f..bbde79e5 100644 --- a/src/main/java/plugily/projects/murdermystery/arena/special/SpecialBlockEvents.java +++ b/src/main/java/plugily/projects/murdermystery/arena/special/SpecialBlockEvents.java @@ -63,7 +63,7 @@ public void onSpecialBlockClick(PlayerInteractEvent event) { if(event.getClickedBlock() == null) return; - if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_11_R1) && event.getHand() == org.bukkit.inventory.EquipmentSlot.OFF_HAND) { + if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_11) && event.getHand() == org.bukkit.inventory.EquipmentSlot.OFF_HAND) { return; } diff --git a/src/main/java/plugily/projects/murdermystery/events/PluginEvents.java b/src/main/java/plugily/projects/murdermystery/events/PluginEvents.java index 9f4f5828..ac977269 100644 --- a/src/main/java/plugily/projects/murdermystery/events/PluginEvents.java +++ b/src/main/java/plugily/projects/murdermystery/events/PluginEvents.java @@ -91,7 +91,7 @@ public void onSwordThrow(PlayerInteractEvent event) { return; } attackerUser.setCooldown("sword_shoot", swordFlyCooldown); - if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_11_R1)) { + if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_11)) { attackerUser.setCooldown("sword_attack", (plugin.getConfig().getInt("Sword.Cooldown.Attack", 1))); } else { VersionUtils.setMaterialCooldown(attacker ,plugin.getSwordSkinManager().getMurdererSword(attacker).getType(), 20 * (plugin.getConfig().getInt("Sword.Cooldown.Attack", 1))); @@ -107,7 +107,7 @@ private void createFlyingSword(Player attacker, IUser attackerUser) { standStart.setYaw(loc.getYaw()); ArmorStand stand = (ArmorStand) attacker.getWorld().spawnEntity(standStart, EntityType.ARMOR_STAND); stand.setVisible(false); - if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_8_R3)) { + if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_8_8)) { stand.setInvulnerable(true); stand.setSilent(true); } @@ -120,7 +120,7 @@ private void createFlyingSword(Player attacker, IUser attackerUser) { stand.setGravity(false); stand.setRemoveWhenFarAway(true); - if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_8_R3)) { + if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_8_8)) { stand.setMarker(true); } diff --git a/src/main/java/plugily/projects/murdermystery/handlers/CorpseHandler.java b/src/main/java/plugily/projects/murdermystery/handlers/CorpseHandler.java index 3976411f..253f2f00 100644 --- a/src/main/java/plugily/projects/murdermystery/handlers/CorpseHandler.java +++ b/src/main/java/plugily/projects/murdermystery/handlers/CorpseHandler.java @@ -87,7 +87,7 @@ public void spawnCorpse(Player player, Arena arena) { head.setItemMeta(meta); stand.setVisible(false); - if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16_R1)) { + if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16)) { stand.getEquipment().setHelmet(head); } else { stand.setHelmet(head);