@@ -13,21 +13,20 @@ public class AttributeCompat {
13
13
public static Attribute LUCK ;
14
14
15
15
static {
16
- /*
17
- Saved for updating to spigot-api 1.21.3+
16
+
18
17
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" ) ;
24
23
} 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
+ }
31
30
}
32
31
33
32
private static Attribute fromRegistry (String key ) {
0 commit comments