Fixed weird stock message when stock not specified and no shops are found
This commit is contained in:
parent
515613c36d
commit
72fd7efc86
|
|
@ -83,9 +83,12 @@ public class CheckStockCommand {
|
||||||
component = component.append(Component.newline()).append(Util.parseMiniMessage(putInConfig, resolver));
|
component = component.append(Component.newline()).append(Util.parseMiniMessage(putInConfig, resolver));
|
||||||
}
|
}
|
||||||
if (component == null)
|
if (component == null)
|
||||||
player.sendMessage(Util.parseMiniMessage(
|
if (minimumStock == -1)
|
||||||
"<yellow>No shops with less than <minimum_stock> stock found.</yellow>",
|
player.sendMessage(Util.parseMiniMessage("<yellow>No shops found in specified radius.<yellow>"));
|
||||||
TagResolver.resolver(Placeholder.parsed("minimum_stock", minimumStock + ""))));
|
else
|
||||||
|
player.sendMessage(Util.parseMiniMessage(
|
||||||
|
"<yellow>No shops with less than <minimum_stock> stock found.</yellow>",
|
||||||
|
TagResolver.resolver(Placeholder.parsed("minimum_stock", minimumStock + ""))));
|
||||||
else
|
else
|
||||||
player.sendMessage(component);
|
player.sendMessage(component);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user