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));
|
||||
}
|
||||
if (component == null)
|
||||
player.sendMessage(Util.parseMiniMessage(
|
||||
"<yellow>No shops with less than <minimum_stock> stock found.</yellow>",
|
||||
TagResolver.resolver(Placeholder.parsed("minimum_stock", minimumStock + ""))));
|
||||
if (minimumStock == -1)
|
||||
player.sendMessage(Util.parseMiniMessage("<yellow>No shops found in specified radius.<yellow>"));
|
||||
else
|
||||
player.sendMessage(Util.parseMiniMessage(
|
||||
"<yellow>No shops with less than <minimum_stock> stock found.</yellow>",
|
||||
TagResolver.resolver(Placeholder.parsed("minimum_stock", minimumStock + ""))));
|
||||
else
|
||||
player.sendMessage(component);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user