Merge branch 'master' of

http://Mysticate@184.154.0.242:7990/scm/min/mineplex.git into
Myst_HALLOWEEN

Conflicts:
	Plugins/Mineplex.Core/src/mineplex/core/mount/MountManager.java
This commit is contained in:
Mysticate 2015-10-07 22:19:10 -04:00
commit 8a8591ae7f
18 changed files with 92 additions and 13 deletions

View File

@ -29,6 +29,7 @@ public enum Rank
TWITCH("Twitch", ChatColor.DARK_PURPLE), TWITCH("Twitch", ChatColor.DARK_PURPLE),
//Player //Player
IMMORTAL("Immortal", ChatColor.YELLOW, true),
LEGEND("Legend", ChatColor.GREEN, true), LEGEND("Legend", ChatColor.GREEN, true),
HERO("Hero", ChatColor.LIGHT_PURPLE, true), HERO("Hero", ChatColor.LIGHT_PURPLE, true),
ULTRA("Ultra", ChatColor.AQUA, true), ULTRA("Ultra", ChatColor.AQUA, true),

View File

@ -63,6 +63,7 @@ public class MountManager extends MiniPlugin
_types.add(new MountSlime(this)); _types.add(new MountSlime(this));
_types.add(new MountCart(this)); _types.add(new MountCart(this));
_types.add(new MountSpider(this)); _types.add(new MountSpider(this));
_types.add(new MountUndead(this));
//_types.add(new MountSheep(this)); //_types.add(new MountSheep(this));
} }

View File

@ -0,0 +1,30 @@
package mineplex.core.mount.types;
import org.bukkit.Material;
import org.bukkit.entity.Horse.Color;
import org.bukkit.entity.Horse.Style;
import org.bukkit.entity.Horse.Variant;
import mineplex.core.common.util.C;
import mineplex.core.mount.HorseMount;
import mineplex.core.mount.MountManager;
public class MountZombie extends HorseMount
{
public MountZombie(MountManager manager)
{
super(manager, "Decrepit Warhorse", new String[]
{
C.cWhite + "Once a fierce warhorse, this",
C.cWhite + "undead beast will send fear",
C.cWhite + "into the hearts of your enemies.",
"",
C.cYellow + "Earned by defeating the Pumpkin King",
C.cYellow + "in the 2015 Halloween Horror Event.",
},
Material.ROTTEN_FLESH,
(byte)0,
-1,
Color.BLACK, Style.BLACK_DOTS, Variant.UNDEAD_HORSE, 0.8, null);
}
}

View File

@ -116,7 +116,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
public class HubManager extends MiniClientPlugin<HubClient> public class HubManager extends MiniClientPlugin<HubClient>
{ {
// Snowman! // Snowman!
public HubType Type = HubType.Normal; public HubType Type = HubType.Halloween;
private BlockRestore _blockRestore; private BlockRestore _blockRestore;
private CoreClientManager _clientManager; private CoreClientManager _clientManager;

View File

@ -25,7 +25,6 @@ import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.combat.CombatComponent; import mineplex.minecraft.game.core.combat.CombatComponent;
import mineplex.minecraft.game.core.combat.DeathMessageType;
import mineplex.minecraft.game.core.combat.CombatManager.AttackReason; import mineplex.minecraft.game.core.combat.CombatManager.AttackReason;
import mineplex.minecraft.game.core.combat.DeathMessageType; import mineplex.minecraft.game.core.combat.DeathMessageType;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
@ -74,6 +73,7 @@ import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerItemHeldEvent; import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
public class Evolution extends SoloGame public class Evolution extends SoloGame
@ -223,6 +223,12 @@ public class Evolution extends SoloGame
upgradeKit(event.GetPlayer(), false); upgradeKit(event.GetPlayer(), false);
} }
@EventHandler
public void removeToken(PlayerQuitEvent event)
{
_tokens.remove(event.getPlayer().getName());
}
// //Double Kit // //Double Kit
// @EventHandler(priority = EventPriority.MONITOR) // @EventHandler(priority = EventPriority.MONITOR)
// public void storeTokens(GameStateChangeEvent event) // public void storeTokens(GameStateChangeEvent event)
@ -369,9 +375,12 @@ public class Evolution extends SoloGame
} }
} }
@EventHandler @EventHandler(priority = EventPriority.MONITOR)
public void onDamage(CustomDamageEvent event) public void onDamage(CustomDamageEvent event)
{ {
if (event.IsCancelled())
return;
if (!IsLive()) if (!IsLive())
return; return;
@ -747,7 +756,11 @@ public class Evolution extends SoloGame
for (int i = 0 ; i < tokens.size() ; i++) for (int i = 0 ; i < tokens.size() ; i++)
{ {
players.add(tokens.get(i).Player); Player cur = tokens.get(i).Player;
if (!cur.isOnline())
continue;
players.add(cur);
} }
//Award Gems //Award Gems

View File

@ -61,7 +61,7 @@ public class KitHealth extends Kit
if (!Manager.GetGame().IsLive()) if (!Manager.GetGame().IsLive())
return; return;
Player killer = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName()); Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null || !killer.isOnline()) if (killer == null || !killer.isOnline())
return; return;
@ -74,6 +74,6 @@ public class KitHealth extends Kit
if (!HasKit(killer)) if (!HasKit(killer))
return; return;
killer.setHealth(killer.getMaxHealth()); UtilPlayer.health(killer, 9999);
} }
} }

