MERGE PLEASE!

This commit is contained in:
Sam 2016-10-13 16:11:01 +01:00
parent 2b2bb817be
commit a5d52d9e2f
21 changed files with 196 additions and 217 deletions

View File

@ -31,6 +31,8 @@ public class BabyFireworkEffect extends Effect
_multipleColors = true; _multipleColors = true;
_fireworkColor = Color.RED; _fireworkColor = Color.RED;
} }
_colors = new Color[0];
} }
public BabyFireworkEffect(Location location, JavaPlugin javaPlugin, Color... colors) public BabyFireworkEffect(Location location, JavaPlugin javaPlugin, Color... colors)

View File

@ -314,6 +314,7 @@ public class TreasureLocation implements Listener
{ {
Location fromLocation = event.getFrom(); Location fromLocation = event.getFrom();
Location toLocation = event.getTo(); Location toLocation = event.getTo();
if (fromLocation.getWorld().equals(toLocation.getWorld())) return;
Location centerLocation = _currentTreasure.getCenterBlock().getLocation().add(0.5, 1.5, 0.5); Location centerLocation = _currentTreasure.getCenterBlock().getLocation().add(0.5, 1.5, 0.5);
double toDistanceFromCenter = centerLocation.distanceSquared(toLocation); double toDistanceFromCenter = centerLocation.distanceSquared(toLocation);

View File

@ -1,6 +1,7 @@
package mineplex.hub; package mineplex.hub;
import mineplex.core.Managers; import mineplex.core.Managers;
import mineplex.core.MiniClientPlugin; import mineplex.core.MiniClientPlugin;
import mineplex.core.TimingsFix;
import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClient;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager; import mineplex.core.achievement.AchievementManager;
@ -237,6 +238,7 @@ public class HubManager extends MiniClientPlugin<HubClient> implements IChatMess
// new HolidayGiftManager(plugin, clientManager, donationManager, inventoryManager, taskManager); // new HolidayGiftManager(plugin, clientManager, donationManager, inventoryManager, taskManager);
require(PlayerDisguiseManager.class); require(PlayerDisguiseManager.class);
require(TimingsFix.class);
// NotificationManager notificationManager = new NotificationManager(plugin, clientManager, donationManager); // NotificationManager notificationManager = new NotificationManager(plugin, clientManager, donationManager);
// new MailManager(_plugin, notificationManager); // new MailManager(_plugin, notificationManager);
new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _gadgetManager, statsManager); new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _gadgetManager, statsManager);

View File

