From 6ed6c324ece3b4df67dac9b900405baf37b540b9 Mon Sep 17 00:00:00 2001 From: samczsun Date: Thu, 15 Dec 2016 14:56:47 -0500 Subject: [PATCH] Update Holiday Cheer Hover --- .../core/titles/tracks/HolidayCheerTrack.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/HolidayCheerTrack.java b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/HolidayCheerTrack.java index b6956430e..06dcfd380 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/HolidayCheerTrack.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/titles/tracks/HolidayCheerTrack.java @@ -10,15 +10,15 @@ import net.md_5.bungee.api.ChatColor; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import mineplex.core.Managers; +import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.event.ItemGadgetUseEvent; import mineplex.core.gadget.event.PlayerUseCoalEvent; import mineplex.core.gadget.gadgets.item.ItemBow; -import mineplex.core.gadget.gadgets.item.ItemCoal; import mineplex.core.gadget.gadgets.item.ItemFlowerGift; import mineplex.core.gadget.gadgets.item.ItemFreezeCannon; import mineplex.core.gadget.gadgets.item.ItemLovePotion; import mineplex.core.gadget.gadgets.item.ItemSnowball; -import mineplex.core.gadget.set.SetCandyCane; import mineplex.core.gadget.set.SetCupidsLove; import mineplex.core.gadget.set.SetFreedom; import mineplex.core.gadget.set.SetFrostLord; @@ -52,6 +52,8 @@ public class HolidayCheerTrack extends Track HOLIDAY_SETS.add(SetFrostLord.class); } + private final GadgetManager _gadgetManager = Managers.require(GadgetManager.class); + public HolidayCheerTrack() { super("holiday-cheer", "Holiday Cheer", "This track is unlocked by participating in Holiday Events"); @@ -93,9 +95,14 @@ public class HolidayCheerTrack extends Track )); getRequirements() + .withRequirement(100, "Special Holiday Event Chests") .withRequirement(5, "game played in Holiday Games") .withRequirement(25, "win in Holiday Games"); + Map points = new HashMap<>(); + POINTS.forEach((clazz, value) -> points.merge(value, _gadgetManager.getGadget(clazz).getName(), (a, b) -> a + "/" + b)); + points.forEach((value, type) -> getRequirements().withRequirement(value, type)); + HOLIDAY_SETS.forEach(clazz -> getRequirements().withSetBonus(clazz, 2)); }