Modify exception messages

This commit is contained in:
filoghost 2021-08-25 09:09:00 +02:00
parent 92e18395b4
commit 0b5a059a2f
5 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ class DefaultHolographicDisplaysAPI implements HolographicDisplaysAPI {
@Override
public @NotNull Hologram createHologram(@NotNull Location location) {
Preconditions.notNull(location, "location");
Preconditions.notNull(location.getWorld(), "location's world");
Preconditions.notNull(location.getWorld(), "location.getWorld()");
Preconditions.checkMainThread("async hologram creation");
return apiHologramManager.createHologram(new BaseHologramPosition(location), plugin);

View File

@ -35,7 +35,7 @@ public class V2HologramsAPIProvider extends HologramsAPIProvider {
public Hologram createHologram(Plugin plugin, Location source) {
Preconditions.notNull(plugin, "plugin");
Preconditions.notNull(source, "source");
Preconditions.notNull(source.getWorld(), "source's world");
Preconditions.notNull(source.getWorld(), "source.getWorld()");
Preconditions.checkMainThread("async hologram creation");
return hologramManager.createHologram(new BaseHologramPosition(source), plugin);

View File

@ -57,7 +57,7 @@ public abstract class BaseHologram extends BaseHologramComponent {
public void setPosition(@NotNull Location location) {
Preconditions.notNull(location, "location");
Preconditions.notNull(location.getWorld(), "location's world");
Preconditions.notNull(location.getWorld(), "location.getWorld()");
setPosition(location.getWorld().getName(), location.getX(), location.getY(), location.getZ());
}

View File

@ -31,7 +31,7 @@ public class BaseHologramPosition implements HologramPosition {
public BaseHologramPosition(@NotNull Location location) {
Preconditions.notNull(location, "location");
Preconditions.notNull(location.getWorld(), "location's world");
Preconditions.notNull(location.getWorld(), "location.getWorld()");
this.worldName = location.getWorld().getName();
this.x = location.getX();
this.y = location.getY();
@ -40,7 +40,7 @@ public class BaseHologramPosition implements HologramPosition {
public BaseHologramPosition(@NotNull HologramPosition position) {
Preconditions.notNull(position, "position");
Preconditions.notNull(position.getWorldName(), "position's worldName");
Preconditions.notNull(position.getWorldName(), "position.getWorldName()");
this.worldName = position.getWorldName();
this.x = position.getX();
this.y = position.getY();

View File

@ -42,7 +42,7 @@ public abstract class BaseItemHologramLine extends BaseClickableHologramLine imp
if (itemStack != null) {
Preconditions.checkArgument(0 < itemStack.getAmount() && itemStack.getAmount() <= 64,
"itemStack's amount must be between 1 and 64");
"itemStack.getAmount() must be between 1 and 64");
}
this.itemStack = clone(itemStack);
setChanged();