@ -95,8 +95,12 @@ public class SoloSuperSmash extends SuperSmash
//Wipe Last //Wipe Last
Scoreboard.reset(); Scoreboard.reset();
if (GetPlayers(true).size() > 14) boolean minimise = false;
if (GetPlayers(false).size() > 14)
{ {
minimise = true;
Scoreboard.writeNewLine(); Scoreboard.writeNewLine();
Scoreboard.write(C.cGreenB + "Players Alive"); Scoreboard.write(C.cGreenB + "Players Alive");
Scoreboard.write(GetPlayers(true).size() + " "); Scoreboard.write(GetPlayers(true).size() + " ");
@ -109,7 +113,7 @@ public class SoloSuperSmash extends SuperSmash
{ {
Scoreboard.writeNewLine(); Scoreboard.writeNewLine();
Scoreboard.writeGroup(GetPlayers(false), player -> Scoreboard.writeGroup(GetPlayers(minimise), player ->
{ {
int lives = getLives(player); int lives = getLives(player);

View File

@ -84,50 +84,33 @@ import nautilus.game.arcade.kit.Perk;
public abstract class SuperSmash extends Game public abstract class SuperSmash extends Game
{ {
private static final int MAX_LIVES = 4; private static final int MAX_LIVES = 4;
private static final int POWERUP_SPAWN_Y_INCREASE = 120; private static final int POWERUP_SPAWN_Y_INCREASE = 120;
private static final int HUNGER_DELAY = 250; private static final int HUNGER_DELAY = 250;
private static final String DATA_POINT_POWERUP = "RED"; private static final String DATA_POINT_POWERUP = "RED";
private Map<Player, Integer> _lives = new HashMap<>(); private Map<Player, Integer> _lives = new HashMap<>();
private Location _powerupCurrent = null; private Location _powerupCurrent = null;
private Location _powerupTarget = null; private Location _powerupTarget = null;
private EnderCrystal _powerup = null; private EnderCrystal _powerup = null;
private Hologram _powerupHologram = null; private Hologram _powerupHologram = null;
private boolean _powerupHologramColour; private boolean _powerupHologramColour;
private long _nextPowerup = 0; private long _nextPowerup = 0;
private static final Set<Material> REMOVE_ON_ITEM_SPAWN = Sets.newHashSet(Material.CACTUS, Material.BROWN_MUSHROOM, Material.RED_MUSHROOM, Material.YELLOW_FLOWER, Material.RED_ROSE); private static final Set<Material> REMOVE_ON_ITEM_SPAWN = Sets.newHashSet(Material.CACTUS, Material.BROWN_MUSHROOM, Material.RED_MUSHROOM, Material.YELLOW_FLOWER, Material.RED_ROSE);
public SuperSmash(ArcadeManager manager, GameType type, String[] description) public SuperSmash(ArcadeManager manager, GameType type, String[] description)
{ {
this(manager, this(manager,
new Kit[] { new Kit[] {
new KitSkeleton(manager), new KitSkeleton(manager), new KitGolem(manager), new KitSpider(manager), new KitSlime(manager), new KitCreeper(manager), new KitEnderman(manager), new KitSnowman(manager),
new KitGolem(manager), new KitWolf(manager), new KitBlaze(manager), new KitWitch(manager), new KitChicken(manager), new KitSkeletalHorse(manager), new KitPig(manager), new KitSkySquid(manager),
new KitSpider(manager), new KitWitherSkeleton(manager), new KitMagmaCube(manager), new KitZombie(manager), new KitCow(manager), new KitSheep(manager), new KitGuardian(manager)
new KitSlime(manager),
new KitCreeper(manager),
new KitEnderman(manager),
new KitSnowman(manager),
new KitWolf(manager),
new KitBlaze(manager),
new KitWitch(manager),
new KitChicken(manager),
new KitSkeletalHorse(manager),
new KitPig(manager),
new KitSkySquid(manager),
new KitWitherSkeleton(manager),
new KitMagmaCube(manager),
new KitZombie(manager),
new KitCow(manager),
new KitSheep(manager),
new KitGuardian(manager)
}, type, description); }, type, description);
} }
@ -136,12 +119,12 @@ public abstract class SuperSmash extends Game
{ {
super(manager, type, kits, description); super(manager, type, kits, description);
this.DeathOut = false; DeathOut = false;
this.CompassEnabled = true; CompassEnabled = true;
this.DeathSpectateSecs = 4; DeathSpectateSecs = 4;
this.WorldWaterDamage = 1000; WorldWaterDamage = 1000;
this.HideTeamSheep = true; HideTeamSheep = true;
this.ReplaceTeamsWithKits = true; ReplaceTeamsWithKits = true;
} }
@EventHandler(priority = EventPriority.HIGH) @EventHandler(priority = EventPriority.HIGH)
@ -168,18 +151,19 @@ public abstract class SuperSmash extends Game
SetPlayerState(event.getEntity(), PlayerState.OUT); SetPlayerState(event.getEntity(), PlayerState.OUT);
} }
//I think this causes players to sometimes be invisible // I think this causes players to sometimes be invisible
// DisguiseManager disguiseManager = Manager.GetDisguise(); // DisguiseManager disguiseManager = Manager.GetDisguise();
// DisguiseBase disguise = disguiseManager.getActiveDisguise(event.getEntity()); // DisguiseBase disguise =
// // disguiseManager.getActiveDisguise(event.getEntity());
// if (disguise == null) //
// { // if (disguise == null)
// return; // {
// } // return;
// // }
// disguiseManager.undisguise(disguise); //
// disguiseManager.undisguise(disguise);
} }
@EventHandler @EventHandler
public void playerQuit(PlayerQuitEvent event) public void playerQuit(PlayerQuitEvent event)
{ {
@ -208,7 +192,7 @@ public abstract class SuperSmash extends Game
if (lives > 0) if (lives > 0)
{ {
String livesString = (lives == 1 ? "life" : "lives"); String livesString = (lives == 1 ? "life" : "lives");
UtilPlayer.message(player, C.cRedB + "You have died!"); UtilPlayer.message(player, C.cRedB + "You have died!");
UtilPlayer.message(player, C.cRedB + "You have " + lives + " " + livesString + " left!"); UtilPlayer.message(player, C.cRedB + "You have " + lives + " " + livesString + " left!");
player.playSound(player.getLocation(), Sound.NOTE_BASS_GUITAR, 2f, 0.5f); player.playSound(player.getLocation(), Sound.NOTE_BASS_GUITAR, 2f, 0.5f);
@ -227,13 +211,13 @@ public abstract class SuperSmash extends Game
return true; return true;
} }
String gameOver = "You ran out of lives!"; String gameOver = "You ran out of lives!";
UtilTextMiddle.display(C.cRedB + "GAME OVER", gameOver, 10, 50, 10, player); UtilTextMiddle.display(C.cRedB + "GAME OVER", gameOver, 10, 50, 10, player);
UtilPlayer.message(player, C.cRedB + gameOver); UtilPlayer.message(player, C.cRedB + gameOver);
player.playSound(player.getLocation(), Sound.EXPLODE, 2f, 1f); player.playSound(player.getLocation(), Sound.EXPLODE, 2f, 1f);
return false; return false;
} }
@ -263,9 +247,9 @@ public abstract class SuperSmash extends Game
{ {
continue; continue;
} }
UtilInv.remove(player, Material.NETHER_STAR, (byte) 0, 1); UtilInv.remove(player, Material.NETHER_STAR, (byte) 0, 1);
player.setHealth(player.getMaxHealth()); player.setHealth(player.getMaxHealth());
player.playSound(player.getLocation(), ultimate.getSound(), 10, 1); player.playSound(player.getLocation(), ultimate.getSound(), 10, 1);
@ -285,39 +269,40 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
if (!IsLive()) if (!IsLive())
{ {
return; return;
} }
if (_powerupHologram != null) if (_powerupHologram != null)
{ {
_powerupHologram.setText((_powerupHologramColour ? C.cGreenB : C.cWhiteB) + "SMASH CRYSTAL"); _powerupHologram.setText((_powerupHologramColour ? C.cGreenB : C.cWhiteB) + "SMASH CRYSTAL");
_powerupHologramColour = !_powerupHologramColour; _powerupHologramColour = !_powerupHologramColour;
} }
if (_powerup == null) if (_powerup == null)
{ {
if (System.currentTimeMillis() < _nextPowerup) if (System.currentTimeMillis() < _nextPowerup)
{ {
return; return;
} }
if (WorldData.GetDataLocs(DATA_POINT_POWERUP).isEmpty()) if (WorldData.GetDataLocs(DATA_POINT_POWERUP).isEmpty())
{ {
return; return;
} }
if (_powerupTarget == null) if (_powerupTarget == null)
{ {
BlockRestore blockRestore = Manager.GetBlockRestore(); BlockRestore blockRestore = Manager.GetBlockRestore();
Location newTarget = UtilAlg.Random(WorldData.GetDataLocs(DATA_POINT_POWERUP)); Location newTarget = UtilAlg.Random(WorldData.GetDataLocs(DATA_POINT_POWERUP));
Block targetBlock = newTarget.getBlock(); Block targetBlock = newTarget.getBlock();
// This relies on this method being called 4 times a second (5 ticks, UpdateType.FASTER). // This relies on this method being called 4 times a second (5
// ticks, UpdateType.FASTER).
long restoreTime = (POWERUP_SPAWN_Y_INCREASE / 4 / 2) * 1000 + 500; long restoreTime = (POWERUP_SPAWN_Y_INCREASE / 4 / 2) * 1000 + 500;
_powerupTarget = newTarget.clone(); _powerupTarget = newTarget.clone();
_powerupCurrent = newTarget.clone().add(0, POWERUP_SPAWN_Y_INCREASE, 0); _powerupCurrent = newTarget.clone().add(0, POWERUP_SPAWN_Y_INCREASE, 0);
@ -327,20 +312,20 @@ public abstract class SuperSmash extends Game
for (int z = -1; z <= 1; z++) for (int z = -1; z <= 1; z++)
{ {
blockRestore.add(targetBlock.getRelative(x, -3, z), Material.IRON_BLOCK.getId(), (byte) 0, restoreTime); blockRestore.add(targetBlock.getRelative(x, -3, z), Material.IRON_BLOCK.getId(), (byte) 0, restoreTime);
if (x == 0 && z == 0) if (x == 0 && z == 0)
{ {
continue; continue;
} }
blockRestore.add(targetBlock.getRelative(x, -1, z), Material.QUARTZ_BLOCK.getId(), (byte) 0, restoreTime); blockRestore.add(targetBlock.getRelative(x, -1, z), Material.QUARTZ_BLOCK.getId(), (byte) 0, restoreTime);
} }
} }
blockRestore.add(targetBlock.getRelative(0, -2, 0), Material.BEACON.getId(), (byte) 0, restoreTime); blockRestore.add(targetBlock.getRelative(0, -2, 0), Material.BEACON.getId(), (byte) 0, restoreTime);
blockRestore.add(targetBlock.getRelative(0, -1, 0), Material.STAINED_GLASS.getId(), (byte) 5, restoreTime); blockRestore.add(targetBlock.getRelative(0, -1, 0), Material.STAINED_GLASS.getId(), (byte) 5, restoreTime);
} }
if (_powerupTarget.getY() < _powerupCurrent.getY()) if (_powerupTarget.getY() < _powerupCurrent.getY())
{ {
_powerupCurrent.subtract(0, 2, 0); _powerupCurrent.subtract(0, 2, 0);
@ -352,9 +337,9 @@ public abstract class SuperSmash extends Game
_powerup = _powerupTarget.getWorld().spawn(_powerupTarget, EnderCrystal.class); _powerup = _powerupTarget.getWorld().spawn(_powerupTarget, EnderCrystal.class);
_powerupHologram = new Hologram(Manager.getHologramManager(), _powerupTarget.add(0, 2, 0), true, "SMASH CRYSTAL").start(); _powerupHologram = new Hologram(Manager.getHologramManager(), _powerupTarget.add(0, 2, 0), true, "SMASH CRYSTAL").start();
CreatureAllowOverride = false; CreatureAllowOverride = false;
UtilFirework.playFirework(_powerupTarget, Type.BURST, Color.YELLOW, false, true); UtilFirework.playFirework(_powerupTarget, Type.BURST, Color.YELLOW, false, true);
_powerupTarget = null; _powerupTarget = null;
_powerupCurrent = null; _powerupCurrent = null;
} }
@ -368,17 +353,17 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
if (!IsLive()) if (!IsLive())
{ {
return; return;
} }
if (_powerup == null) if (_powerup == null)
{ {
return; return;
} }
Player best = null; Player best = null;
double bestDist = 0; double bestDist = 0;
@ -388,14 +373,14 @@ public abstract class SuperSmash extends Game
{ {
continue; continue;
} }
double dist = UtilMath.offset(player, _powerup); double dist = UtilMath.offset(player, _powerup);
if (dist > 2) if (dist > 2)
{ {
continue; continue;
} }
if (best == null || dist < bestDist) if (best == null || dist < bestDist)
{ {
best = player; best = player;
@ -407,15 +392,15 @@ public abstract class SuperSmash extends Game
{ {
_powerupHologram.stop(); _powerupHologram.stop();
_powerupHologram = null; _powerupHologram = null;
_powerup.remove(); _powerup.remove();
_powerup = null; _powerup = null;
giveSmashItem(best); giveSmashItem(best);
_nextPowerup = getNewSmashTime(); _nextPowerup = getNewSmashTime();
} }
} }
private void giveSmashItem(Player player) private void giveSmashItem(Player player)
{ {
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.NETHER_STAR, (byte) 0, 1, C.cYellowB + "Click" + C.cWhiteB + " - " + C.cGreenB + "Smash")); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.NETHER_STAR, (byte) 0, 1, C.cYellowB + "Click" + C.cWhiteB + " - " + C.cGreenB + "Smash"));
@ -438,7 +423,7 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
if (event.GetCause() == DamageCause.FALL) if (event.GetCause() == DamageCause.FALL)
{ {
event.SetCancelled("No Fall Damage"); event.SetCancelled("No Fall Damage");
@ -452,11 +437,11 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
if (event.GetDamageePlayer() != null) if (event.GetDamageePlayer() != null)
{ {
Player player = event.GetDamageePlayer(); Player player = event.GetDamageePlayer();
event.AddKnockback("Smash Knockback", 1 + 0.1 * (player.getMaxHealth() - player.getHealth())); event.AddKnockback("Smash Knockback", 1 + 0.1 * (player.getMaxHealth() - player.getHealth()));
} }
} }
@ -468,11 +453,11 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
if (event.GetCause() == DamageCause.VOID || event.GetCause() == DamageCause.LAVA) if (event.GetCause() == DamageCause.VOID || event.GetCause() == DamageCause.LAVA)
{ {
LivingEntity entity = event.GetDamageeEntity(); LivingEntity entity = event.GetDamageeEntity();
entity.eject(); entity.eject();
entity.leaveVehicle(); entity.leaveVehicle();
@ -480,7 +465,7 @@ public abstract class SuperSmash extends Game
{ {
entity.getWorld().strikeLightningEffect(entity.getLocation()); entity.getWorld().strikeLightningEffect(entity.getLocation());
} }
event.AddMod("Smash", "Super Smash Mobs", 5000, false); event.AddMod("Smash", "Super Smash Mobs", 5000, false);
} }
} }
@ -491,7 +476,7 @@ public abstract class SuperSmash extends Game
if (event.getRegainReason() == RegainReason.SATIATED) if (event.getRegainReason() == RegainReason.SATIATED)
{ {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@EventHandler(priority = EventPriority.MONITOR) @EventHandler(priority = EventPriority.MONITOR)
@ -533,42 +518,42 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
Player player = event.getPlayer(); Player player = event.getPlayer();
ItemStack itemStack = player.getItemInHand(); ItemStack itemStack = player.getItemInHand();
if (itemStack == null) if (itemStack == null)
{ {
return; return;
} }
if (itemStack.getItemMeta() == null) if (itemStack.getItemMeta() == null)
{ {
return; return;
} }
ItemMeta itemMeta = itemStack.getItemMeta(); ItemMeta itemMeta = itemStack.getItemMeta();
if (itemMeta.getDisplayName() == null) if (itemMeta.getDisplayName() == null)
{ {
return; return;
} }
if (itemMeta.getLore() == null) if (itemMeta.getLore() == null)
{ {
return; return;
} }
if (GetState() != GameState.Recruit) if (GetState() != GameState.Recruit)
{ {
return; return;
} }
for (int i = player.getItemInHand().getItemMeta().getLore().size(); i <= 7; i++) for (int i = player.getItemInHand().getItemMeta().getLore().size(); i <= 7; i++)
{ {
UtilPlayer.message(player, ""); UtilPlayer.message(player, "");
} }
UtilPlayer.message(player, ArcadeFormat.Line); UtilPlayer.message(player, ArcadeFormat.Line);
UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName()); UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName());
@ -607,12 +592,12 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
if (!IsLive()) if (!IsLive())
{ {
return; return;
} }
hungerTick = (hungerTick + 1) % 10; hungerTick = (hungerTick + 1) % 10;
for (Player player : GetPlayers(true)) for (Player player : GetPlayers(true))
@ -641,33 +626,33 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
Player damager = event.GetDamagerPlayer(true); Player damager = event.GetDamagerPlayer(true);
if (damager == null) if (damager == null)
{ {
return; return;
} }
if (damager.equals(event.GetDamageeEntity())) if (damager.equals(event.GetDamageeEntity()))
{ {
return; return;
} }
if (!(event.GetDamageeEntity() instanceof Player)) if (!(event.GetDamageeEntity() instanceof Player))
{ {
return; return;
} }
if (!Recharge.Instance.use(damager, "Hunger Restore", HUNGER_DELAY, false, false)) if (!Recharge.Instance.use(damager, "Hunger Restore", HUNGER_DELAY, false, false))
{ {
return; return;
} }
int amount = Math.max(1, (int) (event.GetDamage() / 2)); int amount = Math.max(1, (int) (event.GetDamage() / 2));
UtilPlayer.hunger(damager, amount); UtilPlayer.hunger(damager, amount);
} }
@EventHandler @EventHandler
public void itemSpawn(ItemSpawnEvent event) public void itemSpawn(ItemSpawnEvent event)
{ {
@ -676,7 +661,7 @@ public abstract class SuperSmash extends Game
event.setCancelled(true); event.setCancelled(true);
} }
} }
public long getNewSmashTime() public long getNewSmashTime()
{ {
return (long) (System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(3) + TimeUnit.MINUTES.toMillis(5) * Math.random()); return (long) (System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(3) + TimeUnit.MINUTES.toMillis(5) * Math.random());
@ -698,12 +683,12 @@ public abstract class SuperSmash extends Game
return C.cGreen; return C.cGreen;
} }
} }
public Map<Player, Integer> getLiveMap() public Map<Player, Integer> getLiveMap()
{ {
return _lives; return _lives;
} }
@EventHandler @EventHandler
public void debugCommands(PlayerCommandPreprocessEvent event) public void debugCommands(PlayerCommandPreprocessEvent event)
{ {
@ -711,62 +696,71 @@ public abstract class SuperSmash extends Game
{ {
return; return;
} }
String message = event.getMessage(); String message = event.getMessage();
Player player = event.getPlayer(); Player player = event.getPlayer();
if (message.startsWith("/cooldown")) if (message.startsWith("/cooldown"))
{ {
event.setCancelled(true); event.setCancelled(true);
for (Player other : UtilServer.getPlayers()) for (Player other : UtilServer.getPlayers())
{ {
Recharge.Instance.Reset(other); Recharge.Instance.Reset(other);
} }
Announce(C.cWhiteB + player.getName() + C.cAquaB + " reset cooldowns!"); Announce(C.cWhiteB + player.getName() + C.cAquaB + " reset cooldowns!");
} }
else if (message.startsWith("/nextsmash")) else if (message.startsWith("/nextsmash"))
{ {
event.setCancelled(true); event.setCancelled(true);
_nextPowerup = System.currentTimeMillis() + 1000; _nextPowerup = System.currentTimeMillis() + 1000;
Announce(C.cWhiteB + player.getName() + C.cAquaB + " spawned a smash crystal!"); Announce(C.cWhiteB + player.getName() + C.cAquaB + " spawned a smash crystal!");
} }
else if (message.startsWith("/smash")) else if (message.startsWith("/smash"))
{ {
event.setCancelled(true); event.setCancelled(true);
giveSmashItem(player); giveSmashItem(player);
} }
else if (message.startsWith("/kit")) else if (message.startsWith("/kit"))
{ {
event.setCancelled(true); event.setCancelled(true);
String[] args = message.split(" "); String[] args = message.split(" ");
String kit = ""; String kit = "";
for (int i = 1; i < args.length; i++) for (int i = 1; i < args.length; i++)
{ {
kit += args[i] + " "; kit += args[i] + " ";
} }
kit = kit.trim(); kit = kit.trim();
for (Kit kits : GetKits()) for (Kit kits : GetKits())
{ {
if (kit.equalsIgnoreCase(kits.GetName())) if (kit.equalsIgnoreCase(kits.GetName()))
{ {
SetKit(player, kits, true); SetKit(player, kits, true);
return;
} }
} }
player.sendMessage(F.main("Kit", "Sorry that is not a kit!"));
} }
else if (message.startsWith("/lives")) else if (message.startsWith("/lives"))
{ {
event.setCancelled(true); event.setCancelled(true);
_lives.put(player, MAX_LIVES);
Announce(C.cWhiteB + player.getName() + C.cAquaB + " reset their lives!"); Announce(C.cWhiteB + player.getName() + C.cAquaB + " reset their lives!");
if (!IsAlive(player))
SetPlayerState(player, PlayerState.IN);
RespawnPlayer(player);
player.sendMessage(F.main("Revive", "You are back in the game!"));
} }
_lives.put(player, MAX_LIVES);
} }
} }

