Skip to content

Commit

Permalink
chore: use Preconditions
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Sep 10, 2023
1 parent ee2cbf9 commit ce2c026
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit ce2c026

Please sign in to comment.