diff --git a/Plugins/Mineplex.Core/src/mineplex/core/pet/PetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/pet/PetManager.java index 3554a08a9..824bf1f32 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/pet/PetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/pet/PetManager.java @@ -141,9 +141,14 @@ public class PetManager extends MiniClientPlugin } Creature pet = (Creature)_creatureModule.SpawnEntity(location, entityType); - pet.setCustomNameVisible(true); - pet.setCustomName(Get(player).GetPets().get(entityType)); + //Named Pet + if (Get(player).GetPets().get(entityType) != null && Get(player).GetPets().get(entityType).length() > 0) + { + //pet.setCustomNameVisible(true); + pet.setCustomName(Get(player).GetPets().get(entityType)); + } + if (pet instanceof Zombie) { ((Zombie) pet).setBaby(true); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java index 3b6d6fbc7..fd2469613 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java @@ -14,7 +14,7 @@ public enum RewardRarity * (Fireworks, sounds, etc) */ - COMMON("Common", cAqua), UNCOMMON("Uncommon", cGreen), RARE("Rare", cGold), LEGENDARY("Legendary", cRed); + OTHER("Other", cWhite), COMMON("Common", cAqua), UNCOMMON("Uncommon", cGreen), RARE("Rare", cGold), LEGENDARY("Legendary", cRed); private String _name; private String _color; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index ee3c79f21..93eabd3dd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -14,6 +14,7 @@ import org.bukkit.Material; import org.bukkit.OfflinePlayer; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -57,6 +58,8 @@ import mineplex.core.pet.PetManager; import mineplex.core.portal.Portal; import mineplex.core.preferences.PreferencesManager; import mineplex.core.projectile.ProjectileManager; +import mineplex.core.reward.RewardRarity; +import mineplex.core.reward.rewards.PetReward; import mineplex.core.stats.StatsManager; import mineplex.core.status.ServerStatusManager; import mineplex.core.task.TaskManager; @@ -114,6 +117,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation private DisguiseManager _disguiseManager; private DonationManager _donationManager; private ConditionManager _conditionManager; + private PetManager _petManager; private Creature _creature; private DamageManager _damageManager; private Explosion _explosionManager; @@ -174,6 +178,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation // Modules _blockRestore = new BlockRestore(plugin); + _blood = blood; @@ -216,6 +221,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation _inventoryManager = inventoryManager; _cosmeticManager = cosmeticManager; _portal = portal; + _petManager = petManager; // Shop _arcadeShop = new ArcadeShop(this, clientManager, donationManager); @@ -1074,4 +1080,12 @@ public class ArcadeManager extends MiniPlugin implements IRelation { return _idleManager; } + + public void rewardPet(Player player, String pet, EntityType type) + { + PetReward reward = new PetReward(_petManager, _inventoryManager, _donationManager, pet, pet, type, RewardRarity.OTHER, 0); + + if (reward.canGiveReward(player)) + reward.giveReward(null, player); + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Christmas.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Christmas.java index 4c43a8a17..10e9278c9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Christmas.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/christmas/Christmas.java @@ -10,6 +10,7 @@ import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.craftbukkit.v1_7_R4.CraftServer; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.entity.Villager; import org.bukkit.event.EventHandler; @@ -33,6 +34,7 @@ import mineplex.core.common.util.UtilTime; import mineplex.core.packethandler.IPacketHandler; import mineplex.core.packethandler.PacketInfo; import mineplex.core.recharge.Recharge; +import mineplex.core.reward.rewards.PetReward; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; @@ -455,8 +457,8 @@ public class Christmas extends SoloGame for (Player player : GetPlayers(false)) { - Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), player.getUniqueId(), "Christmas Elf", false, 0, true); - Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), player.getUniqueId(), "Christmas Elf Pet", false, 0, true); + Manager.rewardPet(player, "Christmas Elf", EntityType.VILLAGER); + Manager.GetGame().AddGems(player, 30, "Slaying the Pumpkin King", false); Manager.GetGame().AddGems(player, 10, "Participation", false); }