View File

@ -10,12 +10,11 @@ import org.bukkit.scheduler.BukkitRunnable;
import mineplex.core.common.Pair; import mineplex.core.common.Pair;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTextMiddle;
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.events.GameStateChangeEvent; import nautilus.game.arcade.events.GameStateChangeEvent;
@ -89,11 +88,11 @@ public class TeamSuperSmash extends SuperSmash
for (GameTeam team : GetTeamList()) for (GameTeam team : GetTeamList())
{ {
Scoreboard.writeGroup(team.GetPlayers(true), player -> Scoreboard.writeGroup(team.GetPlayers(false), player ->
{ {
int lives = getLives(player); int lives = getLives(player);
return Pair.create(team.GetColor() + player.getName(), lives); return Pair.create(team.GetColor() + (IsAlive(player) ? "" : C.Strike) + player.getName(), lives);
}, true); }, true);
} }
} }
@ -101,6 +100,7 @@ public class TeamSuperSmash extends SuperSmash
Scoreboard.draw(); Scoreboard.draw();
} }
@Override
@EventHandler @EventHandler
public void gameStart(GameStateChangeEvent event) public void gameStart(GameStateChangeEvent event)
{ {
@ -109,6 +109,8 @@ public class TeamSuperSmash extends SuperSmash
return; return;
} }
super.gameStart(event);
new BukkitRunnable() new BukkitRunnable()
{ {
@ -116,12 +118,7 @@ public class TeamSuperSmash extends SuperSmash
public void run() public void run()
{ {
for (Player player : GetPlayers(true)) for (Player player : GetPlayers(true))
{ {
if (UtilPlayer.isSpectator(player))
{
continue;
}
GameTeam team = GetTeam(player); GameTeam team = GetTeam(player);
Player bestTeamMember = null; Player bestTeamMember = null;
@ -142,11 +139,11 @@ public class TeamSuperSmash extends SuperSmash
if (bestTeamMember == null) if (bestTeamMember == null)
{ {
UtilTextMiddle.display(C.cRedB + "No one", "You don\'t have a teamamte :(", 10, 50, 10); UtilTextMiddle.display(C.cRedB + "No one", "You don\'t have a teammate :(", 10, 50, 10, player);
return; return;
} }
UtilTextMiddle.display(team.GetColor() + bestTeamMember.getName(), "Is your teammate", 10, 50, 10); UtilTextMiddle.display(team.GetColor() + bestTeamMember.getName(), "Is your teammate", 10, 50, 10, player);
} }
} }
}.runTaskLater(Manager.getPlugin(), 40); }.runTaskLater(Manager.getPlugin(), 40);
@ -163,6 +160,11 @@ public class TeamSuperSmash extends SuperSmash
Player damager = event.GetDamagerPlayer(true); Player damager = event.GetDamagerPlayer(true);
Player damagee = event.GetDamageePlayer(); Player damagee = event.GetDamageePlayer();
if (GetTeam(damager) == null || GetTeam(damagee) == null)
{
return;
}
if (GetTeam(damager).equals(GetTeam(damagee))) if (GetTeam(damager).equals(GetTeam(damagee)))
{ {
if (event.GetCause() == DamageCause.FIRE) if (event.GetCause() == DamageCause.FIRE)

View File

@ -105,7 +105,7 @@ public class KitMagmaCube extends SmashKit
} }
@EventHandler @EventHandler
public void FireItemResist(UpdateEvent event) public void fireResistance(UpdateEvent event)
{ {
if (event.getType() != UpdateType.FAST) if (event.getType() != UpdateType.FAST)
{ {
@ -124,8 +124,7 @@ public class KitMagmaCube extends SmashKit
continue; continue;
} }
Manager.GetCondition().Factory().FireItemImmunity(GetName(), player, player, 1.9, false); player.setFireTicks(0);
} }
} }
} }

