Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-12-14 20:50:35 -05:00
commit eefa4de838
4 changed files with 26 additions and 5 deletions

View File

@ -141,8 +141,13 @@ public class PetManager extends MiniClientPlugin<PetClient>
}
Creature pet = (Creature)_creatureModule.SpawnEntity(location, entityType);
pet.setCustomNameVisible(true);
//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)
{

View File

@ -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;

View File

@ -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;
@ -175,6 +179,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
// Modules
_blockRestore = new BlockRestore(plugin);
_blood = blood;
_explosionManager = new Explosion(plugin, _blockRestore);
@ -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);
}
}

View File

@ -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);
}