View File

@ -1,6 +1,7 @@
package nautilus.game.arcade.game.games.evolution.mobs; package nautilus.game.arcade.game.games.evolution.mobs;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilGear;
@ -66,6 +67,9 @@ public class KitChicken extends EvoKit
if (!UtilEvent.isAction(event, ActionType.R)) if (!UtilEvent.isAction(event, ActionType.R))
return; return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (!Manager.GetGame().IsLive()) if (!Manager.GetGame().IsLive())
return; return;

View File

@ -55,6 +55,9 @@ public class PerkBounceEVO extends Perk
if (!UtilEvent.isAction(event, ActionType.R)) if (!UtilEvent.isAction(event, ActionType.R))
return; return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (UtilBlock.usable(event.getClickedBlock())) if (UtilBlock.usable(event.getClickedBlock()))
return; return;

View File

@ -65,6 +65,9 @@ public class PerkDoubleJumpEVO extends Perk
if (player.getGameMode() == GameMode.CREATIVE) if (player.getGameMode() == GameMode.CREATIVE)
return; return;
event.setCancelled(true);
player.setFlying(false);
EvolutionAbilityUseEvent useEvent = new EvolutionAbilityUseEvent(player, GetName(), 0); EvolutionAbilityUseEvent useEvent = new EvolutionAbilityUseEvent(player, GetName(), 0);
Bukkit.getServer().getPluginManager().callEvent(useEvent); Bukkit.getServer().getPluginManager().callEvent(useEvent);
@ -72,9 +75,6 @@ public class PerkDoubleJumpEVO extends Perk
if (useEvent.isCancelled()) if (useEvent.isCancelled())
return; return;
event.setCancelled(true);
player.setFlying(false);
//Disable Flight //Disable Flight
player.setAllowFlight(false); player.setAllowFlight(false);

View File

@ -5,6 +5,7 @@ import java.util.Map.Entry;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.NautHashMap; import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
@ -49,6 +50,9 @@ public class PerkFlamingSwordEVO extends Perk
if (!UtilEvent.isAction(event, ActionType.R)) if (!UtilEvent.isAction(event, ActionType.R))
return; return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (!Manager.GetGame().IsLive()) if (!Manager.GetGame().IsLive())
return; return;

View File

@ -71,6 +71,9 @@ public class PerkSiesmicSlamEVO extends Perk
if (!UtilEvent.isAction(event, ActionType.R)) if (!UtilEvent.isAction(event, ActionType.R))
return; return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (!UtilInv.IsItem(event.getItem(), Material.IRON_INGOT, (byte) 0)) if (!UtilInv.IsItem(event.getItem(), Material.IRON_INGOT, (byte) 0))
return; return;

View File

@ -2,6 +2,7 @@ package nautilus.game.arcade.game.games.evolution.mobs.perks;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilEvent.ActionType;
@ -55,6 +56,9 @@ public class PerkSulphurBombEVO extends Perk implements IThrown
if (!UtilEvent.isAction(event, ActionType.R)) if (!UtilEvent.isAction(event, ActionType.R))
return; return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (!UtilInv.IsItem(event.getItem(), Material.SULPHUR, (byte) 0)) if (!UtilInv.IsItem(event.getItem(), Material.SULPHUR, (byte) 0))
return; return;

