H&S Updates

some punish fixes
hub toggles no longer pulse on pressure plate
This commit is contained in:
Chiss 2013-11-09 09:48:40 +11:00
parent dc062c7bb6
commit 3c5b1fe74f
15 changed files with 401 additions and 134 deletions

View File

@ -390,7 +390,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
_movePacketMap.put(movePacket.a, velocityPacket);
//XXX packetList.forceAdd(velocityPacket);
//XXX
packetList.forceAdd(velocityPacket);
if (_goingUp.contains(movePacket.a) && movePacket.c != 0 && movePacket.c > 20)
{
@ -398,7 +399,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
{
public void run()
{
//XXX packetList.forceAdd(velocityPacket);
//XXX
packetList.forceAdd(velocityPacket);
}
});
}
@ -437,7 +439,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
_movePacketMap.put(movePacket.a, velocityPacket);
//XXX packetList.forceAdd(velocityPacket);
//XXX
packetList.forceAdd(velocityPacket);
if (_goingUp.contains(movePacket.a) && movePacket.c != 0 && movePacket.c > 20)
{
@ -445,7 +448,8 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
{
public void run()
{
//XXX packetList.forceAdd(velocityPacket);
//XXX
packetList.forceAdd(velocityPacket);
}
});
}

View File

@ -3,9 +3,9 @@ package mineplex.core.punish;
public enum Category
{
ChatOffense,
Advertisement,
Exploiting,
Hacking,
Advertisement, // No longer used
Exploiting, // General Offense
Hacking, // Illegal Mods
Warning,
PermMute,
Other; // Represents perm ban - (or old perm mutes)

View File

@ -177,7 +177,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefixEx + " ",
" ",
examplePrefixNote + "Use Severity 2 if many Severity 1 past offences",
}, 1, false, true), new PunishButton(this, Category.Exploiting, 1, true, 12));
}, 1, false, true), new PunishButton(this, Category.Exploiting, 1, true, 2));
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
{
@ -210,7 +210,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefix + "Damage Indicators, Better Sprint, Minimaps",
" ",
examplePrefixNote + "Use this for 1st Offence"
}, 1, false, true), new PunishButton(this, Category.Hacking, 1, true, 24));
}, 1, false, true), new PunishButton(this, Category.Hacking, 1, true, 12));
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
{

View File

@ -13,6 +13,7 @@ import org.bukkit.entity.Horse;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
@ -58,8 +59,11 @@ public class StackerManager extends MiniPlugin implements IThrown
}
@EventHandler
public void ToggleVisibility(PlayerInteractEvent event)
public void ToggleStacker(PlayerInteractEvent event)
{
if (event.getAction() == Action.PHYSICAL)
return;
Player player = event.getPlayer();
if (player.getInventory().getHeldItemSlot() != _slot)

View File

@ -10,6 +10,7 @@ import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
@ -85,6 +86,9 @@ public class VisibilityManager extends MiniPlugin
@EventHandler
public void ToggleVisibility(PlayerInteractEvent event)
{
if (event.getAction() == Action.PHYSICAL)
return;
Player player = event.getPlayer();
if (player.getInventory().getHeldItemSlot() != _slot)

View File

@ -559,6 +559,9 @@ public abstract class Game implements Listener
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 2f, 1f);
UtilPlayer.message(player, F.main("Kit", "You equipped " + F.elem(kit.GetFormattedName() + " Kit") + "."));
}
if (InProgress())
kit.ApplyKit(player);
}
public Kit GetKit(Player player)

View File

