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:
commit
8a8591ae7f
@ -29,6 +29,7 @@ public enum Rank
|
||||
TWITCH("Twitch", ChatColor.DARK_PURPLE),
|
||||
|
||||
//Player
|
||||
IMMORTAL("Immortal", ChatColor.YELLOW, true),
|
||||
LEGEND("Legend", ChatColor.GREEN, true),
|
||||
HERO("Hero", ChatColor.LIGHT_PURPLE, true),
|
||||
ULTRA("Ultra", ChatColor.AQUA, true),
|
||||
|
@ -63,6 +63,7 @@ public class MountManager extends MiniPlugin
|
||||
_types.add(new MountSlime(this));
|
||||
_types.add(new MountCart(this));
|
||||
_types.add(new MountSpider(this));
|
||||
_types.add(new MountUndead(this));
|
||||
//_types.add(new MountSheep(this));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
@ -116,7 +116,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
// ☃❅ Snowman!
|
||||
public HubType Type = HubType.Normal;
|
||||
public HubType Type = HubType.Halloween;
|
||||
|
||||
private BlockRestore _blockRestore;
|
||||
private CoreClientManager _clientManager;
|
||||
|
@ -25,7 +25,6 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
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.DeathMessageType;
|
||||
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.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class Evolution extends SoloGame
|
||||
@ -223,6 +223,12 @@ public class Evolution extends SoloGame
|
||||
upgradeKit(event.GetPlayer(), false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void removeToken(PlayerQuitEvent event)
|
||||
{
|
||||
_tokens.remove(event.getPlayer().getName());
|
||||
}
|
||||
|
||||
// //Double Kit
|
||||
// @EventHandler(priority = EventPriority.MONITOR)
|
||||
// public void storeTokens(GameStateChangeEvent event)
|
||||
@ -369,9 +375,12 @@ public class Evolution extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
@ -747,7 +756,11 @@ public class Evolution extends SoloGame
|
||||
|
||||
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
|
||||
|
@ -61,7 +61,7 @@ public class KitHealth extends Kit
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
Player killer = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
|
||||
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
|
||||
if (killer == null || !killer.isOnline())
|
||||
return;
|
||||
|
||||
@ -74,6 +74,6 @@ public class KitHealth extends Kit
|
||||
if (!HasKit(killer))
|
||||
return;
|
||||
|
||||
killer.setHealth(killer.getMaxHealth());
|
||||
UtilPlayer.health(killer, 9999);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.evolution.mobs;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
@ -66,6 +67,9 @@ public class KitChicken extends EvoKit
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
|
@ -55,6 +55,9 @@ public class PerkBounceEVO extends Perk
|
||||
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
@ -65,6 +65,9 @@ public class PerkDoubleJumpEVO extends Perk
|
||||
|
||||
if (player.getGameMode() == GameMode.CREATIVE)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
player.setFlying(false);
|
||||
|
||||
EvolutionAbilityUseEvent useEvent = new EvolutionAbilityUseEvent(player, GetName(), 0);
|
||||
Bukkit.getServer().getPluginManager().callEvent(useEvent);
|
||||
@ -72,9 +75,6 @@ public class PerkDoubleJumpEVO extends Perk
|
||||
if (useEvent.isCancelled())
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
player.setFlying(false);
|
||||
|
||||
//Disable Flight
|
||||
player.setAllowFlight(false);
|
||||
|
||||
|
@ -5,6 +5,7 @@ import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -49,6 +50,9 @@ public class PerkFlamingSwordEVO extends Perk
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
|
@ -71,6 +71,9 @@ public class PerkSiesmicSlamEVO extends Perk
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!UtilInv.IsItem(event.getItem(), Material.IRON_INGOT, (byte) 0))
|
||||
return;
|
||||
|
||||
|
@ -2,6 +2,7 @@ package nautilus.game.arcade.game.games.evolution.mobs.perks;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
@ -55,6 +56,9 @@ public class PerkSulphurBombEVO extends Perk implements IThrown
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!UtilInv.IsItem(event.getItem(), Material.SULPHUR, (byte) 0))
|
||||
return;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.evolution.mobs.perks;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
@ -39,6 +40,9 @@ public class PerkWebEVO extends Perk implements IThrown
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
@ -109,7 +113,11 @@ public class PerkWebEVO extends Perk implements IThrown
|
||||
public void Web(ProjectileUser data)
|
||||
{
|
||||
Location loc = data.GetThrown().getLocation();
|
||||
|
||||
data.GetThrown().remove();
|
||||
|
||||
if (loc.getBlock().getType() != Material.AIR)
|
||||
return;
|
||||
|
||||
Manager.GetBlockRestore().Add(loc.getBlock(), 30, (byte)0, 4000);
|
||||
}
|
||||
|
@ -29,6 +29,9 @@ public class NoAbilityTracker extends StatTracker<Evolution>
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onEvolutionAbility(EvolutionAbilityUseEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (!getGame().IsLive())
|
||||
return;
|
||||
|
||||
|
@ -401,12 +401,12 @@ public class Halloween extends SoloGame
|
||||
{
|
||||
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, 10, "Participation", false, false);
|
||||
}
|
||||
|
||||
SetCustomWinLine("You earned Pumpling Pet!");
|
||||
SetCustomWinLine("You earned Decrepit Warhorse Mount!");
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
|
||||
SetState(GameState.End);
|
||||
|
@ -436,7 +436,7 @@ public abstract class Skywars extends Game
|
||||
_worldBlocks.remove(bestBlock);
|
||||
if (bestBlock.getType() != Material.AIR)
|
||||
{
|
||||
if (Math.random() > 0.75D)
|
||||
if (Math.random() > 0.95D)
|
||||
{
|
||||
bestBlock.getWorld().spawnFallingBlock(
|
||||
bestBlock.getLocation().add(0.5D, 0.5D, 0.5D),
|
||||
|
@ -849,11 +849,16 @@ public class GameFlagManager implements Listener
|
||||
|
||||
if (game.HungerSet != -1)
|
||||
for (Player player : game.GetPlayers(true))
|
||||
{
|
||||
player.setFoodLevel(game.HungerSet);
|
||||
player.setSaturation(1F);
|
||||
}
|
||||
|
||||
if (game.HealthSet != -1)
|
||||
for (Player player : game.GetPlayers(true))
|
||||
{
|
||||
player.setHealth(game.HealthSet);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
|
@ -78,7 +78,7 @@ public class HolidayManager implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
private HolidayType type = HolidayType.Easter;
|
||||
private HolidayType type = HolidayType.Halloween;
|
||||
|
||||
ArcadeManager Manager;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user