From ce2c0261fe0ca8e559ebe6b868552e9979b00495 Mon Sep 17 00:00:00 2001 From: StarWishsama Date: Sun, 10 Sep 2023 16:09:28 +0800 Subject: [PATCH] chore: use `Preconditions` --- .../slimefun4/api/events/SlimefunGuideOpenEvent.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java index 9a6f23effa..bb700b70e4 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java @@ -1,5 +1,6 @@ package io.github.thebusybiscuit.slimefun4.api.events; +import com.google.common.base.Preconditions; import javax.annotation.Nonnull; import org.apache.commons.lang.Validate; @@ -28,9 +29,9 @@ public class SlimefunGuideOpenEvent extends Event implements Cancellable { private boolean cancelled; public SlimefunGuideOpenEvent(@Nonnull Player p, @Nonnull ItemStack guide, @Nonnull SlimefunGuideMode layout) { - Validate.notNull(p, "The Player cannot be null"); - Validate.notNull(guide, "Guide cannot be null"); - Validate.notNull(layout, "Layout cannot be null"); + Preconditions.checkArgument(p != null, "The Player cannot be null"); + Preconditions.checkArgument(guide != null, "Guide cannot be null"); + Preconditions.checkArgument(layout != null, "Layout cannot be null"); this.player = p; this.guide = guide; this.layout = layout; @@ -73,7 +74,7 @@ public SlimefunGuideOpenEvent(@Nonnull Player p, @Nonnull ItemStack guide, @Nonn * The new {@link SlimefunGuideMode} */ public void setGuideLayout(@Nonnull SlimefunGuideMode layout) { - Validate.notNull(layout, "You must specify a layout that is not-null!"); + Preconditions.checkArgument(layout != null, "You must specify a layout that is not-null!"); this.layout = layout; }