View File

@ -128,6 +128,6 @@ public class KitSkeleton extends SmashKit
return; return;
} }
event.AddMod("Arrow Nerf", -2); event.AddMod("Arrow Nerf", -1.5);
} }
} }

View File

@ -135,6 +135,12 @@ public class PerkFirefly extends SmashPerk
boolean superActive = isSuperActive(data.Player); boolean superActive = isSuperActive(data.Player);
String skillName = superActive ? "Phoenix" : GetName(); String skillName = superActive ? "Phoenix" : GetName();
if (UtilPlayer.isSpectator(player))
{
dataIterator.remove();
continue;
}
// Warmup // Warmup
if (!UtilTime.elapsed(data.Time, WARMUP_TIME) && !superActive) if (!UtilTime.elapsed(data.Time, WARMUP_TIME) && !superActive)
{ {

View File

@ -44,7 +44,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown
private static final int COOLDOWN = 2000; private static final int COOLDOWN = 2000;
private static final int CHARGE_TIME = 1200; private static final int CHARGE_TIME = 1200;
private static final int DAMAGE = 11; private static final int DAMAGE = 9;
private static final float KNOCKBACK_MAGNITUDE = 2.5F; private static final float KNOCKBACK_MAGNITUDE = 2.5F;
private Map<UUID, BlockTossData> _hold = new HashMap<>(); private Map<UUID, BlockTossData> _hold = new HashMap<>();
@ -133,7 +133,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown
{ {
return; return;
} }
Set<Player> throwSet = new HashSet<>(); Set<Player> throwSet = new HashSet<>();
for (UUID key : _hold.keySet()) for (UUID key : _hold.keySet())
@ -165,7 +165,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown
for (Player cur : throwSet) for (Player cur : throwSet)
{ {
UUID key = cur.getUniqueId(); UUID key = cur.getUniqueId();
Recharge.Instance.recharge(cur, GetName()); Recharge.Instance.recharge(cur, GetName());
Recharge.Instance.use(cur, GetName(), COOLDOWN, false, true); Recharge.Instance.use(cur, GetName(), COOLDOWN, false, true);
@ -181,7 +181,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown
// Throw // Throw
double mult = Math.min(1.4, 1.4 * ((double) charge / CHARGE_TIME)); double mult = Math.min(1.4, 1.4 * ((double) charge / CHARGE_TIME));
// Action // Action
UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0.2, 0, 1, true); UtilAction.velocity(block, cur.getLocation().getDirection(), mult, false, 0.2, 0, 1, true);
Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true, true, null, 0, 0, null, 0, UpdateType.FASTEST, 1f); Manager.GetProjectile().AddThrow(block, cur, this, -1, true, true, true, true, null, 0, 0, null, 0, UpdateType.FASTEST, 1f);
@ -241,7 +241,7 @@ public class PerkBlockToss extends SmashPerk implements IThrown
{ {
return; return;
} }
FallingBlock falling = (FallingBlock) event.getEntity(); FallingBlock falling = (FallingBlock) event.getEntity();
falling.getWorld().playEffect(event.getBlock().getLocation(), Effect.STEP_SOUND, falling.getBlockId()); falling.getWorld().playEffect(event.getBlock().getLocation(), Effect.STEP_SOUND, falling.getBlockId());

View File

@ -1,7 +1,6 @@
package nautilus.game.arcade.game.games.smash.perks.golem; package nautilus.game.arcade.game.games.smash.perks.golem;
import java.util.List; import java.util.List;
import java.util.Map;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.Material; import org.bukkit.Material;
@ -60,7 +59,7 @@ public class SmashGolem extends SmashUltimate
for (Player other : alivePlayers) for (Player other : alivePlayers)
{ {
if (player.equals(other) || UtilPlayer.isSpectator(player)) if (player.equals(other) || UtilPlayer.isSpectator(other))
{ {
continue; continue;
} }

View File

@ -3,6 +3,8 @@ package nautilus.game.arcade.game.games.smash.perks.guardian;
import org.bukkit.entity.ArmorStand; import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import mineplex.core.common.util.UtilEnt;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
public class TargetLazerData public class TargetLazerData
@ -35,6 +37,9 @@ public class TargetLazerData
_targetPlaceholder.setBasePlate(false); _targetPlaceholder.setBasePlate(false);
_targetPlaceholder.setGravity(false); _targetPlaceholder.setGravity(false);
_targetPlaceholder.setVisible(false); _targetPlaceholder.setVisible(false);
UtilEnt.ghost(_targetPlaceholder, true, false);
manager.GetGame().CreatureAllowOverride = false; manager.GetGame().CreatureAllowOverride = false;
} }

View File

@ -102,7 +102,8 @@ public class PerkFlameDash extends Perk
return; return;
} }
Recharge.Instance.useForce(player, GetName(), COOLDOWN); Recharge.Instance.recharge(player, GetName());
Recharge.Instance.use(player, GetName(), COOLDOWN, true, true);
_data.add(new FireflyData(player)); _data.add(new FireflyData(player));

