Remove changes to string API contracts introduced by prior commits

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-06-12 20:39:58 +10:00
parent dacee77a67
commit cfdd51c0cd
3 changed files with 2 additions and 6 deletions

View File

@ -1639,7 +1639,6 @@ public final class CraftServer implements Server {
@Deprecated
public OfflinePlayer getOfflinePlayer(String name) {
Preconditions.checkArgument(name != null, "name cannot be null");
Preconditions.checkArgument(!name.isBlank(), "name cannot be empty");
OfflinePlayer result = getPlayerExact(name);
if (result == null) {
@ -1707,7 +1706,6 @@ public final class CraftServer implements Server {
@Override
public void banIP(String address) {
Preconditions.checkArgument(address != null, "address cannot be null");
Preconditions.checkArgument(!address.isBlank(), "address cannot be empty");
this.getBanList(org.bukkit.BanList.Type.IP).addBan(address, null, null, null);
}
@ -1715,7 +1713,6 @@ public final class CraftServer implements Server {
@Override
public void unbanIP(String address) {
Preconditions.checkArgument(address != null, "address cannot be null");
Preconditions.checkArgument(!address.isBlank(), "address cannot be empty");
this.getBanList(org.bukkit.BanList.Type.IP).pardon(address);
}

View File

@ -1565,7 +1565,6 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch) {
Preconditions.checkArgument(loc != null, "Location cannot be null");
Preconditions.checkArgument(sound != null, "Sound cannot be null");
Preconditions.checkArgument(!sound.isBlank(), "Sound cannot be empty");
Preconditions.checkArgument(category != null, "Category cannot be null");
double x = loc.getX();
@ -1674,7 +1673,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean isGameRule(String rule) {
Preconditions.checkArgument(rule != null, "String rule cannot be null");
Preconditions.checkArgument(!rule.isBlank(), "String rule cannot be empty");
Preconditions.checkArgument(!rule.isEmpty(), "String rule cannot be empty");
return getGameRulesNMS().containsKey(rule);
}

View File

@ -42,7 +42,7 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
@Override
public void setAuthor(String author) {
Preconditions.checkArgument(author != null, "Author name cannot be null");
Preconditions.checkArgument(!author.isBlank(), "Author name cannot be empty");
Preconditions.checkArgument(!author.isEmpty(), "Author name cannot be empty");
getSnapshot().author = author;
}