@ -2,34 +2,49 @@ package nautilus.game.arcade.game.games.hideseek;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.Effect;
import org.bukkit.FireworkEffect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkMeta;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilGear;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.disguise.disguises.DisguiseBlock;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
@ -49,6 +64,8 @@ public class HideSeek extends TeamGame
private boolean _started = false;
private HashMap<Player, Integer> _arrowHits = new HashMap<Player, Integer>();
private HashMap<Player, DisguiseBase> _disguises = new HashMap<Player, DisguiseBase>();
private HashMap<Player, Block> _disguiseBlock = new HashMap<Player, Block>();
private HashMap<Player, Location> _disguiseMovement = new HashMap<Player, Location>();
@ -61,23 +78,25 @@ public class HideSeek extends TeamGame
new Kit[]
{
new KitHiderAcrobat(manager),
new KitHiderSwapper(manager),
new KitHiderQuick(manager),
new KitHiderShocker(manager),
new NullKit(manager),
new KitSeekerRadar(manager),
new KitSeekerArcher(manager),
new KitSeekerHunter(manager),
new KitSeekerTNT(manager),
},
new String[]
{
"Shoot enemies to paint them",
"Revive/heal with Water Bombs",
"Last team alive wins!"
C.cAqua + "Hiders" + C.cWhite + " Run and Hide from Seekers",
C.cAqua + "Hiders" + C.cWhite + " Shoot Seekers for Axe Upgrades",
C.cAqua + "Hiders" + C.cWhite + " Right-Click with Axe for Speed Boost",
C.cAqua + "Hiders" + C.cWhite + " Use Firework/Meow for Bonus Gems",
C.cRed + "Seekers" + C.cWhite + " Find and kill the Hiders!",
});
this.DeathOut = false;
this.InventoryOpen = false;
_allowedBlocks = new ArrayList<Material>();
_allowedBlocks.add(Material.TNT);
@ -91,7 +110,7 @@ public class HideSeek extends TeamGame
_allowedBlocks.add(Material.FLOWER_POT);
_allowedBlocks.add(Material.ANVIL);
_allowedBlocks.add(Material.HAY_BLOCK);
_allowedBlocks.add(Material.CAKE);
_allowedBlocks.add(Material.CAKE_BLOCK);
Manager.GetExplosion().SetRegenerate(true);
}
@ -100,6 +119,7 @@ public class HideSeek extends TeamGame
{
if (mat == Material.CAULDRON) return Material.CAULDRON_ITEM;
if (mat == Material.FLOWER_POT) return Material.FLOWER_POT_ITEM;
if (mat == Material.CAKE_BLOCK) return Material.CAKE;
return mat;
}
@ -121,8 +141,6 @@ public class HideSeek extends TeamGame
RestrictKits();
}
@Override
public void RestrictKits()
{
@ -144,13 +162,24 @@ public class HideSeek extends TeamGame
}
}
/*
@Override
public GameTeam ChooseTeam(Player player)
@EventHandler
public void MoveKits(GameStateChangeEvent event)
{
return _hiders;
if (event.GetState() != GameState.Prepare)
return;
for (int i=0 ; i<WorldData.GetDataLocs("RED").size() && i<3 ; i++)
{
if (GetKits().length <= 4+i)
continue;
this.CreatureAllowOverride = true;
Entity ent = GetKits()[4+i].SpawnEntity(WorldData.GetDataLocs("RED").get(i));
this.CreatureAllowOverride = false;
Manager.GetLobby().AddKitLocation(ent, GetKits()[4+i], WorldData.GetDataLocs("RED").get(i));
}
}
*/
@EventHandler
public void InitialDisguise(GameStateChangeEvent event)
@ -162,6 +191,65 @@ public class HideSeek extends TeamGame
SetDisguiseBlock(player, _allowedBlocks.get(UtilMath.r(_allowedBlocks.size())));
}
public void GiveItems()
{
for (Player player : _hiders.GetPlayers(true))
{
//Remove Swap
if (!(GetKit(player) instanceof KitHiderSwapper))
player.getInventory().remove(Material.SLIME_BALL);
//Bow
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, C.cYellow + C.Bold + "Meow" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Upgrades Axe");
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
player.getInventory().setItem(1, bow);
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
//Meower
player.getInventory().setItem(4, ItemStackFactory.Instance.CreateStack(Material.SUGAR, (byte)0, 1, C.cYellow + C.Bold + "Meow" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "+0.5 Gems"));
//Firework
ItemStack firework = ItemStackFactory.Instance.CreateStack(Material.FIREWORK, (byte)0, 5, C.cYellow + C.Bold + "Firework" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "+2 Gems");
FireworkMeta metaData = (FireworkMeta) firework.getItemMeta();
metaData.setPower(1);
metaData.addEffect(FireworkEffect.builder().flicker(true).withColor(Color.AQUA).with(Type.BALL).trail(true).build());
firework.setItemMeta(metaData);
player.getInventory().setItem(5, firework);
//Recharges
Recharge.Instance.useForce(player, "Meow", 15000);
Recharge.Instance.useForce(player, "Firework", 15000);
}
}
@EventHandler
public void ChangeDisguise(PlayerInteractEvent event)
{
if (event.getClickedBlock() == null)
return;
Player player = event.getPlayer();
if (!UtilGear.isMat(player.getItemInHand(), Material.SLIME_BALL))
return;
if (!_allowedBlocks.contains(event.getClickedBlock().getType()))
{
UtilPlayer.message(player, F.main("Game", "You cannot morph into " + F.elem(ItemStackFactory.Instance.GetName(event.getClickedBlock().getType(), (byte)0, false) + " Block") + "."));
return;
}
if (!Recharge.Instance.use(player, "Change Form", 5000, true))
return;
SolidifyRemove(player);
UtilInv.remove(player, Material.SLIME_BALL, (byte)0, 1);
SetDisguiseBlock(player, event.getClickedBlock().getType());
}
public void SetDisguiseBlock(Player player, Material type)
{
DisguiseBlock disguise = new DisguiseBlock(player, type.getId(), 0);
@ -173,6 +261,10 @@ public class HideSeek extends TeamGame
//Give Item
player.getInventory().setItem(8, new ItemStack(GetItemEquivilent(type)));
UtilInv.Update(player);
//Sound
player.playSound(player.getLocation(), Sound.ZOMBIE_UNFECT, 1f, 0.5f);
}
@EventHandler
@ -207,7 +299,11 @@ public class HideSeek extends TeamGame
//Unmoved
else
{
player.setExp((float) Math.min(0.999f, player.getExp() + 0.025));
double hideBoost = 0.025;
if (GetKit(player) instanceof KitHiderQuick)
hideBoost = 0.1;
player.setExp((float) Math.min(0.999f, player.getExp() + hideBoost));
//Set Block
if (player.getExp() >= 0.999f)
@ -215,7 +311,7 @@ public class HideSeek extends TeamGame
Block block = player.getLocation().getBlock();
//Not Able
if (block.getType() != Material.AIR)
if (block.getType() != Material.AIR || !UtilBlock.solid(block.getRelative(BlockFace.DOWN)))
{
UtilPlayer.message(player, F.main("Game", "You cannot become a Solid Block here."));
player.setExp(0f);
@ -296,6 +392,9 @@ public class HideSeek extends TeamGame
{
for (Player player : UtilServer.getPlayers())
{
if (!_seekers.HasPlayer(player))
continue;
if (!_disguiseBlock.containsKey(player))
continue;
@ -311,6 +410,207 @@ public class HideSeek extends TeamGame
}
}
@EventHandler
public void AttackSeeker(CustomDamageEvent event)
{
if (event.GetDamagerPlayer(true) == null)
return;
if (!_hiders.HasPlayer(event.GetDamagerPlayer(true)))
return;
if (event.GetDamageInitial() > 1)
return;
event.AddMod("H&S", "Negate", -event.GetDamageInitial(), false);
event.AddMod("H&S", "Attack", event.GetDamageInitial(), true);
}
@EventHandler
public void ArrowHit(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
if (event.GetProjectile() == null)
return;
Player damager = event.GetDamagerPlayer(true);
if (damager == null) return;
if (!_hiders.HasPlayer(damager))
return;
event.AddMod("Hide & Seek", "Negate", -event.GetDamageInitial(), false);
event.AddMod("Hide & Seek", "Damage Set", 2, false);
event.AddKnockback("Hide & Seek", 2);
Powerup(damager);
}
public void Powerup(Player player)
{
int count = 1;
if (_arrowHits.containsKey(player))
count += _arrowHits.get(player);
_arrowHits.put(player, count);
if (count == 3)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOD_AXE, (byte)1, 1, C.cGreen + "Basic Axe"));
//Sound
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
//Inform
UtilPlayer.message(player, F.main("Game", "You received " + F.elem("Basic Axe") + "!"));
}
else if (count == 6)
{
player.getInventory().remove(Material.WOOD_AXE);
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.STONE_AXE, (byte)1, 1, C.cGreen + "Super Axe"));
//Sound
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
//Inform
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Super Axe") + "!"));
}
else if (count == 9)
{
player.getInventory().remove(Material.STONE_AXE);
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)1, 1, C.cGreen + "Ultra Axe"));
//Sound
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
//Inform
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Ultra Axe") + "!"));
}
else if (count == 12)
{
player.getInventory().remove(Material.IRON_AXE);
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)1, 1, C.cGreen + "Hyper Axe"));
//Sound
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
//Inform
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Hyper Axe") + "!"));
}
else if (count < 12)
{
//Sound
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 1f, 1f);
}
}
@EventHandler
public void UseAxe(PlayerInteractEvent event)
{
Player player = event.getPlayer();
if (!UtilEvent.isAction(event, ActionType.R))
return;
if (player.getItemInHand() == null)
return;
if (!player.getItemInHand().getType().toString().contains("_AXE"))
return;
if (!Recharge.Instance.use(player, "Axe Boost", 10000, true))
return;
if (UtilGear.isMat(player.getItemInHand(), Material.WOOD_AXE))
{
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 0, false, false, false);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.elem("Basic Boost") + "!"));
//Sound
player.getWorld().playSound(player.getLocation(), Sound.BREATH, 1f, 1f);
}
else if (UtilGear.isMat(player.getItemInHand(), Material.STONE_AXE))
{
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 0, false, false, false);
Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 0, false, false, false);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.elem("Ultra Boost") + "!"));
//Sound
player.getWorld().playSound(player.getLocation(), Sound.BREATH, 1f, 1f);
}
else if (UtilGear.isMat(player.getItemInHand(), Material.IRON_AXE))
{
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 1, false, false, false);
Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 0, false, false, false);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.elem("Mega Boost") + "!"));
//Sound
player.getWorld().playSound(player.getLocation(), Sound.BREATH, 1f, 1f);
}
else if (UtilGear.isMat(player.getItemInHand(), Material.DIAMOND_AXE))
{
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 1, false, false, false);
Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 1, false, false, false);
//Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.elem("Hyper Boost") + "!"));
//Sound
player.getWorld().playSound(player.getLocation(), Sound.BREATH, 1f, 1f);
}
}
@EventHandler
public void UseMeow(PlayerInteractEvent event)
{
Player player = event.getPlayer();
if (!UtilEvent.isAction(event, ActionType.R))
return;
if (!UtilGear.isMat(player.getItemInHand(), Material.SUGAR))
return;
event.setCancelled(true);
if (!Recharge.Instance.use(player, "Meow", 5000, true))
return;
player.getWorld().playSound(player.getLocation(), Sound.CAT_MEOW, 2f, 1f);
this.AddGems(player, 0.5, "Meows", true);
UtilParticle.PlayParticle(ParticleType.NOTE, player.getLocation().add(0, 0.75, 0), 0.4f, 0.4f, 0.4f, 0, 6);
}
@EventHandler
public void UseFirework(PlayerInteractEvent event)
{
Player player = event.getPlayer();
if (!UtilEvent.isAction(event, ActionType.R))
return;
if (!UtilGear.isMat(player.getItemInHand(), Material.FIREWORK))
return;
if (!Recharge.Instance.use(player, "Firework", 15000, true))
{
event.setCancelled(true);
return;
}
this.AddGems(player, 4, "Fireworks", true);
}
@EventHandler
public void UpdateSeekers(UpdateEvent event)
{
@ -320,7 +620,7 @@ public class HideSeek extends TeamGame
if (event.getType() != UpdateType.FAST)
return;
int req = 1;
int req = Math.max(1, GetPlayers(true).size()/3);
while (_seekers.GetPlayers(true).size() < req && _hiders.GetPlayers(true).size() > 0)
{
@ -420,6 +720,7 @@ public class HideSeek extends TeamGame
else
{
_started = true;
GiveItems();
Announce(C.Bold + "The " + F.elem(C.cRed + C.Bold + "Seekers") + ChatColor.RESET + C.Bold + " have been released!");
}
}

View File

@ -19,20 +19,20 @@ import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.*;
public class KitHiderAcrobat extends Kit
public class KitHiderQuick extends Kit
{
public KitHiderAcrobat(ArcadeManager manager)
public KitHiderQuick(ArcadeManager manager)
{
super(manager, "Acrobatic Hider", KitAvailability.Free,
super(manager, "Instant Hider", KitAvailability.Free,
new String[]
{
"Able to get to hard-to-reach places!"
"Changes into solid blocks almost instantly!"
},
new Perk[]
{
new PerkDoubleJump("Double Jump", 0.8, 0.8, false)
},
EntityType.SLIME,
new ItemStack(Material.IRON_BOOTS));
@ -41,7 +41,8 @@ public class KitHiderAcrobat extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Change Form"));
//Swap
player.getInventory().setItem(0, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1, C.cYellow + C.Bold + "Click Block" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Change Form"));
}
@Override
@ -51,7 +52,7 @@ public class KitHiderAcrobat extends Kit
DisguiseSlime slime = new DisguiseSlime(ent);
slime.SetSize(2);
slime.SetName(GetAvailability().GetColor() + GetName() + " Kit" + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
slime.SetName(GetAvailability().GetColor() + GetName() + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
slime.SetCustomNameVisible(true);
DisguiseBlock block = new DisguiseBlock(ent, 20, 0);
@ -61,6 +62,9 @@ public class KitHiderAcrobat extends Kit
public void ToBlock(final DisguiseBlock block, final DisguiseSlime slime)
{
if (Manager.GetGame() == null || Manager.GetGame().InProgress())
return;
Manager.GetDisguise().disguise(block);
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
@ -74,6 +78,9 @@ public class KitHiderAcrobat extends Kit
public void ToSlime(final DisguiseBlock block, final DisguiseSlime slime)
{
if (Manager.GetGame() == null || Manager.GetGame().InProgress())
return;
Manager.GetDisguise().disguise(slime);
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()

View File

@ -41,7 +41,7 @@ public class KitHiderShocker extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Change Form"));
player.getInventory().setItem(0, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1, C.cYellow + C.Bold + "Click Block" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Change Form"));
}
@Override
@ -51,16 +51,19 @@ public class KitHiderShocker extends Kit
DisguiseSlime slime = new DisguiseSlime(ent);
slime.SetSize(2);
slime.SetName(GetAvailability().GetColor() + GetName() + " Kit" + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
slime.SetName(GetAvailability().GetColor() + GetName() + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
slime.SetCustomNameVisible(true);
DisguiseBlock block = new DisguiseBlock(ent, 124, 0);
DisguiseBlock block = new DisguiseBlock(ent, 47, 0);
ToBlock(block, slime);
}
public void ToBlock(final DisguiseBlock block, final DisguiseSlime slime)
{
if (Manager.GetGame() == null || Manager.GetGame().InProgress())
return;
Manager.GetDisguise().disguise(block);
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
@ -74,6 +77,9 @@ public class KitHiderShocker extends Kit
public void ToSlime(final DisguiseBlock block, final DisguiseSlime slime)
{
if (Manager.GetGame() == null || Manager.GetGame().InProgress())
return;
Manager.GetDisguise().disguise(slime);
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()

View File

@ -26,7 +26,7 @@ public class KitHiderSwapper extends Kit
new String[]
{
"Can change form multiple times!"
"Can change form 12 times!"
},
new Perk[]
@ -40,7 +40,7 @@ public class KitHiderSwapper extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 32, C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Change Form"));
player.getInventory().setItem(0, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 12, C.cYellow + C.Bold + "Click Block" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Change Form"));
}
@Override
@ -50,7 +50,7 @@ public class KitHiderSwapper extends Kit
DisguiseSlime slime = new DisguiseSlime(ent);
slime.SetSize(2);
slime.SetName(GetAvailability().GetColor() + GetName() + " Kit" + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
slime.SetName(GetAvailability().GetColor() + GetName() + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : ""));
slime.SetCustomNameVisible(true);
ToBlock(ent, slime);
@ -58,6 +58,9 @@ public class KitHiderSwapper extends Kit
public void ToBlock(final LivingEntity ent, final DisguiseSlime slime)
{
if (Manager.GetGame() == null || Manager.GetGame().InProgress())
return;
double r = Math.random();
if (r > 0.75) Manager.GetDisguise().disguise(new DisguiseBlock(ent, 54, 0));
@ -76,6 +79,9 @@ public class KitHiderSwapper extends Kit
public void ToSlime(final LivingEntity ent, final DisguiseSlime slime)
{
if (Manager.GetGame() == null || Manager.GetGame().InProgress())
return;
Manager.GetDisguise().disguise(slime);
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()

View File

@ -10,28 +10,26 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.inventory.ItemStack;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkBarrage;
import nautilus.game.arcade.kit.perks.PerkFletcher;
import nautilus.game.arcade.kit.perks.PerkRadar;
public class KitSeekerArcher extends Kit
public class KitSeekerHunter extends Kit
{
public KitSeekerArcher(ArcadeManager manager)
public KitSeekerHunter(ArcadeManager manager)
{
super(manager, "Archer Seeker", KitAvailability.Green,
super(manager, "Hunter Seeker", KitAvailability.Green,
new String[]
{
"PEW"
"Tick......tick...tick.tick.",
},
new Perk[]
{
new PerkBarrage(5, 250, true, false),
new PerkRadar(),
new PerkFletcher(2, 4, false),
},
EntityType.ZOMBIE,
@ -42,8 +40,9 @@ public class KitSeekerArcher extends Kit
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOD_SWORD));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.COMPASS, (byte)0, 1, "Radar Scanner"));
player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_HELMET));
player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_CHESTPLATE));

View File

@ -1,75 +0,0 @@
package nautilus.game.arcade.game.games.hideseek.kits;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.inventory.ItemStack;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.*;
public class KitSeekerRadar extends Kit
{
public KitSeekerRadar(ArcadeManager manager)
{
super(manager, "Radar Seeker", KitAvailability.Free,
new String[]
{
"Tick......tick...tick.tick.",
},
new Perk[]
{
new PerkRadar()
},
EntityType.ZOMBIE,
new ItemStack(Material.COMPASS));
}
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.COMPASS, (byte)0, 1, "Radar Scanner"));
player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_HELMET));
player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_CHESTPLATE));
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_LEGGINGS));
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BOOTS));
}
@Override
public void SpawnCustom(LivingEntity ent)
{
ent.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
ent.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
ent.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
}
@EventHandler(priority = EventPriority.LOW)
public void Damage(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
if (event.GetCause() != DamageCause.ENTITY_EXPLOSION)
return;
Player damagee = event.GetDamageePlayer();
if (damagee == null) return;
if (HasKit(damagee))
event.SetCancelled("TNT Resistant");
}
}

