fixed pom.xml, updated dependencies, removed unnecessary annotations

This commit is contained in:
mfnalex 2022-03-08 15:17:01 +01:00
parent aaa6b30860
commit 9f76f51ed7
5 changed files with 13 additions and 13 deletions

View File

@ -220,6 +220,13 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>

View File

@ -11,8 +11,6 @@ import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* This event is called whenever ChestSort attempts to sort an inventory. Can be cancelled to prevent ChestSort from manipulating this inventory.
@ -52,7 +50,6 @@ public class ChestSortEvent extends Event implements Cancellable {
* Returns the location associated with this event. Might be null
* @return Location associated with this event, or null if no location has been set
*/
@Nullable
public Location getLocation() {
return loc;
}
@ -83,7 +80,6 @@ public class ChestSortEvent extends Event implements Cancellable {
* Returns the player associated with this event. Might be null
* @return Player associated with this event, or null if no player has been set
*/
@Nullable
public HumanEntity getPlayer() {
return p;
}
@ -92,7 +88,7 @@ public class ChestSortEvent extends Event implements Cancellable {
* Sets the player associated with this event
* @param p Player associated with this event, can be null
*/
public void setPlayer(@Nullable HumanEntity p) { this.p=p; }
public void setPlayer(HumanEntity p) { this.p=p; }
/**
* Prevents ChestSort from sorting/moving this specific slot
@ -144,7 +140,7 @@ public class ChestSortEvent extends Event implements Cancellable {
return unmovableItemStacks.contains(itemStack);
}
public @NotNull HandlerList getHandlers() {
public HandlerList getHandlers() {
return HANDLERS;
}

View File

@ -3,7 +3,6 @@ package de.jeff_media.chestsort.handlers;
import de.jeff_media.chestsort.ChestSortPlugin;
import de.jeff_media.chestsort.data.PlayerSetting;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.IOException;
@ -51,7 +50,7 @@ public class Logger {
logger.info(s);
}
public void logSort(Player p, @Nullable SortCause cause) {
public void logSort(Player p, SortCause cause) {
if(!log) return;
String settings = getPlayerSettings(p);
if(cause==null) cause = SortCause.UNKNOWN;

View File

@ -4,7 +4,6 @@ import de.jeff_media.chestsort.ChestSortPlugin;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.inventory.Inventory;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Method;
import java.util.Locale;
@ -31,7 +30,7 @@ public class CrateReloadedHook {
}
}
public static boolean isCrate(@NotNull final Block block) {
public static boolean isCrate(final Block block) {
try {
if(isCrateMethod != null) {
return (boolean) isCrateMethod.invoke(blockCrateRegistrarObject, block.getLocation());
@ -40,7 +39,7 @@ public class CrateReloadedHook {
return false;
}
public static boolean isCrate(@NotNull final Inventory inv) {
public static boolean isCrate(final Inventory inv) {
if(inv==null) return false;
if(inv.getHolder()==null) return false;
if(!main.getConfig().getBoolean("hook-cratereloaded",true)) return false;

View File

@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import de.jeff_media.chestsort.ChestSortPlugin;
import org.jetbrains.annotations.NotNull;
public class InventoryPagesHook {
@ -46,7 +45,7 @@ public class InventoryPagesHook {
}
public boolean isButton(@NotNull ItemStack item, int slot, @NotNull Inventory inv) {
public boolean isButton(ItemStack item, int slot, Inventory inv) {
if(!plugin.isHookInventoryPages()) {
return false;