Skip to content

Commit

Permalink
#patch Fixed 1.20.6 and 1.21 (#79)
Browse files Browse the repository at this point in the history
* Bump version from 2.0.11 to 2.0.11-SNAPSHOT0

* Changed ServerVersion as 1.20.6+ removed package nms

* Bump version from 2.0.11-SNAPSHOT0 to 2.0.11-SNAPSHOT1

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
  • Loading branch information
Tigerpanzer02 and version-bump[github-action] authored Jul 12, 2024
1 parent be284a5 commit c98b605
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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")
compileOnly(files("lib/CorpseReborn.jar"))
}

group = "plugily.projects"
version = "2.0.11"
version = "2.0.11-SNAPSHOT1"
description = "MurderMystery"

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand All @@ -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);
}
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c98b605

Please sign in to comment.