Fixed weird stock message when stock not specified and no shops are found
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user