View File

@ -1,6 +1,7 @@
package nautilus.game.arcade.game.games.evolution.mobs.perks; package nautilus.game.arcade.game.games.evolution.mobs.perks;
import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilInv;
@ -39,6 +40,9 @@ public class PerkWebEVO extends Perk implements IThrown
if (!UtilEvent.isAction(event, ActionType.R)) if (!UtilEvent.isAction(event, ActionType.R))
return; return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (!Manager.GetGame().IsLive()) if (!Manager.GetGame().IsLive())
return; return;
@ -109,7 +113,11 @@ public class PerkWebEVO extends Perk implements IThrown
public void Web(ProjectileUser data) public void Web(ProjectileUser data)
{ {
Location loc = data.GetThrown().getLocation(); Location loc = data.GetThrown().getLocation();
data.GetThrown().remove(); data.GetThrown().remove();
if (loc.getBlock().getType() != Material.AIR)
return;
Manager.GetBlockRestore().Add(loc.getBlock(), 30, (byte)0, 4000); Manager.GetBlockRestore().Add(loc.getBlock(), 30, (byte)0, 4000);
} }

View File

@ -29,6 +29,9 @@ public class NoAbilityTracker extends StatTracker<Evolution>
@EventHandler(priority = EventPriority.MONITOR) @EventHandler(priority = EventPriority.MONITOR)
public void onEvolutionAbility(EvolutionAbilityUseEvent event) public void onEvolutionAbility(EvolutionAbilityUseEvent event)
{ {
if (event.isCancelled())
return;
if (!getGame().IsLive()) if (!getGame().IsLive())
return; return;

View File

@ -401,12 +401,12 @@ public class Halloween extends SoloGame
{ {
for (Player player : GetPlayers(false)) for (Player player : GetPlayers(false))
{ {
Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), Manager.GetClients().Get(player).getAccountId(), "Pumpling", false, 0, true); Manager.GetDonation().PurchaseUnknownSalesPackage(null, player.getName(), Manager.GetClients().Get(player).getAccountId(), "Decrepit Warhorse", false, 0, true);
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false, false); Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false, false);
Manager.GetGame().AddGems(player, 10, "Participation", false, false); Manager.GetGame().AddGems(player, 10, "Participation", false, false);
} }
SetCustomWinLine("You earned Pumpling Pet!"); SetCustomWinLine("You earned Decrepit Warhorse Mount!");
AnnounceEnd(this.GetTeamList().get(0)); AnnounceEnd(this.GetTeamList().get(0));
SetState(GameState.End); SetState(GameState.End);

View File

@ -436,7 +436,7 @@ public abstract class Skywars extends Game
_worldBlocks.remove(bestBlock); _worldBlocks.remove(bestBlock);
if (bestBlock.getType() != Material.AIR) if (bestBlock.getType() != Material.AIR)
{ {
if (Math.random() > 0.75D) if (Math.random() > 0.95D)
{ {
bestBlock.getWorld().spawnFallingBlock( bestBlock.getWorld().spawnFallingBlock(
bestBlock.getLocation().add(0.5D, 0.5D, 0.5D), bestBlock.getLocation().add(0.5D, 0.5D, 0.5D),

View File

@ -849,11 +849,16 @@ public class GameFlagManager implements Listener
if (game.HungerSet != -1) if (game.HungerSet != -1)
for (Player player : game.GetPlayers(true)) for (Player player : game.GetPlayers(true))
{
player.setFoodLevel(game.HungerSet); player.setFoodLevel(game.HungerSet);
player.setSaturation(1F);
}
if (game.HealthSet != -1) if (game.HealthSet != -1)
for (Player player : game.GetPlayers(true)) for (Player player : game.GetPlayers(true))
{
player.setHealth(game.HealthSet); player.setHealth(game.HealthSet);
}
} }
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)

View File

@ -78,7 +78,7 @@ public class HolidayManager implements Listener
} }
} }
private HolidayType type = HolidayType.Easter; private HolidayType type = HolidayType.Halloween;
ArcadeManager Manager; ArcadeManager Manager;