Switching branches c:
This commit is contained in:
parent
399edbab29
commit
448dd33c1a
@ -109,7 +109,7 @@ public enum AchievementCategory
|
|||||||
|
|
||||||
SUPER_PAINTBALL("Super Paintball", null,
|
SUPER_PAINTBALL("Super Paintball", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.ENDER_PEARL, 0, GameCategory.ARCADE, null),
|
Material.ENDER_PEARL, 0, GameCategory.ARCADE, "Sniper Kit"),
|
||||||
|
|
||||||
TURF_WARS("Turf Wars", null,
|
TURF_WARS("Turf Wars", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
@ -137,7 +137,7 @@ public enum AchievementCategory
|
|||||||
|
|
||||||
MICRO_BATTLE("Micro Battle", null,
|
MICRO_BATTLE("Micro Battle", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
Material.LAVA, 0, GameCategory.ARCADE, null),
|
Material.LAVA_BUCKET, 0, GameCategory.ARCADE, null),
|
||||||
|
|
||||||
BOMB_LOBBERS("Bomb Lobbers", null,
|
BOMB_LOBBERS("Bomb Lobbers", null,
|
||||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||||
|
@ -5,14 +5,15 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
|
||||||
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.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.game.SoloGame;
|
import nautilus.game.arcade.game.SoloGame;
|
||||||
import nautilus.game.arcade.game.games.baconbrawl.kits.*;
|
import nautilus.game.arcade.game.games.baconbrawl.kits.KitMamaPig;
|
||||||
|
import nautilus.game.arcade.game.games.baconbrawl.kits.KitPig;
|
||||||
|
import nautilus.game.arcade.game.games.baconbrawl.kits.KitSheepPig;
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
|
|
||||||
public class BaconBrawl extends SoloGame
|
public class BaconBrawl extends SoloGame
|
||||||
@ -34,9 +35,9 @@ public class BaconBrawl extends SoloGame
|
|||||||
"Last pig in the arena wins!"
|
"Last pig in the arena wins!"
|
||||||
});
|
});
|
||||||
|
|
||||||
this.DamageTeamSelf = true;
|
DamageTeamSelf = true;
|
||||||
this.HungerSet = 20;
|
HungerSet = 20;
|
||||||
this.PrepareFreeze = false;
|
PrepareFreeze = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -11,7 +11,6 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.disguise.disguises.DisguisePig;
|
import mineplex.core.disguise.disguises.DisguisePig;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
|
@ -13,7 +13,6 @@ import nautilus.game.arcade.kit.Kit;
|
|||||||
import nautilus.game.arcade.kit.KitAvailability;
|
import nautilus.game.arcade.kit.KitAvailability;
|
||||||
import nautilus.game.arcade.kit.Perk;
|
import nautilus.game.arcade.kit.Perk;
|
||||||
import nautilus.game.arcade.kit.perks.PerkBodySlam;
|
import nautilus.game.arcade.kit.perks.PerkBodySlam;
|
||||||
import nautilus.game.arcade.kit.perks.PerkJump;
|
|
||||||
|
|
||||||
public class KitPig extends Kit
|
public class KitPig extends Kit
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package nautilus.game.arcade.game.games.baconbrawl.kits;
|
package nautilus.game.arcade.game.games.baconbrawl.kits;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -26,6 +26,7 @@ public class BridgePart
|
|||||||
Velocity = velocity;
|
Velocity = velocity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public boolean Update()
|
public boolean Update()
|
||||||
{
|
{
|
||||||
if (!Entity.isValid())
|
if (!Entity.isValid())
|
||||||
|
@ -172,7 +172,7 @@ public class Paintball extends TeamGame
|
|||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void Paint(ProjectileHitEvent event)
|
public void Paint(final ProjectileHitEvent event)
|
||||||
{
|
{
|
||||||
// Fixed projectile wool painting in waiting lobby.
|
// Fixed projectile wool painting in waiting lobby.
|
||||||
|
|
||||||
@ -181,27 +181,48 @@ public class Paintball extends TeamGame
|
|||||||
if (event.getEntity() instanceof ThrownPotion)
|
if (event.getEntity() instanceof ThrownPotion)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
byte color = 3;
|
final byte color = (byte) (event.getEntity() instanceof EnderPearl || (event.getEntity() instanceof Arrow && event.getEntity().hasMetadata("color") && ChatColor.values()[event.getEntity().getMetadata("color").get(0).asInt()] == ChatColor.RED) ? 14 : 3);
|
||||||
if (event.getEntity() instanceof EnderPearl || (event.getEntity() instanceof Arrow && event.getEntity().hasMetadata("color") && ChatColor.values()[event.getEntity().getMetadata("color").get(0).asInt()] == ChatColor.RED))
|
|
||||||
color = 14;
|
|
||||||
|
|
||||||
Location loc = event.getEntity().getLocation();
|
if (event.getEntity() instanceof Arrow)
|
||||||
|
{
|
||||||
|
Manager.runSyncLater(new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
Location loc = event.getEntity().getLocation();
|
||||||
|
|
||||||
|
for (Block block : UtilBlock.getInRadius(loc, 1.5d).keySet())
|
||||||
|
{
|
||||||
|
if (block.getType() != Material.WOOL && block.getType() != Material.STAINED_CLAY)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!(event.getEntity() instanceof Arrow))
|
block.setData(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color == 3) loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 8);
|
||||||
|
else loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 10);
|
||||||
|
}
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Location loc = event.getEntity().getLocation();
|
||||||
loc.add(event.getEntity().getVelocity());
|
loc.add(event.getEntity().getVelocity());
|
||||||
|
|
||||||
for (Block block : UtilBlock.getInRadius(loc, 1.5d).keySet())
|
for (Block block : UtilBlock.getInRadius(loc, 1.5d).keySet())
|
||||||
{
|
{
|
||||||
if (block.getType() != Material.WOOL && block.getType() != Material.STAINED_CLAY)
|
if (block.getType() != Material.WOOL && block.getType() != Material.STAINED_CLAY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
block.setData(color);
|
block.setData(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color == 3) loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 8);
|
||||||
|
else loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 10);
|
||||||
|
|
||||||
|
event.getEntity().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color == 3) loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 8);
|
|
||||||
else loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 10);
|
|
||||||
|
|
||||||
event.getEntity().remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ import org.bukkit.entity.Arrow;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
|
|
||||||
@ -111,7 +110,7 @@ public class PerkPaintballSniper extends Perk
|
|||||||
|
|
||||||
for (Player viewer : UtilServer.getPlayers())
|
for (Player viewer : UtilServer.getPlayers())
|
||||||
UtilPlayer.sendPacket(viewer, packet);
|
UtilPlayer.sendPacket(viewer, packet);
|
||||||
|
|
||||||
proj.setMetadata("color", new FixedMetadataValue(Manager.getPlugin(), Manager.GetGame().GetTeam(player).GetColor().ordinal()));
|
proj.setMetadata("color", new FixedMetadataValue(Manager.getPlugin(), Manager.GetGame().GetTeam(player).GetColor().ordinal()));
|
||||||
|
|
||||||
Bullet bullet = new Bullet();
|
Bullet bullet = new Bullet();
|
||||||
@ -226,13 +225,7 @@ public class PerkPaintballSniper extends Perk
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (Arrow proj : new ArrayList<Arrow>(_fired.keySet()))
|
for (Arrow proj : new ArrayList<Arrow>(_fired.keySet()))
|
||||||
{
|
{
|
||||||
if (!proj.isValid())
|
|
||||||
{
|
|
||||||
_fired.remove(proj);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bullet bullet = _fired.get(proj);
|
Bullet bullet = _fired.get(proj);
|
||||||
|
|
||||||
double curRange = 0;
|
double curRange = 0;
|
||||||
@ -258,49 +251,55 @@ public class PerkPaintballSniper extends Perk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!proj.isValid())
|
||||||
|
{
|
||||||
|
_fired.remove(proj);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bullet.LastSeen = proj.getLocation();
|
bullet.LastSeen = proj.getLocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
// @EventHandler(priority = EventPriority.HIGH)
|
||||||
public void doArrowEffects(ProjectileHitEvent event)
|
// public void doArrowEffects(ProjectileHitEvent event)
|
||||||
{
|
// {
|
||||||
if (!Manager.GetGame().IsLive())
|
// if (!Manager.GetGame().IsLive())
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
if (!(event.getEntity() instanceof Arrow))
|
// if (!(event.getEntity() instanceof Arrow))
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
Arrow proj = (Arrow) event.getEntity();
|
// Arrow proj = (Arrow) event.getEntity();
|
||||||
|
//
|
||||||
if (!_fired.containsKey(proj))
|
// if (!_fired.containsKey(proj))
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
Bullet bullet = _fired.get(proj);
|
// Bullet bullet = _fired.get(proj);
|
||||||
|
//
|
||||||
double curRange = 0;
|
// double curRange = 0;
|
||||||
double distance = Math.abs(UtilMath.offset(proj.getLocation(), bullet.LastSeen));
|
// double distance = Math.abs(UtilMath.offset(proj.getLocation(), bullet.LastSeen));
|
||||||
|
//
|
||||||
while (curRange <= distance)
|
// while (curRange <= distance)
|
||||||
{
|
// {
|
||||||
Location newTarget = bullet.LastSeen.add(UtilAlg.getTrajectory(bullet.LastSeen, proj.getLocation()).multiply(curRange));
|
// Location newTarget = bullet.LastSeen.add(UtilAlg.getTrajectory(bullet.LastSeen, proj.getLocation()).multiply(curRange));
|
||||||
|
//
|
||||||
//Progress Forwards
|
// //Progress Forwards
|
||||||
curRange += 0.8;
|
// curRange += 0.8;
|
||||||
|
//
|
||||||
ChatColor color = ChatColor.values()[proj.getMetadata("color").get(0).asInt()];
|
// ChatColor color = ChatColor.values()[proj.getMetadata("color").get(0).asInt()];
|
||||||
if (color == ChatColor.BLUE || color == ChatColor.AQUA)
|
// if (color == ChatColor.BLUE || color == ChatColor.AQUA)
|
||||||
{
|
// {
|
||||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, newTarget, -1, 1, 1, 1, 0,
|
// UtilParticle.PlayParticle(ParticleType.RED_DUST, newTarget, -1, 1, 1, 1, 0,
|
||||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
// ViewDist.NORMAL, UtilServer.getPlayers());
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
UtilParticle.PlayParticle(ParticleType.RED_DUST, newTarget, 0, 0, 0, 0, 1,
|
// UtilParticle.PlayParticle(ParticleType.RED_DUST, newTarget, 0, 0, 0, 0, 1,
|
||||||
ViewDist.NORMAL, UtilServer.getPlayers());
|
// ViewDist.NORMAL, UtilServer.getPlayers());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void removeEffects(GameStateChangeEvent event)
|
public void removeEffects(GameStateChangeEvent event)
|
||||||
|
@ -15,6 +15,7 @@ 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.UtilBlock;
|
||||||
import mineplex.core.common.util.UtilEnt;
|
import mineplex.core.common.util.UtilEnt;
|
||||||
|
import mineplex.core.common.util.UtilGear;
|
||||||
import mineplex.core.common.util.UtilInv;
|
import mineplex.core.common.util.UtilInv;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
@ -47,10 +48,7 @@ public class PerkBaconBlast extends Perk implements IThrown
|
|||||||
if (UtilBlock.usable(event.getClickedBlock()))
|
if (UtilBlock.usable(event.getClickedBlock()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event.getPlayer().getItemInHand() == null)
|
if (!UtilGear.isAxe(event.getItem()))
|
||||||
return;
|
|
||||||
|
|
||||||
if (!event.getPlayer().getItemInHand().getType().toString().contains("_AXE"))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
@ -2,7 +2,6 @@ package nautilus.game.arcade.kit.perks;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
@ -11,7 +11,10 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
|
|
||||||
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.UtilEvent;
|
||||||
|
import mineplex.core.common.util.UtilGear;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
import nautilus.game.arcade.kit.Perk;
|
import nautilus.game.arcade.kit.Perk;
|
||||||
@ -31,10 +34,10 @@ public class PerkPigCloak extends Perk
|
|||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
if (!UtilEvent.isAction(event, ActionType.R))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!event.getPlayer().getItemInHand().getType().toString().contains("_AXE"))
|
if (!UtilGear.isAxe(event.getItem()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Kit.HasKit(player))
|
if (!Kit.HasKit(player))
|
||||||
|
Loading…
Reference in New Issue
Block a user