Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lang3 validate with guava #6931

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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