#Shop
1 messages ยท Page 1 of 1 (latest)
When you add items to the shop do a date check beforehand
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd");
LocalDateTime now = LocalDateTime.now();
if (dtf.format(now)=="2022/02/01")
Inventory.addItem(Stone);
else if (dtf.format(now)=="2022/02/02")
Inventory.addItem(Cobblestone);
Oke top!
^^ That is not working code though
Owh?
it's just a rough explanation.
oof ok
We aren't here to just Give you code we just help with the problems ๐
Like I said, it's a rough explanation and not working code. that's just the logic of how to do it
Ok