Skip to content

Commit

Permalink
Replace lang3 validate with guava (#6931)
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr authored Aug 16, 2023
1 parent dc6678e commit 41edf47
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.palmergames.bukkit.towny.object;

import com.google.common.base.Preconditions;
import com.palmergames.bukkit.towny.TownyAPI;
import org.apache.commons.lang3.Validate;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.util.NumberConversions;
Expand Down Expand Up @@ -71,7 +71,7 @@ public static Position positionOf(@NotNull TownyWorld world, double x, double y,
}

public static Position positionOf(@NotNull TownyWorld world, double x, double y, double z, float pitch, float yaw) {
Validate.notNull(world, "world cannot be null");
Preconditions.checkNotNull(world, "world cannot be null");
return new Position(world, x, y, z, pitch, yaw);
}

Expand All @@ -86,7 +86,7 @@ public Position blockPosition() {
}

public static Position ofLocation(@NotNull Location location) {
Validate.notNull(location, "location cannot be null");
Preconditions.checkNotNull(location, "location cannot be null");

final World bukkitWorld = location.getWorld();
if (bukkitWorld == null)
Expand Down Expand Up @@ -143,7 +143,7 @@ public String[] serialize() {
}

public static Position deserialize(@NotNull final String[] data) throws IllegalArgumentException {
Validate.notNull(data, "data cannot be null");
Preconditions.checkNotNull(data, "data cannot be null");

final TownyWorld world = TownyAPI.getInstance().getTownyWorld(data[0]);

Expand Down

0 comments on commit 41edf47

Please sign in to comment.