From b2b51fa9b2d13f0173c930096a7c41c227eb16e7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 25 Nov 2022 08:05:40 +0100 Subject: [PATCH] Finalize CalendarCommand --- src/de/steamwar/bungeecore/commands/CalendarCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/commands/CalendarCommand.java b/src/de/steamwar/bungeecore/commands/CalendarCommand.java index 65431e3..45bf05b 100644 --- a/src/de/steamwar/bungeecore/commands/CalendarCommand.java +++ b/src/de/steamwar/bungeecore/commands/CalendarCommand.java @@ -85,7 +85,8 @@ public class CalendarCommand extends SWCommand { List items = new ArrayList<>(); for (Map.Entry present : dayToSchematicId.entrySet()) { boolean b = NodeMember.getNodeMember(present.getValue(), user.getId()) != null; - SWItem swItem = b ? SWItem.getSkull("MHF_Chest") : SWItem.getSkull("MHF_Present1"); + SWItem randomPresent = random.nextDouble() > 0.5 ? SWItem.getSkull("MHF_Present1") : SWItem.getSkull("MHF_Present2"); + SWItem swItem = b ? SWItem.getSkull("MHF_Chest") : randomPresent; swItem.setName(Message.parse("ADVENT_CALENDAR_DAY", player, present.getKey())); swItem.setCallback(click -> { if (b) return;