This commit is contained in:
Chiss 2014-09-17 11:18:59 +10:00
parent 16214613fe
commit 8780d5e4ee
8 changed files with 57 additions and 31 deletions

View File

@ -93,15 +93,7 @@ public class AntiStack extends MiniPlugin
Item item = event.getItem();
//Get Name
String name = ((CraftItemStack)item.getItemStack()).getHandle().getName();
//Remove UID
if (name.contains(":"))
name = name.substring(0, name.indexOf(":" + item.getUniqueId()));
//Set Name
((CraftItemStack)item.getItemStack()).getHandle().c(name);
removeUID(item);
}
@EventHandler
@ -130,4 +122,17 @@ public class AntiStack extends MiniPlugin
{
_enabled = var;
}
public static void removeUID(Item item)
{
//Get Name
String name = ((CraftItemStack)item.getItemStack()).getHandle().getName();
//Remove UID
if (name.contains(":"))
name = name.substring(0, name.indexOf(":" + item.getUniqueId()));
//Set Name
((CraftItemStack)item.getItemStack()).getHandle().c(name);
}
}

View File

@ -188,7 +188,8 @@ public class HideSeek extends TeamGame
{
new KitHiderSwapper(manager),
new KitHiderQuick(manager),
new KitHiderShocker(manager),
//new KitHiderShocker(manager),
new NullKit(manager),
new NullKit(manager),
new KitSeekerLeaper(manager),
new KitSeekerTNT(manager),

View File

@ -49,6 +49,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.LeatherArmorMeta;
import org.bukkit.util.Vector;
import mineplex.core.antistack.AntiStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
@ -88,16 +89,13 @@ import nautilus.game.arcade.game.games.minestrike.data.Bomb;
import nautilus.game.arcade.game.games.minestrike.data.Bullet;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItem;
import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
import nautilus.game.arcade.game.games.minestrike.items.equipment.DefusalKit;
import nautilus.game.arcade.game.games.minestrike.items.equipment.armor.Armor;
import nautilus.game.arcade.game.games.minestrike.items.grenades.Grenade;
import nautilus.game.arcade.game.games.minestrike.items.guns.Gun;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
import nautilus.game.arcade.game.games.minestrike.items.guns.pistol.Glock18;
import nautilus.game.arcade.game.games.minestrike.items.guns.pistol.P2000;
import nautilus.game.arcade.game.games.minestrike.items.guns.rifle.AWP;
import nautilus.game.arcade.game.games.minestrike.kits.KitPlayer;
import nautilus.game.arcade.game.games.turfforts.TurfForts.ShredBlockEvent;
import nautilus.game.arcade.kit.Kit;
import net.minecraft.server.v1_7_R4.EntityArrow;
@ -379,21 +377,37 @@ public class MineStrike extends TeamGame
{
for (Player other : team.GetPlayers(false))
if (!other.equals(player))
{
UtilTitle.display(null, player.getName() + " has the Bomb", 10, 80, 10, other);
UtilPlayer.message(other, C.cGold + C.Bold + player.getName() + " has the Bomb!");
}
//Chat
UtilPlayer.message(player, C.cGold + C.Bold + "You have the Bomb!");
UtilPlayer.message(player, C.cGold + C.Bold + "Hold Right-Click to place at a Bomb Site!");
//Title
UtilTitle.display(C.cRed + "You have the Bomb", "Hold Right-Click to place at a Bomb Site!", 10, 80, 10, player);
}
else
{
for (Player other : team.GetPlayers(false))
if (!other.equals(player))
{
UtilPlayer.message(other, C.cGold + C.Bold + player.getName() + " picked up the Bomb!");
UtilPlayer.message(player, C.cGold + C.Bold + "You picked up the Bomb!");
//Title
UtilTitle.display(null, player.getName() + " picked up the Bomb", 10, 50, 10, other);
}
//Chat
UtilPlayer.message(player, C.cGold + C.Bold + "You picked up the Bomb!");
//Title
UtilTitle.display(null, "You picked up the Bomb", 10, 50, 10, player);
}
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 2f);
_bombHolder = player;
@ -762,6 +776,8 @@ public class MineStrike extends TeamGame
if (UtilInv.contains(event.getPlayer(), Material.SHEARS, (byte)0, 1))
return;
AntiStack.removeUID(event.getItem());
event.getPlayer().getInventory().setItem(8, event.getItem().getItemStack());
UtilPlayer.message(event.getPlayer(), F.main("Game", "You equipped Defusal Kit."));
@ -1168,7 +1184,6 @@ public class MineStrike extends TeamGame
while (!hitHead(damagee, loc) && !hitBody(damagee, loc) && UtilMath.offset(damagee.getLocation(), loc) < 6)
{
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, loc, 0, 0, 0, 0, 1);
loc.add(trajectory.clone().multiply(0.1));
}
@ -1412,6 +1427,8 @@ public class MineStrike extends TeamGame
_bombPlanter = null;
_bombHolder = null;
//Title
UtilTitle.display(null, C.cRed + C.Bold + "Bomb has been planted!", 10, 50, 10);
}
}
@ -1722,7 +1739,7 @@ public class MineStrike extends TeamGame
for (Player player : UtilServer.getPlayers())
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
UtilTitle.display(winnerLine, _winText, 20, 120, 20);
UtilTitle.display(null, winnerLine, 20, 120, 20);
//Check for total game win
EndCheck();
@ -2089,7 +2106,10 @@ public class MineStrike extends TeamGame
ItemStack stack = _scoped.remove(player);
player.getInventory().setHelmet(stack);
UtilInv.Update(player);
Manager.GetCondition().EndCondition(player, null, "Scope");
player.getWorld().playSound(player.getEyeLocation(), Sound.GHAST_DEATH, 0.8f, 1f);

