1414import org .bukkit .inventory .AnvilInventory ;
1515import org .bukkit .inventory .ItemStack ;
1616import org .bukkit .plugin .java .JavaPlugin ;
17- import org .jetbrains .annotations .NotNull ;
17+ import org .jspecify .annotations .NullMarked ;
1818
19+ @ NullMarked
1920public class AnvilUnlocker extends JavaPlugin implements Listener {
20-
2121 private int maximumCost = Short .MAX_VALUE ;
2222
2323 @ Override
@@ -36,7 +36,7 @@ public void reloadConfig() {
3636 }
3737
3838 @ EventHandler (priority = EventPriority .MONITOR )
39- private void onInventoryClose (@ NotNull InventoryCloseEvent event ) {
39+ private void onInventoryClose (InventoryCloseEvent event ) {
4040 if (event .getInventory () instanceof AnvilInventory
4141 && event .getPlayer () instanceof Player
4242 && event .getPlayer ().getGameMode () != GameMode .CREATIVE ) {
@@ -45,7 +45,7 @@ private void onInventoryClose(@NotNull InventoryCloseEvent event) {
4545 }
4646
4747 @ EventHandler (priority = EventPriority .MONITOR )
48- private void onPrepareAnvil (@ NotNull PrepareAnvilEvent event ) {
48+ private void onPrepareAnvil (PrepareAnvilEvent event ) {
4949 if (!(event .getView ().getPlayer () instanceof Player )
5050 || event .getView ().getPlayer ().getGameMode () == GameMode .CREATIVE ) {
5151 return ;
@@ -65,7 +65,7 @@ private void onPrepareAnvil(@NotNull PrepareAnvilEvent event) {
6565 });
6666 }
6767
68- public void setInstantBuild (@ NotNull Player player , boolean instantBuild ) {
68+ public void setInstantBuild (Player player , boolean instantBuild ) {
6969 PacketContainer packet = new PacketContainer (PacketType .Play .Server .ABILITIES );
7070 packet .getBooleans ().write (0 , player .isInvulnerable ());
7171 packet .getBooleans ().write (1 , player .isFlying ());
0 commit comments