Finish converting all events to jspecify annotations

This commit is contained in:
Jake Potrebic
2024-09-29 16:48:34 -07:00
parent fa97c59a4e
commit 29a25df60e
78 changed files with 757 additions and 883 deletions

View File

@@ -17,14 +17,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.player.PlayerAnimationType;
+import org.bukkit.inventory.EquipmentSlot;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NullMarked;
+
+@NullMarked
+public class PlayerArmSwingEvent extends PlayerAnimationEvent {
+
+ private final EquipmentSlot equipmentSlot;
+
+ @ApiStatus.Internal
+ public PlayerArmSwingEvent(@NotNull Player player, @NotNull EquipmentSlot equipmentSlot) {
+ public PlayerArmSwingEvent(final Player player, final EquipmentSlot equipmentSlot) {
+ super(player, equipmentSlot == EquipmentSlot.HAND ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING);
+ this.equipmentSlot = equipmentSlot;
+ }
@@ -34,7 +35,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @return the hand
+ */
+ @NotNull
+ public EquipmentSlot getHand() {
+ return this.equipmentSlot;
+ }