View File

@ -163,11 +163,11 @@ public abstract class Gun extends StrikeItem
loc.add(UtilAlg.getDown(player.getLocation().getDirection()).multiply(0.3));
UtilParticle.PlayParticle(ParticleType.EXPLODE, loc, 0, 0, 0, 0, 1);
game.registerBullet(fireBullet(player, game));
//Unscope
if (_gunType == GunType.SNIPER)
game.removeScope(player);
game.registerBullet(fireBullet(player, game));
}
public Bullet fireBullet(Player player, MineStrike game)

View File

@ -75,7 +75,7 @@ public class KitPig extends SmashKit
{
ChatColor.RESET + "When your health drops below 4, you morph",
ChatColor.RESET + "into a Nether Pig. This gives you Speed I,",
ChatColor.RESET + "10 Armor and half Energy costs for skills.",
ChatColor.RESET + "8 Armor and reduces Energy costs by 33%.",
ChatColor.RESET + "",
ChatColor.RESET + "When your health returns to 8, you return",
ChatColor.RESET + "back to Pig Form.",

View File

@ -71,7 +71,7 @@ public class PerkPigBaconBomb extends Perk
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
if (disguise != null && disguise instanceof DisguisePigZombie)
energy = 0.2f;
energy = energy * 0.7f;
//Energy
if (player.getExp() < energy)

View File

@ -73,7 +73,7 @@ public class PerkPigBaconBounce extends Perk implements IThrown
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
if (disguise != null && disguise instanceof DisguisePigZombie)
energy = 0.1f;
energy = energy * 0.7f;
//Energy
if (player.getExp() < energy)

View File

@ -60,10 +60,10 @@ public class PerkPigZombie extends Perk
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS));
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_BOOTS));
player.getInventory().remove(Material.DIAMOND_HELMET);
player.getInventory().remove(Material.DIAMOND_CHESTPLATE);
player.getInventory().remove(Material.DIAMOND_LEGGINGS);
player.getInventory().remove(Material.DIAMOND_BOOTS);
player.getInventory().remove(Material.IRON_HELMET);
player.getInventory().remove(Material.IRON_CHESTPLATE);
player.getInventory().remove(Material.IRON_LEGGINGS);
player.getInventory().remove(Material.IRON_BOOTS);
//Disguise
DisguisePig disguise = new DisguisePig(player);
@ -93,10 +93,10 @@ public class PerkPigZombie extends Perk
_active.add(player);
//Armor
player.getInventory().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
player.getInventory().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
player.getInventory().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
player.getInventory().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
player.getInventory().setHelmet(new ItemStack(Material.IRON_HELMET));
player.getInventory().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));
player.getInventory().setLeggings(new ItemStack(Material.IRON_LEGGINGS));
player.getInventory().setBoots(new ItemStack(Material.IRON_BOOTS));
//Disguise
DisguisePigZombie disguise = new DisguisePigZombie(player);