From b676bebce397cb8824e0a3b8dbcdeeb26da1c99f Mon Sep 17 00:00:00 2001 From: huanmeng-qwq <1871735932@qq.com> Date: Sat, 28 Dec 2024 18:33:24 +0800 Subject: [PATCH] style: Add @NonNull --- .../me/huanmeng/opensource/bukkit/gui/slot/PlayerSlot.java | 3 ++- .../me/huanmeng/opensource/bukkit/gui/slot/PlayerSlots.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlot.java b/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlot.java index dca30fa..40c0e93 100644 --- a/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlot.java +++ b/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlot.java @@ -9,6 +9,7 @@ import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryType; import org.checkerframework.checker.nullness.qual.NonNull; +import org.jetbrains.annotations.NotNull; /** * 代表玩家背包中的槽位 @@ -43,7 +44,7 @@ public PlayerSlot asPlayer() { return this; } - public Slot getSlot() { + public @NotNull Slot getSlot() { return slot; } } diff --git a/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlots.java b/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlots.java index b0003a6..66ba68c 100644 --- a/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlots.java +++ b/core/src/main/java/me/huanmeng/opensource/bukkit/gui/slot/PlayerSlots.java @@ -30,7 +30,7 @@ public PlayerSlots asPlayer() { return this; } - public Slots getSlots() { + public @NotNull Slots getSlots() { return slots; } }