MS fixes
This commit is contained in:
parent
16214613fe
commit
8780d5e4ee
@ -93,15 +93,7 @@ public class AntiStack extends MiniPlugin
|
|||||||
|
|
||||||
Item item = event.getItem();
|
Item item = event.getItem();
|
||||||
|
|
||||||
//Get Name
|
removeUID(item);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -130,4 +122,17 @@ public class AntiStack extends MiniPlugin
|
|||||||
{
|
{
|
||||||
_enabled = var;
|
_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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,8 @@ public class HideSeek extends TeamGame
|
|||||||
{
|
{
|
||||||
new KitHiderSwapper(manager),
|
new KitHiderSwapper(manager),
|
||||||
new KitHiderQuick(manager),
|
new KitHiderQuick(manager),
|
||||||
new KitHiderShocker(manager),
|
//new KitHiderShocker(manager),
|
||||||
|
new NullKit(manager),
|
||||||
new NullKit(manager),
|
new NullKit(manager),
|
||||||
new KitSeekerLeaper(manager),
|
new KitSeekerLeaper(manager),
|
||||||
new KitSeekerTNT(manager),
|
new KitSeekerTNT(manager),
|
||||||
|
@ -49,6 +49,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
import org.bukkit.inventory.meta.LeatherArmorMeta;
|
import org.bukkit.inventory.meta.LeatherArmorMeta;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import mineplex.core.antistack.AntiStack;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilAction;
|
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.data.Bullet;
|
||||||
import nautilus.game.arcade.game.games.minestrike.items.StrikeItem;
|
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.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.equipment.armor.Armor;
|
||||||
import nautilus.game.arcade.game.games.minestrike.items.grenades.Grenade;
|
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.Gun;
|
||||||
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
|
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.Glock18;
|
||||||
import nautilus.game.arcade.game.games.minestrike.items.guns.pistol.P2000;
|
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.minestrike.kits.KitPlayer;
|
||||||
import nautilus.game.arcade.game.games.turfforts.TurfForts.ShredBlockEvent;
|
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
import net.minecraft.server.v1_7_R4.EntityArrow;
|
import net.minecraft.server.v1_7_R4.EntityArrow;
|
||||||
|
|
||||||
@ -379,22 +377,38 @@ public class MineStrike extends TeamGame
|
|||||||
{
|
{
|
||||||
for (Player other : team.GetPlayers(false))
|
for (Player other : team.GetPlayers(false))
|
||||||
if (!other.equals(player))
|
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!");
|
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 + "You have the Bomb!");
|
||||||
UtilPlayer.message(player, C.cGold + C.Bold + "Hold Right-Click to place at a Bomb Site!");
|
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
|
else
|
||||||
{
|
{
|
||||||
for (Player other : team.GetPlayers(false))
|
for (Player other : team.GetPlayers(false))
|
||||||
if (!other.equals(player))
|
if (!other.equals(player))
|
||||||
|
{
|
||||||
UtilPlayer.message(other, C.cGold + C.Bold + player.getName() + " picked up the Bomb!");
|
UtilPlayer.message(other, C.cGold + C.Bold + player.getName() + " 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!");
|
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);
|
player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 2f);
|
||||||
_bombHolder = player;
|
_bombHolder = player;
|
||||||
|
|
||||||
@ -762,6 +776,8 @@ public class MineStrike extends TeamGame
|
|||||||
if (UtilInv.contains(event.getPlayer(), Material.SHEARS, (byte)0, 1))
|
if (UtilInv.contains(event.getPlayer(), Material.SHEARS, (byte)0, 1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
AntiStack.removeUID(event.getItem());
|
||||||
|
|
||||||
event.getPlayer().getInventory().setItem(8, event.getItem().getItemStack());
|
event.getPlayer().getInventory().setItem(8, event.getItem().getItemStack());
|
||||||
|
|
||||||
UtilPlayer.message(event.getPlayer(), F.main("Game", "You equipped Defusal Kit."));
|
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)
|
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));
|
loc.add(trajectory.clone().multiply(0.1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1411,7 +1426,9 @@ public class MineStrike extends TeamGame
|
|||||||
_bombPlanter.setItemInHand(null);
|
_bombPlanter.setItemInHand(null);
|
||||||
_bombPlanter = null;
|
_bombPlanter = null;
|
||||||
_bombHolder = 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())
|
for (Player player : UtilServer.getPlayers())
|
||||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
|
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
|
//Check for total game win
|
||||||
EndCheck();
|
EndCheck();
|
||||||
@ -2089,7 +2106,10 @@ public class MineStrike extends TeamGame
|
|||||||
|
|
||||||
ItemStack stack = _scoped.remove(player);
|
ItemStack stack = _scoped.remove(player);
|
||||||
|
|
||||||
|
|
||||||
player.getInventory().setHelmet(stack);
|
player.getInventory().setHelmet(stack);
|
||||||
|
UtilInv.Update(player);
|
||||||
|
|
||||||
Manager.GetCondition().EndCondition(player, null, "Scope");
|
Manager.GetCondition().EndCondition(player, null, "Scope");
|
||||||
|
|
||||||
player.getWorld().playSound(player.getEyeLocation(), Sound.GHAST_DEATH, 0.8f, 1f);
|
player.getWorld().playSound(player.getEyeLocation(), Sound.GHAST_DEATH, 0.8f, 1f);
|
||||||
|
@ -163,11 +163,11 @@ public abstract class Gun extends StrikeItem
|
|||||||
loc.add(UtilAlg.getDown(player.getLocation().getDirection()).multiply(0.3));
|
loc.add(UtilAlg.getDown(player.getLocation().getDirection()).multiply(0.3));
|
||||||
UtilParticle.PlayParticle(ParticleType.EXPLODE, loc, 0, 0, 0, 0, 1);
|
UtilParticle.PlayParticle(ParticleType.EXPLODE, loc, 0, 0, 0, 0, 1);
|
||||||
|
|
||||||
|
game.registerBullet(fireBullet(player, game));
|
||||||
|
|
||||||
//Unscope
|
//Unscope
|
||||||
if (_gunType == GunType.SNIPER)
|
if (_gunType == GunType.SNIPER)
|
||||||
game.removeScope(player);
|
game.removeScope(player);
|
||||||
|
|
||||||
game.registerBullet(fireBullet(player, game));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bullet fireBullet(Player player, MineStrike game)
|
public Bullet fireBullet(Player player, MineStrike game)
|
||||||
|
@ -75,7 +75,7 @@ public class KitPig extends SmashKit
|
|||||||
{
|
{
|
||||||
ChatColor.RESET + "When your health drops below 4, you morph",
|
ChatColor.RESET + "When your health drops below 4, you morph",
|
||||||
ChatColor.RESET + "into a Nether Pig. This gives you Speed I,",
|
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 + "",
|
||||||
ChatColor.RESET + "When your health returns to 8, you return",
|
ChatColor.RESET + "When your health returns to 8, you return",
|
||||||
ChatColor.RESET + "back to Pig Form.",
|
ChatColor.RESET + "back to Pig Form.",
|
||||||
|
@ -71,7 +71,7 @@ public class PerkPigBaconBomb extends Perk
|
|||||||
|
|
||||||
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
|
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
|
||||||
if (disguise != null && disguise instanceof DisguisePigZombie)
|
if (disguise != null && disguise instanceof DisguisePigZombie)
|
||||||
energy = 0.2f;
|
energy = energy * 0.7f;
|
||||||
|
|
||||||
//Energy
|
//Energy
|
||||||
if (player.getExp() < energy)
|
if (player.getExp() < energy)
|
||||||
|
@ -73,7 +73,7 @@ public class PerkPigBaconBounce extends Perk implements IThrown
|
|||||||
|
|
||||||
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
|
DisguiseBase disguise = Manager.GetDisguise().getDisguise(player);
|
||||||
if (disguise != null && disguise instanceof DisguisePigZombie)
|
if (disguise != null && disguise instanceof DisguisePigZombie)
|
||||||
energy = 0.1f;
|
energy = energy * 0.7f;
|
||||||
|
|
||||||
//Energy
|
//Energy
|
||||||
if (player.getExp() < energy)
|
if (player.getExp() < energy)
|
||||||
|
@ -60,10 +60,10 @@ public class PerkPigZombie extends Perk
|
|||||||
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS));
|
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS));
|
||||||
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_BOOTS));
|
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_BOOTS));
|
||||||
|
|
||||||
player.getInventory().remove(Material.DIAMOND_HELMET);
|
player.getInventory().remove(Material.IRON_HELMET);
|
||||||
player.getInventory().remove(Material.DIAMOND_CHESTPLATE);
|
player.getInventory().remove(Material.IRON_CHESTPLATE);
|
||||||
player.getInventory().remove(Material.DIAMOND_LEGGINGS);
|
player.getInventory().remove(Material.IRON_LEGGINGS);
|
||||||
player.getInventory().remove(Material.DIAMOND_BOOTS);
|
player.getInventory().remove(Material.IRON_BOOTS);
|
||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguisePig disguise = new DisguisePig(player);
|
DisguisePig disguise = new DisguisePig(player);
|
||||||
@ -93,10 +93,10 @@ public class PerkPigZombie extends Perk
|
|||||||
_active.add(player);
|
_active.add(player);
|
||||||
|
|
||||||
//Armor
|
//Armor
|
||||||
player.getInventory().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
|
player.getInventory().setHelmet(new ItemStack(Material.IRON_HELMET));
|
||||||
player.getInventory().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
player.getInventory().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));
|
||||||
player.getInventory().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
|
player.getInventory().setLeggings(new ItemStack(Material.IRON_LEGGINGS));
|
||||||
player.getInventory().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
|
player.getInventory().setBoots(new ItemStack(Material.IRON_BOOTS));
|
||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguisePigZombie disguise = new DisguisePigZombie(player);
|
DisguisePigZombie disguise = new DisguisePigZombie(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user