mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-07 08:58:27 +01:00
Fix nullable annotations in PanelItemBuilder
If null checks are being done, then the parameter annotation must be @Nullable.
This commit is contained in:
parent
0f63353e2b
commit
3e94418e54
@ -8,7 +8,6 @@ import java.util.List;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.eclipse.jdt.annotation.NonNull;
|
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.panels.PanelItem;
|
import world.bentobox.bentobox.api.panels.PanelItem;
|
||||||
@ -29,12 +28,12 @@ public class PanelItemBuilder {
|
|||||||
private final static ItemStack DEFAULT_ICON = new ItemStack(Material.PAPER);
|
private final static ItemStack DEFAULT_ICON = new ItemStack(Material.PAPER);
|
||||||
|
|
||||||
|
|
||||||
public PanelItemBuilder icon(@NonNull Material icon) {
|
public PanelItemBuilder icon(@Nullable Material icon) {
|
||||||
this.icon = icon == null ? DEFAULT_ICON : new ItemStack(icon);
|
this.icon = icon == null ? DEFAULT_ICON : new ItemStack(icon);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PanelItemBuilder icon(@NonNull ItemStack icon) {
|
public PanelItemBuilder icon(@Nullable ItemStack icon) {
|
||||||
this.icon = icon == null ? DEFAULT_ICON : icon;
|
this.icon = icon == null ? DEFAULT_ICON : icon;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user