mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-29 20:27:42 +01:00
Modify exception messages
This commit is contained in:
parent
92e18395b4
commit
0b5a059a2f
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user