Added halloween reward pet
minor bug fixes
This commit is contained in:
parent
256df99b7b
commit
eb5af41323
@ -37,6 +37,7 @@
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-pool2-2.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/Arcade.jar" todir="../../Testing/Arcade/plugins"/>
|
||||
</target>
|
||||
@ -78,6 +79,7 @@
|
||||
<zipfileset src="../Libraries/jooq-3.4.2.jar" />
|
||||
<zipfileset src="../Libraries/jedis-2.4.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-pool2-2.2.jar" />
|
||||
<zipfileset src="../Libraries/commons-dbcp2-2.0.1.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/Hub.jar" todir="../../Testing/Hub/plugins"/>
|
||||
</target>
|
||||
|
@ -7,6 +7,7 @@ public class C
|
||||
public static String Scramble = "§k";
|
||||
public static String Bold = "§l";
|
||||
public static String Strike = "§m";
|
||||
public static String BoldStrike = "§l§m";
|
||||
public static String Line = "§n";
|
||||
public static String Italics = "§o";
|
||||
|
||||
|
@ -515,6 +515,7 @@ public class UtilEnt
|
||||
Material beneath = player.getLocation().add(x, -1.5, z).getBlock().getType();
|
||||
if (player.getLocation().getY() % 0.5 == 0 &&
|
||||
(beneath == Material.FENCE ||
|
||||
beneath == Material.FENCE_GATE ||
|
||||
beneath == Material.NETHER_FENCE ||
|
||||
beneath == Material.COBBLE_WALL))
|
||||
return true;
|
||||
|
@ -11,8 +11,8 @@ public enum Achievement
|
||||
//Bridges
|
||||
BRIDGES_WINS("Bridge Champion", 600,
|
||||
new String[]{"The Bridges.Wins"},
|
||||
new String[]{"Win 50 games of The Bridges"},
|
||||
new int[]{50},
|
||||
new String[]{"Win 30 games of The Bridges"},
|
||||
new int[]{30},
|
||||
AchievementCategory.BRIDGES),
|
||||
|
||||
BRIDGES_FOOD("Food for the Masses", 600,
|
||||
@ -48,8 +48,8 @@ public enum Achievement
|
||||
//Survival Games
|
||||
SURVIVAL_GAMES_WINS("Katniss Everdeen", 600,
|
||||
new String[]{"Survival Games.Wins"},
|
||||
new String[]{"Win 50 games of Survival Games"},
|
||||
new int[]{50},
|
||||
new String[]{"Win 30 games of Survival Games"},
|
||||
new int[]{30},
|
||||
AchievementCategory.SURVIVAL_GAMES),
|
||||
|
||||
SURVIVAL_GAMES_LIGHT_WEIGHT("Light Weight", 1000,
|
||||
@ -79,8 +79,8 @@ public enum Achievement
|
||||
//Survival Games
|
||||
UHC_WINS("Ultimate Winner", 600,
|
||||
new String[]{"Ultra Hardcore.Wins"},
|
||||
new String[]{"Win 20 games of Ultra Hardcore"},
|
||||
new int[]{20},
|
||||
new String[]{"Win 10 games of Ultra Hardcore"},
|
||||
new int[]{10},
|
||||
AchievementCategory.UHC),
|
||||
|
||||
//Smash Mobs
|
||||
|
@ -9,6 +9,7 @@ import net.minecraft.server.v1_7_R4.Items;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutOpenWindow;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutSetSlot;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Creature;
|
||||
@ -54,25 +55,45 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
{
|
||||
List<String> itemLore = new ArrayList<String>();
|
||||
|
||||
itemLore.add(C.cYellow + pet.GetCost(CurrencyType.Coins) + " Coins");
|
||||
itemLore.add(C.cBlack);
|
||||
//Halloween Name
|
||||
if (pet.GetCost(CurrencyType.Coins) == -1)
|
||||
{
|
||||
itemLore.add(C.cBlack);
|
||||
itemLore.add(ChatColor.RESET + C.cYellow + "Earned by defeating the Pumpkin King");
|
||||
itemLore.add(ChatColor.RESET + C.cYellow + "in the 2014 Halloween Horror Event.");
|
||||
}
|
||||
|
||||
//Owned
|
||||
if (DonationManager.Get(Player.getName()).OwnsUnknownPackage(pet.GetPetName()))
|
||||
{
|
||||
if (Plugin.getPetManager().hasActivePet(Player.getName()) && Plugin.getPetManager().getActivePet(Player.getName()).getType() == pet.GetPetType())
|
||||
{
|
||||
AddButton(slot, new ShopItem(Material.MONSTER_EGG, (byte)pet.GetPetType().getTypeId(), "Deactivate " + Plugin.getPetManager().Get(Player).GetPets().get(pet.GetPetType()), new String[] {}, 1, false, false), new DeactivatePetButton(this, Plugin.getPetManager()));
|
||||
AddButton(slot, new ShopItem(Material.MONSTER_EGG, (byte)pet.GetPetType().getTypeId(),
|
||||
"Deactivate " + pet.GetPetName() + " (" + C.cWhite + Plugin.getPetManager().Get(Player).GetPets().get(pet.GetPetType()) + C.cGreen + ")",
|
||||
itemLore.toArray(new String[itemLore.size()]), 1, false, false), new DeactivatePetButton(this, Plugin.getPetManager()));
|
||||
|
||||
addGlow(slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddButton(slot, new ShopItem(Material.MONSTER_EGG, (byte)pet.GetPetType().getTypeId(), "Activate " + Plugin.getPetManager().Get(Player).GetPets().get(pet.GetPetType()), new String[] {}, 1, false, false), new ActivatePetButton(pet, this));
|
||||
AddButton(slot, new ShopItem(Material.MONSTER_EGG, (byte)pet.GetPetType().getTypeId(),
|
||||
"Activate " + pet.GetPetName() + " (" + C.cWhite + Plugin.getPetManager().Get(Player).GetPets().get(pet.GetPetType()) + C.cGreen + ")",
|
||||
itemLore.toArray(new String[itemLore.size()]), 1, false, false), new ActivatePetButton(pet, this));
|
||||
}
|
||||
}
|
||||
//Not Owned
|
||||
else
|
||||
{
|
||||
if (DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= pet.GetCost(CurrencyType.Coins))
|
||||
//Cost Lore
|
||||
if (pet.GetCost(CurrencyType.Coins) > 0)
|
||||
{
|
||||
itemLore.add(C.cYellow + pet.GetCost(CurrencyType.Coins) + " Coins");
|
||||
itemLore.add(C.cBlack);
|
||||
}
|
||||
|
||||
if (pet.GetCost(CurrencyType.Coins) == -1)
|
||||
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, pet.GetPetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
|
||||
else if (DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= pet.GetCost(CurrencyType.Coins))
|
||||
AddButton(slot, new ShopItem(Material.INK_SACK, (byte)8, "Purchase " + pet.GetPetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new PetButton(pet, this));
|
||||
else
|
||||
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, "Purchase " + pet.GetPetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
|
||||
|
@ -5,28 +5,21 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.util.BlockIterator;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.disguise.disguises.DisguiseBlock;
|
||||
import mineplex.core.event.StackerEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetActivateEvent;
|
||||
import mineplex.core.gadget.event.GadgetBlockEvent;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
|
@ -55,6 +55,9 @@ public class MorphEnderman extends MorphGadget
|
||||
{
|
||||
this.RemoveArmor(player);
|
||||
Manager.getDisguiseManager().undisguise(player);
|
||||
|
||||
player.setAllowFlight(false);
|
||||
player.setFlying(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -8,6 +8,7 @@ import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.pet.repository.PetRepository;
|
||||
import mineplex.core.pet.repository.token.PetExtraToken;
|
||||
import mineplex.core.pet.repository.token.PetSalesToken;
|
||||
import mineplex.core.pet.types.Pumpkin;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@ -30,6 +31,7 @@ public class PetFactory
|
||||
|
||||
private void CreatePets()
|
||||
{
|
||||
_pets.put(EntityType.ZOMBIE, new Pumpkin());
|
||||
_pets.put(EntityType.PIG, new Pet("Pig", EntityType.PIG, 5000));
|
||||
_pets.put(EntityType.SHEEP, new Pet("Sheep", EntityType.SHEEP, 3000));
|
||||
_pets.put(EntityType.COW, new Pet("Cow", EntityType.COW, 2000));
|
||||
|
@ -14,6 +14,7 @@ import mineplex.core.account.event.ClientWebResponseEvent;
|
||||
import mineplex.core.account.event.RetrieveClientInformationEvent;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
@ -45,6 +46,8 @@ import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
@ -56,7 +59,10 @@ import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class PetManager extends MiniClientPlugin<PetClient>
|
||||
{
|
||||
@ -158,6 +164,14 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
pet.setCustomNameVisible(true);
|
||||
pet.setCustomName(Get(player).GetPets().get(entityType));
|
||||
|
||||
if (pet instanceof Zombie)
|
||||
{
|
||||
((Zombie) pet).setBaby(true);
|
||||
pet.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||
pet.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 0));
|
||||
UtilEnt.silence(pet, true);
|
||||
}
|
||||
|
||||
_activePetOwners.put(player.getName(), pet);
|
||||
_failedAttempts.put(player.getName(), 0);
|
||||
|
||||
@ -295,7 +309,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
pet.teleport(owner);
|
||||
_failedAttempts.put(playerName, 0);
|
||||
}
|
||||
else if (!nav.a(targetBlock.getX(), targetBlock.getY() + 1, targetBlock.getZ(), 1.5f))
|
||||
else if (!nav.a(targetBlock.getX(), targetBlock.getY() + 1, targetBlock.getZ(), 0.9f))
|
||||
{
|
||||
if (pet.getFallDistance() == 0)
|
||||
{
|
||||
|
@ -62,10 +62,12 @@ import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.disguise.disguises.DisguiseSlime;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetActivateEvent;
|
||||
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.mount.MountManager;
|
||||
import mineplex.core.mount.event.MountActivateEvent;
|
||||
import mineplex.core.pet.PetManager;
|
||||
import mineplex.core.portal.Portal;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
@ -76,6 +78,7 @@ import mineplex.core.treasure.TreasureManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.hub.commands.ForcefieldRadius;
|
||||
import mineplex.hub.commands.GadgetToggle;
|
||||
import mineplex.hub.commands.GameModeCommand;
|
||||
import mineplex.hub.commands.NewsCommand;
|
||||
import mineplex.hub.modules.ForcefieldManager;
|
||||
@ -99,7 +102,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
public String Mode = "Normal";
|
||||
public HubType Type = HubType.Halloween;
|
||||
|
||||
private BlockRestore _blockRestore;
|
||||
private CoreClientManager _clientManager;
|
||||
@ -318,6 +321,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@Override
|
||||
public void AddCommands()
|
||||
{
|
||||
AddCommand(new GadgetToggle(this));
|
||||
AddCommand(new NewsCommand(this));
|
||||
AddCommand(new GameModeCommand(this));
|
||||
}
|
||||
@ -325,10 +329,26 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void reflectMotd(ServerListPingEvent event)
|
||||
{
|
||||
String jag1 = C.cGold + C.BoldStrike + "╔╦╗" + C.cWhite + C.BoldStrike + "█" + C.cGold + C.BoldStrike + "█" + C.cWhite + C.BoldStrike + "█";
|
||||
String jag2 = C.cRed + C.BoldStrike + "█" + C.cYellow + C.BoldStrike + "█" + C.cGreen + C.BoldStrike + "█" + C.cAqua + C.BoldStrike + "█" + C.cPurple + C.BoldStrike + "█";
|
||||
|
||||
String jag3 = C.cGold + C.BoldStrike + "█" + C.cWhite + C.BoldStrike + "█" + C.cGold + C.BoldStrike + "█" + C.cWhite + C.BoldStrike + "█";
|
||||
String jag4 = C.cWhite + C.BoldStrike + "█" + C.cGold + C.BoldStrike + "█" + C.cWhite + C.BoldStrike + "█" + C.cGold + C.BoldStrike + "█";
|
||||
|
||||
if (_shuttingDown)
|
||||
{
|
||||
event.setMotd("Restarting soon");
|
||||
}
|
||||
else
|
||||
{
|
||||
event.setMotd(C.cGold + C.Bold + "MINEPLEX " + ChatColor.RESET + C.cWhite + C.Bold + "Double Gem Weekend and New Dog"
|
||||
+ " " +
|
||||
jag2 + jag2 + jag2 + jag2 + jag2 + jag2 + jag2 );
|
||||
|
||||
// event.setMotd(jag1 + C.cGold + C.Bold + " M I N E P L E X " + jag2 + " " +
|
||||
// jag4 + C.cPurple + C.Bold + " UHC Released & Double Gems " + jag3
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
public boolean BumpDisabled(Entity ent)
|
||||
@ -348,7 +368,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@EventHandler
|
||||
public void SnowballPickup(BlockDamageEvent event)
|
||||
{
|
||||
if (!Mode.equals("Christmas"))
|
||||
if (Type != HubType.Christmas)
|
||||
return;
|
||||
|
||||
if (event.getBlock().getType() != Material.SNOW)
|
||||
@ -364,7 +384,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@EventHandler
|
||||
public void SnowballHit(CustomDamageEvent event)
|
||||
{
|
||||
if (!Mode.equals("Christmas"))
|
||||
if (Type != HubType.Christmas)
|
||||
return;
|
||||
|
||||
Projectile proj = event.GetProjectile();
|
||||
@ -940,10 +960,6 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
return _gadgetsEnabled;
|
||||
}
|
||||
|
||||
public void SetGadgetEnabled(boolean _enabled)
|
||||
{
|
||||
this._gadgetsEnabled = _enabled;
|
||||
}
|
||||
|
||||
public NewsManager GetNewsManager()
|
||||
{
|
||||
@ -964,4 +980,32 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleGadget(Player caller)
|
||||
{
|
||||
_gadgetsEnabled = !_gadgetsEnabled;
|
||||
|
||||
if (!_gadgetsEnabled)
|
||||
{
|
||||
GetMount().DisableAll();
|
||||
GetGadget().DisableAll();
|
||||
}
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
player.sendMessage(C.cWhite + C.Bold + "Gadgets/Mounts are now " + F.elem(_gadgetsEnabled ? C.cGreen + C.Bold + "Enabled" : C.cRed + C.Bold + "Disabled"));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void GadgetActivate(GadgetActivateEvent event)
|
||||
{
|
||||
if (!_gadgetsEnabled)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void MountActivate(MountActivateEvent event)
|
||||
{
|
||||
if (!_gadgetsEnabled)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.hub.HubManager;
|
||||
import mineplex.hub.HubType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
@ -105,7 +106,7 @@ public class WorldManager extends MiniPlugin
|
||||
else loc = new Location(Manager.GetSpawn().getWorld(), 43, 72, 5);
|
||||
|
||||
//Spawn
|
||||
if (Manager.Mode.equals("Halloween"))
|
||||
if (Manager.Type == HubType.Halloween)
|
||||
{
|
||||
Skeleton ent = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
|
||||
@ -115,13 +116,14 @@ public class WorldManager extends MiniPlugin
|
||||
ent.getEquipment().setHelmet(ItemStackFactory.Instance.CreateStack(Material.PUMPKIN));
|
||||
|
||||
ent.setCustomName(C.cYellow + "Pumpkin Minion");
|
||||
ent.setCustomNameVisible(false);
|
||||
|
||||
_mobs.add(ent);
|
||||
|
||||
Manager.GetCondition().Factory().Invisible("Perm", ent, ent, 999999999, 0, false, false, true);
|
||||
Manager.GetCondition().Factory().Slow("Perm", ent, ent, 999999999, 1, false, false, false, true);
|
||||
}
|
||||
else if (Manager.Mode.equals("Christmas"))
|
||||
else if (Manager.Type == HubType.Christmas)
|
||||
{
|
||||
_mobs.add(loc.getWorld().spawn(loc, Snowman.class));
|
||||
}
|
||||
@ -230,7 +232,7 @@ public class WorldManager extends MiniPlugin
|
||||
|
||||
World world = UtilWorld.getWorld("world");
|
||||
|
||||
if (Manager.Mode.equals("Halloween"))
|
||||
if (Manager.Type == HubType.Halloween)
|
||||
world.setTime(16000);
|
||||
else
|
||||
world.setTime(6000);
|
||||
@ -244,7 +246,7 @@ public class WorldManager extends MiniPlugin
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
if (!Manager.Mode.equals("Halloween"))
|
||||
if (Manager.Type != HubType.Halloween)
|
||||
return;
|
||||
|
||||
//Block Lightup
|
||||
@ -285,7 +287,7 @@ public class WorldManager extends MiniPlugin
|
||||
@EventHandler
|
||||
public void CreatureTarget(EntityTargetEvent event)
|
||||
{
|
||||
if (Manager.Mode.equals("Christmas"))
|
||||
if (Manager.Type == HubType.Christmas)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ public class Halloween extends SoloGame
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (Math.random() > 0.85)
|
||||
if (Math.random() > 0.6)
|
||||
return;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
@ -322,16 +322,14 @@ public class Halloween extends SoloGame
|
||||
|
||||
if (_wave >= _waves.size())
|
||||
{
|
||||
|
||||
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), player.getUniqueId(), "Pumpkin Kings Head", false, 0, true);
|
||||
Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), player.getUniqueId(), "Pumpling", false, 0, true);
|
||||
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false);
|
||||
Manager.GetGame().AddGems(player, 10, "Participation", false);
|
||||
}
|
||||
|
||||
SetCustomWinLine("You earned Pumpkin Kings Head!");
|
||||
SetCustomWinLine("You earned Pumpling Pet!");
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
|
||||
SetState(GameState.End);
|
||||
|
@ -11,6 +11,7 @@ import nautilus.game.arcade.game.games.halloween.Halloween;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.CaveSpider;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
public class MobSpiderLeaper extends CreatureBase<CaveSpider> implements InterfaceMove
|
||||
{
|
||||
@ -30,7 +31,8 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider> implements Interfa
|
||||
@Override
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL)
|
||||
event.SetCancelled("Fall Immunity");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user