Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>26.0.2-1</version>
<scope>compile</scope>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/pro/cloudnode/smp/anvilunlocker/AnvilUnlocker.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import org.bukkit.inventory.AnvilInventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
import org.jspecify.annotations.NullMarked;

@NullMarked
public class AnvilUnlocker extends JavaPlugin implements Listener {

private int maximumCost = Short.MAX_VALUE;

@Override
Expand All @@ -36,7 +36,7 @@ public void reloadConfig() {
}

@EventHandler(priority = EventPriority.MONITOR)
private void onInventoryClose(@NotNull InventoryCloseEvent event) {
private void onInventoryClose(InventoryCloseEvent event) {
if (event.getInventory() instanceof AnvilInventory
&& event.getPlayer() instanceof Player
&& event.getPlayer().getGameMode() != GameMode.CREATIVE) {
Expand All @@ -45,7 +45,7 @@ private void onInventoryClose(@NotNull InventoryCloseEvent event) {
}

@EventHandler(priority = EventPriority.MONITOR)
private void onPrepareAnvil(@NotNull PrepareAnvilEvent event) {
private void onPrepareAnvil(PrepareAnvilEvent event) {
if (!(event.getView().getPlayer() instanceof Player)
|| event.getView().getPlayer().getGameMode() == GameMode.CREATIVE) {
return;
Expand All @@ -65,7 +65,7 @@ private void onPrepareAnvil(@NotNull PrepareAnvilEvent event) {
});
}

public void setInstantBuild(@NotNull Player player, boolean instantBuild) {
public void setInstantBuild(Player player, boolean instantBuild) {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ABILITIES);
packet.getBooleans().write(0, player.isInvulnerable());
packet.getBooleans().write(1, player.isFlying());
Expand Down
Loading