Remove Spammy "Loaded default kit message".
Fixed SSM kits not closing the GUI when the central item is clicked. Fixed Smash Crystals being carried over into the next game.
This commit is contained in:
parent
95649a5f14
commit
5316dfe0c6
@ -880,10 +880,6 @@ public abstract class Game implements Listener
|
||||
if (announce)
|
||||
{
|
||||
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 2f, 1f);
|
||||
if (kit instanceof ProgressingKit && ((ProgressingKit) kit).isDefault(player.getUniqueId()))
|
||||
{
|
||||
player.sendMessage(F.main("Kit", "Loaded default kit " + F.elem(kit.GetFormattedName())));
|
||||
}
|
||||
UtilPlayer.message(player, F.main("Kit", "You equipped " + F.elem(kit.GetFormattedName() + " Kit") + "."));
|
||||
}
|
||||
|
||||
@ -891,6 +887,10 @@ public abstract class Game implements Listener
|
||||
{
|
||||
kit.ApplyKit(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.closeInventory();
|
||||
}
|
||||
}
|
||||
|
||||
public Kit GetKit(Player player)
|
||||
|
@ -1,17 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.smash;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
import mineplex.core.common.block.BlockData;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -24,40 +14,11 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSheep;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.game.games.smash.kits.*;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.SmashKit;
|
||||
import nautilus.game.arcade.stats.FreeKitWinStatTracker;
|
||||
import nautilus.game.arcade.stats.KillFastStatTracker;
|
||||
import nautilus.game.arcade.stats.OneVThreeStatTracker;
|
||||
import nautilus.game.arcade.stats.RecoveryMasterStatTracker;
|
||||
import nautilus.game.arcade.stats.WinWithoutDyingStatTracker;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.EnderCrystal;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -72,6 +33,9 @@ import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
public abstract class SuperSmash extends Game
|
||||
{
|
||||
private HashMap<Player, Integer> _lives = new HashMap<Player, Integer>();
|
||||
@ -375,6 +339,7 @@ public abstract class SuperSmash extends Game
|
||||
|
||||
if (announce)
|
||||
{
|
||||
player.closeInventory();
|
||||
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 2f, 1f);
|
||||
UtilPlayer.message(player, F.main("Kit", "You equipped " + F.elem(kit.GetFormattedName() + " Kit") + "."));
|
||||
kit.ApplyKit(player);
|
||||
|
@ -5,6 +5,7 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.ArcadeFormat;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -117,6 +118,19 @@ public abstract class SmashKit extends ProgressingKit
|
||||
UtilTextMiddle.display("Smash Crystal", event.getPlayer().getName() + " used " + C.cGreen + _superName, 5, 50, 5, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEnd(GameStateChangeEvent event)
|
||||
{
|
||||
Iterator<Player> superIter = _superActive.keySet().iterator();
|
||||
|
||||
while (superIter.hasNext())
|
||||
{
|
||||
Player player = superIter.next();
|
||||
superIter.remove();
|
||||
deactivateSuper(player);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void expireSuper(UpdateEvent event)
|
||||
|
Loading…
Reference in New Issue
Block a user