View File

@ -74,6 +74,9 @@ public class PerkPaintballMachineGun extends Perk
event.setCancelled(true);
if (!Recharge.Instance.use(player, GetName(), 80, false))
return;
ShootPaintball(player, team);
/*

View File

@ -38,7 +38,7 @@ public class PerkShockingStrike extends Perk
return;
Manager.GetCondition().Factory().Slow(GetName(), event.GetDamageeEntity(), damager, 2, 1, false, false, false, false);
Manager.GetCondition().Factory().Blind(GetName(), event.GetDamageeEntity(), damager, 2, 1, false, false, false);
Manager.GetCondition().Factory().Shock(GetName(), event.GetDamageeEntity(), damager, 2, false, false);
Manager.GetCondition().Factory().Blind(GetName(), event.GetDamageeEntity(), damager, 1.5, 1, false, false, false);
Manager.GetCondition().Factory().Shock(GetName(), event.GetDamageeEntity(), damager, 1, false, false);
}
}

View File

@ -650,6 +650,11 @@ public class GameLobbyManager implements IPacketRunnable, Listener
}
}
public void AddKitLocation(Entity ent, Kit kit, Location loc)
{
_kits.put(ent, new LobbyEnt(ent, loc, kit));
}
@EventHandler
public void PlayerQuit(PlayerQuitEvent event)
{