Skip to content

Commit 4fcb242

Browse files
committed
Fix attribute errors on 1.21.3
1 parent 7226d7e commit 4fcb242

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

bukkit/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535
implementation(project(":common"))
3636
implementation(project(":api-bukkit"))
3737
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
38-
implementation("de.tr7zw:item-nbt-api:2.13.3-SNAPSHOT")
38+
implementation("de.tr7zw:item-nbt-api:2.14.0")
3939
implementation("org.bstats:bstats-bukkit:3.0.2")
4040
implementation("net.kyori:adventure-text-minimessage:4.16.0")
4141
implementation("net.kyori:adventure-platform-bukkit:4.3.3")

bukkit/src/main/java/dev/aurelium/auraskills/bukkit/util/AttributeCompat.java

+12-13
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,20 @@ public class AttributeCompat {
1313
public static Attribute LUCK;
1414

1515
static {
16-
/*
17-
Saved for updating to spigot-api 1.21.3+
16+
1817
if (VersionUtils.isAtLeastVersion(21, 2)) {
19-
MAX_HEALTH = Attribute.MAX_HEALTH;
20-
MOVEMENT_SPEED = Attribute.MOVEMENT_SPEED;
21-
ATTACK_DAMAGE = Attribute.ATTACK_DAMAGE;
22-
ATTACK_SPEED = Attribute.ATTACK_SPEED;
23-
LUCK = Attribute.LUCK;
18+
MAX_HEALTH = fromRegistry("max_health");
19+
MOVEMENT_SPEED = fromRegistry("movement_speed");
20+
ATTACK_DAMAGE = fromRegistry("attack_damage");
21+
ATTACK_SPEED = fromRegistry("attack_speed");
22+
LUCK = fromRegistry("luck");
2423
} else {
25-
*/
26-
MAX_HEALTH = fromRegistry("generic.max_health");
27-
MOVEMENT_SPEED = fromRegistry("generic.movement_speed");
28-
ATTACK_DAMAGE = fromRegistry("generic.attack_damage");
29-
ATTACK_SPEED = fromRegistry("generic.attack_speed");
30-
LUCK = fromRegistry("generic.luck");
24+
MAX_HEALTH = fromRegistry("generic.max_health");
25+
MOVEMENT_SPEED = fromRegistry("generic.movement_speed");
26+
ATTACK_DAMAGE = fromRegistry("generic.attack_damage");
27+
ATTACK_SPEED = fromRegistry("generic.attack_speed");
28+
LUCK = fromRegistry("generic.luck");
29+
}
3130
}
3231

3332
private static Attribute fromRegistry(String key) {

0 commit comments

Comments
 (0)