Update the way monthly bonus chests are given
This commit is contained in:
parent
f3dcb742b5
commit
e38c3e6e86
@ -15,6 +15,10 @@ import java.util.TimeZone;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||||
|
import net.minecraft.server.v1_8_R3.EntityCreeper;
|
||||||
|
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
@ -60,7 +64,6 @@ import mineplex.core.donation.DonationManager;
|
|||||||
import mineplex.core.gadget.GadgetManager;
|
import mineplex.core.gadget.GadgetManager;
|
||||||
import mineplex.core.hologram.Hologram;
|
import mineplex.core.hologram.Hologram;
|
||||||
import mineplex.core.hologram.HologramManager;
|
import mineplex.core.hologram.HologramManager;
|
||||||
import mineplex.core.inventory.ClientItem;
|
|
||||||
import mineplex.core.inventory.InventoryManager;
|
import mineplex.core.inventory.InventoryManager;
|
||||||
import mineplex.core.npc.Npc;
|
import mineplex.core.npc.Npc;
|
||||||
import mineplex.core.npc.NpcManager;
|
import mineplex.core.npc.NpcManager;
|
||||||
@ -80,13 +83,10 @@ import mineplex.database.Tables;
|
|||||||
import mineplex.database.tables.records.BonusRecord;
|
import mineplex.database.tables.records.BonusRecord;
|
||||||
import mineplex.serverdata.commands.ServerCommandManager;
|
import mineplex.serverdata.commands.ServerCommandManager;
|
||||||
import mineplex.serverdata.database.DBPool;
|
import mineplex.serverdata.database.DBPool;
|
||||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
|
||||||
import net.minecraft.server.v1_8_R3.EntityCreeper;
|
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
|
|
||||||
|
|
||||||
public class BonusManager extends MiniClientPlugin<BonusClientData> implements ILoginProcessor
|
public class BonusManager extends MiniClientPlugin<BonusClientData> implements ILoginProcessor
|
||||||
{
|
{
|
||||||
public static final TimeZone TIMEZONE = TimeZone.getTimeZone("UTC");
|
private static final TimeZone TIMEZONE = TimeZone.getTimeZone("UTC");
|
||||||
|
|
||||||
private static long timeOffSet = 0;
|
private static long timeOffSet = 0;
|
||||||
|
|
||||||
@ -838,31 +838,31 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
|||||||
if (oldChests > 0)
|
if (oldChests > 0)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(oldChests + " Old Chests")));
|
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(oldChests + " Old Chests")));
|
||||||
_inventoryManager.Get(player).addItem(new ClientItem(_inventoryManager.getItem(TreasureType.OLD.getItemName()), oldChests));
|
_inventoryManager.addItemToInventory(player, TreasureType.OLD.getItemName(), oldChests);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ancientChests > 0)
|
if (ancientChests > 0)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(ancientChests + " Ancient Chests")));
|
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(ancientChests + " Ancient Chests")));
|
||||||
_inventoryManager.Get(player).addItem(new ClientItem(_inventoryManager.getItem(TreasureType.ANCIENT.getItemName()), ancientChests));
|
_inventoryManager.addItemToInventory(player, TreasureType.ANCIENT.getItemName(), ancientChests);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mythicalChests > 0)
|
if (mythicalChests > 0)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(mythicalChests + " Mythical Chests")));
|
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(mythicalChests + " Mythical Chests")));
|
||||||
_inventoryManager.Get(player).addItem(new ClientItem(_inventoryManager.getItem(TreasureType.MYTHICAL.getItemName()), mythicalChests));
|
_inventoryManager.addItemToInventory(player, TreasureType.MYTHICAL.getItemName(), mythicalChests);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (illuminatedChests > 0)
|
if (illuminatedChests > 0)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(illuminatedChests + " Illuminated Chests")));
|
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(illuminatedChests + " Illuminated Chests")));
|
||||||
_inventoryManager.Get(player).addItem(new ClientItem(_inventoryManager.getItem(TreasureType.ILLUMINATED.getItemName()), illuminatedChests));
|
_inventoryManager.addItemToInventory(player, TreasureType.ILLUMINATED.getItemName(), illuminatedChests);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (omegaChests > 0)
|
if (omegaChests > 0)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(omegaChests + " Omega Chests")));
|
UtilPlayer.message(player, F.main(_creeperName, "Rewarded " + F.elem(omegaChests + " Omega Chests")));
|
||||||
_inventoryManager.Get(player).addItem(new ClientItem(_inventoryManager.getItem(TreasureType.OMEGA.getItemName()), omegaChests));
|
_inventoryManager.addItemToInventory(player, TreasureType.OMEGA.getItemName(), omegaChests);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gems > 0)
|
if (gems > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user