View File

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.bukkit.Bukkit;
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;
@ -39,7 +40,7 @@ public class PerkMagmaBoost extends Perk
{ {
Player killed = (Player) event.GetEvent().getEntity(); Player killed = (Player) event.GetEvent().getEntity();
_kills.remove(killed); _kills.remove(killed.getUniqueId());
if (event.GetLog().GetKiller() == null) if (event.GetLog().GetKiller() == null)
{ {
@ -74,7 +75,9 @@ public class PerkMagmaBoost extends Perk
slime.SetSize(size + 1); slime.SetSize(size + 1);
Manager.GetDisguise().updateDisguise(slime); Manager.GetDisguise().updateDisguise(slime);
Bukkit.broadcastMessage("Exp: " + 0.99f * (size / MAX_STACKS));
killer.setExp(0.99f * (size / MAX_STACKS)); killer.setExp(0.99f * (size / MAX_STACKS));
} }

View File

@ -131,7 +131,7 @@ public class PerkWoolCloud extends Perk
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation(), 0.2f, 0.2f, 0.2f, 0, 4, ViewDist.LONGER, UtilServer.getPlayers()); UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation(), 0.2f, 0.2f, 0.2f, 0, 4, ViewDist.LONGER, UtilServer.getPlayers());
if (!UtilTime.elapsed(_active.get(player), MIN_VELOCITY_TIME)) if (!UtilTime.elapsed(_active.get(key), MIN_VELOCITY_TIME))
{ {
continue; continue;
} }
@ -153,7 +153,7 @@ public class PerkWoolCloud extends Perk
} }
} }
if (UtilEnt.isGrounded(player) || UtilTime.elapsed(_active.get(player), MAX_VELOCITY_TIME)) if (UtilEnt.isGrounded(player) || UtilTime.elapsed(_active.get(key), MAX_VELOCITY_TIME))
{ {
playerIterator.remove(); playerIterator.remove();
setWoolColor(player, DyeColor.WHITE); setWoolColor(player, DyeColor.WHITE);

View File

@ -37,15 +37,18 @@ import mineplex.core.recharge.Recharge;
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.game.games.smash.perks.SmashPerk; import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
public class PerkSlimeRocket extends SmashPerk implements IThrown public class PerkSlimeRocket extends SmashPerk implements IThrown
{ {
private static final int COOLDOWN = 6000; private static final int COOLDOWN = 6000;
private static final float ENERGY_PER_TICK = 0.004F; private static final float ENERGY_PER_TICK = 0.004F;
private static final int KNOCKBACK_MAGNITUDE = 3; private static final int KNOCKBACK_MAGNITUDE = 3;
private static final int MAX_ENERGY_TIME = 3000;
private static final int MAX_HOLD_TIME = 5000;
private Map<UUID, Long> _charge = new HashMap<>(); private Map<UUID, Long> _charge = new HashMap<>();
private Map<Slime, UUID> _owner = new HashMap<>(); private Map<Slime, UUID> _owner = new HashMap<>();
private Map<Slime, Long> _lastAttack = new HashMap<>(); private Map<Slime, Long> _lastAttack = new HashMap<>();
@ -69,12 +72,12 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
{ {
continue; continue;
} }
if (isSuperActive(player)) if (isSuperActive(player))
{ {
continue; continue;
} }
int size = 1; int size = 1;
if (player.getExp() > 0.8) if (player.getExp() > 0.8)
{ {
@ -93,7 +96,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
Manager.GetDisguise().updateDisguise(slime); Manager.GetDisguise().updateDisguise(slime);
} }
if (player.isBlocking()) if (player.isBlocking() && !Recharge.Instance.usable(player, GetName()))
{ {
continue; continue;
} }
@ -141,7 +144,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
{ {
return; return;
} }
UtilPlayer.message(player, F.main("Skill", "You are charging " + F.skill(GetName()) + ".")); UtilPlayer.message(player, F.main("Skill", "You are charging " + F.skill(GetName()) + "."));
_charge.put(player.getUniqueId(), System.currentTimeMillis()); _charge.put(player.getUniqueId(), System.currentTimeMillis());
@ -154,7 +157,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
{ {
return; return;
} }
Iterator<UUID> chargeIterator = _charge.keySet().iterator(); Iterator<UUID> chargeIterator = _charge.keySet().iterator();
while (chargeIterator.hasNext()) while (chargeIterator.hasNext())
@ -173,7 +176,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
// Charge // Charge
if (player.isBlocking()) if (player.isBlocking())
{ {
// Energy Depleted // Energy Depleted
if (player.getExp() < 0.1) if (player.getExp() < 0.1)
{ {
FireRocket(player); FireRocket(player);
@ -184,22 +187,23 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
double elapsed = Math.min(3, (double) (System.currentTimeMillis() - time) / 1000d); double elapsed = Math.min(3, (double) (System.currentTimeMillis() - time) / 1000d);
// Use Energy // Use Energy
if (!UtilTime.elapsed(time, 3000)) if (!UtilTime.elapsed(time, MAX_ENERGY_TIME))
{ {
player.setExp((float) Math.max(0, player.getExp() - 0.01f)); player.setExp((float) Math.max(0, player.getExp() - 0.01f));
} }
// AutoFire // AutoFire
if (UtilTime.elapsed(time, 5000)) if (UtilTime.elapsed(time, MAX_HOLD_TIME))
{ {
FireRocket(player); FireRocket(player);
chargeIterator.remove(); chargeIterator.remove();
} }
float offset = (float) (elapsed / 6d);
// Effect // Effect
player.getWorld().playSound(player.getLocation(), Sound.SLIME_WALK, 0.5f, (float) (0.5 + 1.5 * (elapsed / 3d))); player.getWorld().playSound(player.getLocation(), Sound.SLIME_WALK, 0.5f, (float) (0.5 + 1.5 * (elapsed / 3d)));
UtilParticle.PlayParticle(ParticleType.SLIME, player.getLocation().add(0, 1, 0), (float) (elapsed / 6d), (float) (elapsed / 6d), (float) (elapsed / 6d), 0, (int) (elapsed * 5), UtilParticle.PlayParticle(ParticleType.SLIME, player.getLocation().add(0, 1, 0), offset, offset, offset, 0, (int) (elapsed * 5), ViewDist.LONGER, UtilServer.getPlayers());
ViewDist.LONGER, UtilServer.getPlayers());
} }
} }
// Release // Release
@ -247,15 +251,15 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
{ {
return; return;
} }
if (!_owner.containsKey(event.getEntity())) if (!_owner.containsKey(event.getEntity()))
{ {
return; return;
} }
if (event.getTarget() instanceof Player) if (event.getTarget() instanceof Player)
{ {
if (isTeamDamage((Player) event.getTarget(), UtilPlayer.searchExact(_owner.get(event.getEntity().getUniqueId())))) if (isTeamDamage((Player) event.getTarget(), UtilPlayer.searchExact(_owner.get(event.getEntity()))))
{ {
event.setCancelled(true); event.setCancelled(true);
return; return;
@ -328,7 +332,7 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
{ {
return; return;
} }
Slime slime = (Slime) event.GetDamagerEntity(false); Slime slime = (Slime) event.GetDamagerEntity(false);
// Attack Rate // Attack Rate

View File

@ -75,11 +75,6 @@ public class PerkSlimeSlam extends SmashPerk
return; return;
} }
if (isSuperActive(player))
{
return;
}
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, true, true)) if (!Recharge.Instance.use(player, GetName(), COOLDOWN, true, true))
{ {
return; return;
@ -114,12 +109,7 @@ public class PerkSlimeSlam extends SmashPerk
for (Player other : alivePlayers) for (Player other : alivePlayers)
{ {
if (UtilPlayer.isSpectator(other)) if (player.equals(other) || UtilPlayer.isSpectator(other) || isTeamDamage(player, other))
{
continue;
}
if (other.equals(player))
{ {
continue; continue;
} }
@ -171,10 +161,10 @@ public class PerkSlimeSlam extends SmashPerk
if (!isSuperActive(damager)) if (!isSuperActive(damager))
{ {
Manager.GetDamage().NewDamageEvent(damager, damagee, null, DamageCause.CUSTOM, DAMAGE / 4, true, true, false, damager.getName(), GetName() + " Recoil"); Manager.GetDamage().NewDamageEvent(damager, damagee, null, DamageCause.CUSTOM, DAMAGE / 4, true, true, false, damager.getName(), GetName() + " Recoil");
}
// Damage Event // Damage Event
Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.CUSTOM, DAMAGE, true, true, false, damager.getName(), GetName()); Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.CUSTOM, DAMAGE, true, true, false, damager.getName(), GetName());
}
// Inform // Inform
UtilPlayer.message(damager, F.main("Game", "You hit " + F.name(UtilEnt.getName(damagee)) + " with " + F.skill(GetName()) + ".")); UtilPlayer.message(damager, F.main("Game", "You hit " + F.name(UtilEnt.getName(damagee)) + " with " + F.skill(GetName()) + "."));

View File

@ -41,7 +41,6 @@ public class SmashSlime extends SmashUltimate
super.activate(player); super.activate(player);
player.getInventory().remove(Material.IRON_SWORD); player.getInventory().remove(Material.IRON_SWORD);
player.getInventory().remove(Material.IRON_AXE);
DisguiseBase disguise = Manager.GetDisguise().getActiveDisguise(player); DisguiseBase disguise = Manager.GetDisguise().getActiveDisguise(player);
if (disguise != null && disguise instanceof DisguiseSlime) if (disguise != null && disguise instanceof DisguiseSlime)

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -42,8 +43,7 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
private static final int COOLDOWN = 2000; private static final int COOLDOWN = 2000;
private static final int RANGE_NOMRAL = 3; private static final int RANGE_NOMRAL = 3;
private static final int RANGE_SMASH = 4; private static final int DAMAGE_NORMAL = 7;
private static final int DAMAGE_NORMAL = 6;
private static final int KNOCKBACK_MAGNITUDE = 2; private static final int KNOCKBACK_MAGNITUDE = 2;
private List<Projectile> _proj = new ArrayList<>(); private List<Projectile> _proj = new ArrayList<>();
@ -99,7 +99,7 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
_proj.add(potion); _proj.add(potion);
Manager.GetProjectile().AddThrow(potion, player, this, 10000, true, true, true, false, false, 0.5F); Manager.GetProjectile().AddThrow(potion, player, this, 10000, true, true, true, false, false, 0);
// Inform // Inform
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + ".")); UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));
@ -143,39 +143,12 @@ public class PerkWitchPotion extends SmashPerk implements IThrown
@Override @Override
public void Collide(LivingEntity target, Block block, ProjectileUser data) public void Collide(LivingEntity target, Block block, ProjectileUser data)
{ {
Set<LivingEntity> players = new HashSet<>(); Map<Player, Double> nearby = UtilPlayer.getInRadius(data.getThrown().getLocation(), RANGE_NOMRAL);
Player thrower = (Player) data.getThrower(); LivingEntity entity = data.getThrower();
if (target != null) for (Player player : nearby.keySet())
{ {
players.add(target); Manager.GetDamage().NewDamageEvent(player, entity, null, DamageCause.CUSTOM, DAMAGE_NORMAL * nearby.get(player), true, true, false, entity.getName(), GetName());
}
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (player.equals(data.getThrower()))
{
continue;
}
double d = UtilMath.offset(player.getLocation().add(0, 1, 0), data.getThrown().getLocation());
if (d > (isSuperActive(thrower) ? RANGE_SMASH : RANGE_NOMRAL))
{
continue;
}
players.add(player);
}
int i = 0;
for (LivingEntity entity : players)
{
// Damage Event
Manager.GetDamage().NewDamageEvent(entity, thrower, null, DamageCause.CUSTOM, (i++ == 0 ? DAMAGE_NORMAL + 1 : DAMAGE_NORMAL), true, true, false, thrower.getName(), GetName());
Manager.GetCondition().Factory().Slow(GetName(), entity, null, 3, 1, true, false, false, false);
} }
} }

View File

@ -357,12 +357,7 @@ public class PerkWolf extends SmashPerk
for (Player other : Manager.GetGame().GetPlayers(true)) for (Player other : Manager.GetGame().GetPlayers(true))
{ {
if (player.equals(other)) if (player.equals(other) || UtilPlayer.isSpectator(other) || isTeamDamage(player, other))
{
continue;
}
if (Manager.isSpectator(other))
{ {
continue; continue;
} }
@ -490,7 +485,7 @@ public class PerkWolf extends SmashPerk
_repeat.get(damager.getUniqueId()).add(System.currentTimeMillis()); _repeat.get(damager.getUniqueId()).add(System.currentTimeMillis());
// Exp // Exp
damager.setExp(Math.min(0.9999f, _repeat.get(damager.getUniqueId()).size() / 9f)); damager.setExp(Math.min(0.999f, _repeat.get(damager.getUniqueId()).size() / 9f));
} }
@EventHandler @EventHandler
@ -521,7 +516,7 @@ public class PerkWolf extends SmashPerk
} }
// Exp // Exp
player.setExp(Math.min(0.9999f, _repeat.get(player).size() / 9f)); player.setExp(Math.min(0.999f, _repeat.get(uuid).size() / 9f));
} }
} }
} }

View File

@ -271,7 +271,7 @@ public class LegacyGameLobbyManager extends LobbyManager
double space = 4; double space = 4;
double offset = (divide - 1) * space / 2d; double offset = (divide - 1) * space / 2d;
for (int i = 0; i < kits.size() - divide; i++) for (int i = 1; i < kits.size() - divide; i++)
{ {
Kit kit = kits.get(i + divide); Kit kit = kits.get(i + divide);