Get shop as Optional

This commit is contained in:
P0nk
2023-03-30 06:40:16 +02:00
parent fe9dd75a23
commit 39d759595d
4 changed files with 13 additions and 16 deletions

View File

@@ -36,6 +36,6 @@ public class GmShopCommand extends Command {
@Override
public void execute(Client c, String[] params, CommandContext ctx) {
ctx.shopFactory().getShop(GM_SHOP_ID).sendShop(c);
ctx.shopFactory().getShop(GM_SHOP_ID).ifPresent(shop -> shop.sendShop(c));
}
}