fixed christmas elf name
pet names now have limited range
This commit is contained in:
parent
0198120c70
commit
9136165d4f
@ -153,9 +153,14 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user