Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-09-13 20:52:13 -10:00
commit c7e0ebefd1
11 changed files with 152 additions and 51 deletions

View File

@ -13,13 +13,44 @@ import org.spigotmc.ProtocolInjector.PacketTitle.Action;
*/ */
public class UtilTitle public class UtilTitle
{ {
public static void display(String text, String subtitle, Player... players)
{
setSubtitle(subtitle, players);
showTitle(text, players);
}
public static void display(String text, String subtitle)
{
setSubtitle(subtitle, UtilServer.getPlayers());
showTitle(text, UtilServer.getPlayers());
}
public static void display(String text, String subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks, Player... players)
{
setTimings(fadeInTicks, stayTicks, fadeOutTicks, players);
display(text, subtitle, players);
}
public static void display(String text, String subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks)
{
setTimings(fadeInTicks, stayTicks, fadeOutTicks, UtilServer.getPlayers());
display(text, subtitle, UtilServer.getPlayers());
}
/** /**
* Show Title text for a player with their current set timings. * Show Title text for a player with their current set timings.
* *
* Default timings are 20, 60, 20 (in ticks) * Default timings are 20, 60, 20 (in ticks)
*/ */
public static void showTitle(String text, Player... players) private static void showTitle(String text, Player... players)
{ {
if (text == null)
text = "";
ChatMessage message = new ChatMessage(text); ChatMessage message = new ChatMessage(text);
PacketTitle packet = new PacketTitle(Action.TITLE, message); PacketTitle packet = new PacketTitle(Action.TITLE, message);
sendPacket(packet, players); sendPacket(packet, players);
@ -30,8 +61,11 @@ public class UtilTitle
* *
* This stays unless reset or cleared, and doesn't appear unless a title is showing * This stays unless reset or cleared, and doesn't appear unless a title is showing
*/ */
public static void setSubtitle(String text, Player... players) private static void setSubtitle(String text, Player... players)
{ {
if (text == null)
text = "";
ChatMessage message = new ChatMessage(text); ChatMessage message = new ChatMessage(text);
PacketTitle packet = new PacketTitle(Action.SUBTITLE, message); PacketTitle packet = new PacketTitle(Action.SUBTITLE, message);
sendPacket(packet, players); sendPacket(packet, players);
@ -42,7 +76,7 @@ public class UtilTitle
* *
* Remember these are in ticks * Remember these are in ticks
*/ */
public static void setTimings(int fadeInTicks, int stayTicks, int fadeOutTicks, Player... players) private static void setTimings(int fadeInTicks, int stayTicks, int fadeOutTicks, Player... players)
{ {
PacketTitle packet = new PacketTitle(Action.TIMES, fadeInTicks, stayTicks, fadeOutTicks); PacketTitle packet = new PacketTitle(Action.TIMES, fadeInTicks, stayTicks, fadeOutTicks);
sendPacket(packet, players); sendPacket(packet, players);

View File

@ -22,7 +22,6 @@ import mineplex.core.treasure.animation.ChestOpenAnimation;
import mineplex.core.treasure.animation.ChestSpawnAnimation; import mineplex.core.treasure.animation.ChestSpawnAnimation;
import mineplex.core.treasure.animation.CircleAnimation; import mineplex.core.treasure.animation.CircleAnimation;
import mineplex.core.treasure.animation.FireworksAnimation; import mineplex.core.treasure.animation.FireworksAnimation;
import mineplex.core.treasure.event.TreasureFinishEvent;
import mineplex.core.treasure.reward.ITreasureReward; import mineplex.core.treasure.reward.ITreasureReward;
import mineplex.core.treasure.reward.RewardRarity; import mineplex.core.treasure.reward.RewardRarity;
@ -67,8 +66,6 @@ public class Treasure
_chestData[1] = new ChestData(_centerBlock.getRelative(-2, 1, 0), rewards[1]); _chestData[1] = new ChestData(_centerBlock.getRelative(-2, 1, 0), rewards[1]);
_chestData[2] = new ChestData(_centerBlock.getRelative(0, 1, 2), rewards[2]); _chestData[2] = new ChestData(_centerBlock.getRelative(0, 1, 2), rewards[2]);
_chestData[3] = new ChestData(_centerBlock.getRelative(0, 1, -2), rewards[3]); _chestData[3] = new ChestData(_centerBlock.getRelative(0, 1, -2), rewards[3]);
Bukkit.broadcastMessage(F.main("Treasure", F.name(_player.getName()) + " is opening a " + C.cGreen + "Treasure Chest"));
} }
private void createCenterClay() private void createCenterClay()
@ -250,11 +247,12 @@ public class Treasure
else if (data.getReward().getRarity() == RewardRarity.RARE) else if (data.getReward().getRarity() == RewardRarity.RARE)
{ {
_animations.add(new CircleAnimation(this, data.getBlock().getLocation().add(0.5, 1.5, 0.5))); _animations.add(new CircleAnimation(this, data.getBlock().getLocation().add(0.5, 1.5, 0.5)));
Bukkit.broadcastMessage(F.main("Treasure", F.name(_player.getName()) + " opened a Rare treasure!"));
} }
else if (data.getReward().getRarity() == RewardRarity.VERY_RARE) else if (data.getReward().getRarity() == RewardRarity.VERY_RARE)
{ {
_animations.add(new ChestExplodeAnimation(this, data.getBlock())); _animations.add(new ChestExplodeAnimation(this, data.getBlock()));
Bukkit.broadcastMessage(F.main("Treasure", F.name(_player.getName()) + " opened an extremely rare treasure!")); Bukkit.broadcastMessage(F.main("Treasure", F.name(_player.getName()) + " opened a Legendary treasure!"));
} }
if (isFinished()) if (isFinished())

View File

@ -6,6 +6,8 @@ import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
@ -18,6 +20,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.MiniPlugin; import mineplex.core.MiniPlugin;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
import mineplex.core.common.util.NautHashMap; import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAction;
@ -26,6 +29,7 @@ import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.inventory.InventoryManager; import mineplex.core.inventory.InventoryManager;
import mineplex.core.treasure.event.TreasureFinishEvent; import mineplex.core.treasure.event.TreasureFinishEvent;
@ -99,22 +103,22 @@ public class TreasureManager extends MiniPlugin
} }
// Gadgets // Gadgets
{ {
_rewardManager.addReward(new InventoryReward(inventoryManager, "Paintball Gun Ammo", "Paintball Gun", 200, 400, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Paintball Gun Ammo", "Paintball Gun", 200, 400,
new ItemStack(Material.GOLD_BARDING), RewardRarity.RARE, 100)); // new ItemStack(Material.GOLD_BARDING), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "Fireworks", "Fireworks",100, 200, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Fireworks", "Fireworks",100, 200,
new ItemStack(Material.FIREWORK), RewardRarity.RARE, 100)); // new ItemStack(Material.FIREWORK), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "Melon Launcher Ammo", "Melon Launcher", 100, 200, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Melon Launcher Ammo", "Melon Launcher", 100, 200,
new ItemStack(Material.MELON_BLOCK), RewardRarity.RARE, 100)); // new ItemStack(Material.MELON_BLOCK), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "Flesh Hook Ammo", "Flesh Hook", 80, 160, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Flesh Hook Ammo", "Flesh Hook", 80, 160,
new ItemStack(Material.getMaterial(131)), RewardRarity.RARE, 100)); // new ItemStack(Material.getMaterial(131)), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "Ethereal Pearls", "Ethereal Pearl", 60, 120, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Ethereal Pearls", "Ethereal Pearl", 60, 120,
new ItemStack(Material.ENDER_PEARL), RewardRarity.RARE, 100)); // new ItemStack(Material.ENDER_PEARL), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "Bat Blaster Ammo", "Bat Blaster", 40, 80, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Bat Blaster Ammo", "Bat Blaster", 40, 80,
new ItemStack(Material.IRON_BARDING), RewardRarity.RARE, 100)); // new ItemStack(Material.IRON_BARDING), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "TNT", "TNT", 40, 80, // _rewardManager.addReward(new InventoryReward(inventoryManager, "TNT", "TNT", 40, 80,
new ItemStack(Material.TNT), RewardRarity.RARE, 100)); // new ItemStack(Material.TNT), RewardRarity.RARE, 100));
_rewardManager.addReward(new InventoryReward(inventoryManager, "Coin Party Bomb", "Coin Party Bomb", 1, 1, // _rewardManager.addReward(new InventoryReward(inventoryManager, "Coin Party Bomb", "Coin Party Bomb", 1, 1,
new ItemStack(Material.getMaterial(175)), RewardRarity.RARE, 100)); // new ItemStack(Material.getMaterial(175)), RewardRarity.RARE, 100));
} }
// Pets // Pets
{ {
@ -224,7 +228,7 @@ public class TreasureManager extends MiniPlugin
public void attemptOpenTreasure(Player player) public void attemptOpenTreasure(Player player)
{ {
if (!checkNearbyBlocks(player) || checkNearSpawn(player) || checkInAir(player)) if (checkNearbyBlocks(player) || checkNearSpawn(player) || checkInAir(player) || checkNearbyTreasure(player))
return; return;
TreasureStartEvent event = new TreasureStartEvent(player); TreasureStartEvent event = new TreasureStartEvent(player);
@ -235,6 +239,8 @@ public class TreasureManager extends MiniPlugin
return; return;
} }
Bukkit.broadcastMessage(F.main("Treasure", F.name(player.getName()) + " is opening a " + C.cGreen + "Treasure Chest"));
ITreasureReward[] rewards = _rewardManager.getRewards(player); ITreasureReward[] rewards = _rewardManager.getRewards(player);
Treasure treasure = new Treasure(player, rewards); Treasure treasure = new Treasure(player, rewards);
_playerTreasureMap.put(player, treasure); _playerTreasureMap.put(player, treasure);
@ -243,10 +249,31 @@ public class TreasureManager extends MiniPlugin
teleportLocation.setPitch(player.getLocation().getPitch()); teleportLocation.setPitch(player.getLocation().getPitch());
teleportLocation.setYaw(player.getLocation().getYaw()); teleportLocation.setYaw(player.getLocation().getYaw());
for (Entity entity : player.getNearbyEntities(3, 3, 3))
{
UtilAction.velocity(entity, UtilAlg.getTrajectory(entity.getLocation(), treasure.getCenterBlock().getLocation()).multiply(-1), 1.5, true, 0.8, 0, 1.0, true);
}
player.teleport(teleportLocation); player.teleport(teleportLocation);
} }
private boolean checkNearbyTreasure(Player player)
{
boolean nearTreasure = false;
for (Treasure treasure : _playerTreasureMap.values())
{
if (UtilMath.offset2d(treasure.getCenterBlock().getLocation(), player.getLocation()) <= 10)
nearTreasure = true;
}
if (nearTreasure)
UtilPlayer.message(player, F.main("Treasure", "You are too close to another players treasure."));
return nearTreasure;
}
private boolean checkNearbyBlocks(Player player) private boolean checkNearbyBlocks(Player player)
{ {
//todo improve this //todo improve this
@ -262,13 +289,13 @@ public class TreasureManager extends MiniPlugin
if (UtilBlock.solid(block)) if (UtilBlock.solid(block))
{ {
UtilPlayer.message(player, F.main("Treasure", "You can't open chests here.")); UtilPlayer.message(player, F.main("Treasure", "You can't open chests here."));
return false;
}
}
}
}
return true; return true;
} }
}
}
}
return false;
}
private boolean checkInAir(Player player) private boolean checkInAir(Player player)
{ {
@ -330,11 +357,10 @@ public class TreasureManager extends MiniPlugin
Player player = event.getPlayer(); Player player = event.getPlayer();
if (_playerTreasureMap.containsKey(player)) if (_playerTreasureMap.containsKey(player))
{ {
Location to = event.getTo(); Treasure treasure = _playerTreasureMap.get(player);
Location from = event.getFrom(); if (!event.getTo().getBlock().getRelative(BlockFace.DOWN).equals(treasure.getCenterBlock()))
if (to.getX() != from.getX() || to.getY() != from.getY() || to.getZ() != from.getZ())
{ {
Location newTo = event.getFrom().clone(); Location newTo = treasure.getCenterBlock().getLocation().add(0.5, 1.1, 0.5);
newTo.setPitch(event.getTo().getPitch()); newTo.setPitch(event.getTo().getPitch());
newTo.setYaw(event.getTo().getYaw()); newTo.setYaw(event.getTo().getYaw());
event.setTo(newTo); event.setTo(newTo);
@ -345,7 +371,7 @@ public class TreasureManager extends MiniPlugin
for (Treasure treasure : _playerTreasureMap.values()) for (Treasure treasure : _playerTreasureMap.values())
{ {
Location centerLocation = treasure.getCenterBlock().getLocation().add(0.5, 1.5, 0.5); Location centerLocation = treasure.getCenterBlock().getLocation().add(0.5, 1.5, 0.5);
if (centerLocation.distanceSquared(event.getTo()) <= 6) if (centerLocation.distanceSquared(event.getTo()) <= 9)
{ {
UtilAction.velocity(player, UtilAlg.getTrajectory(player.getLocation(), centerLocation).multiply(-1), 1.5, true, 0.8, 0, 1.0, true); UtilAction.velocity(player, UtilAlg.getTrajectory(player.getLocation(), centerLocation).multiply(-1), 1.5, true, 0.8, 0, 1.0, true);
event.setTo(event.getFrom()); event.setTo(event.getFrom());
@ -362,7 +388,6 @@ public class TreasureManager extends MiniPlugin
{ {
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.CHEST) if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getType() == Material.CHEST)
{ {
Block block = event.getClickedBlock();
event.setCancelled(true); event.setCancelled(true);
Treasure treasure = _playerTreasureMap.get(player); Treasure treasure = _playerTreasureMap.get(player);

View File

@ -45,7 +45,7 @@ public class InventoryReward extends AbstractReward
{ {
int amountToGive; int amountToGive;
if (_minAmount > _maxAmount) if (_minAmount != _maxAmount)
{ {
amountToGive = _random.nextInt(_maxAmount - _minAmount) + _minAmount; amountToGive = _random.nextInt(_maxAmount - _minAmount) + _minAmount;
} }

View File

@ -53,6 +53,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilTitle;
import mineplex.core.common.util.UtilWorld; import mineplex.core.common.util.UtilWorld;
import mineplex.core.treasure.TreasureManager; import mineplex.core.treasure.TreasureManager;
import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.condition.ConditionManager;
@ -945,6 +946,4 @@ public class HubManager extends MiniClientPlugin<HubClient>
{ {
} }
} }

View File

@ -7,6 +7,8 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.server.ServerListPingEvent;
import mineplex.core.MiniPlugin; import mineplex.core.MiniPlugin;
import mineplex.core.common.Rank; import mineplex.core.common.Rank;
@ -17,6 +19,7 @@ import mineplex.core.common.util.UtilDisplay;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilTitle;
import mineplex.core.mount.Mount; import mineplex.core.mount.Mount;
import mineplex.core.mount.types.MountDragon; import mineplex.core.mount.types.MountDragon;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
@ -46,8 +49,10 @@ public class NewsManager extends MiniPlugin
_news = new String[] _news = new String[]
{ {
"Champions: " + C.cYellow + C.Bold + "Team Deathmatch Beta", "News Line 1",
"Survival: " + C.cGreen + C.Bold + "UHC Alpha", "News Line 2",
"News Line 3",
"News Line 4",
}; };
RefreshNews(); RefreshNews();
@ -216,7 +221,7 @@ public class NewsManager extends MiniPlugin
} }
@EventHandler @EventHandler
public void FlightUpdate(UpdateEvent event) public void DragonBarUpdate(UpdateEvent event)
{ {
if (event.getType() != UpdateType.FASTEST) if (event.getType() != UpdateType.FASTEST)
return; return;
@ -260,4 +265,22 @@ public class NewsManager extends MiniPlugin
} }
} }
} }
@EventHandler
public void joinNewsOverlay(final PlayerJoinEvent event)
{
for (int i=0 ; i<_news.length ; i++)
{
final int count = i;
UtilServer.getServer().getScheduler().runTaskLater(Manager.GetPlugin(), new Runnable()
{
@Override
public void run()
{
UtilTitle.display(C.cGold + C.Bold + "MINEPLEX" + ChatColor.RESET, _news[_news.length - 1 - count] + ChatColor.RESET, (count == 0) ? 20 : 0, 60, 20, event.getPlayer());
}
}, 60 * i + (i != 0 ? 20 : 0));
}
}
} }

View File

@ -902,6 +902,8 @@ public abstract class Game implements Listener
if (!IsLive()) if (!IsLive())
return; return;
String winnerText = ChatColor.WHITE + "§lNobody won the game...";
for (Player player : UtilServer.getPlayers()) for (Player player : UtilServer.getPlayers())
{ {
player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1f); player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1f);
@ -917,11 +919,13 @@ public abstract class Game implements Listener
{ {
WinnerTeam = team; WinnerTeam = team;
Winner = team.GetName() + " Team"; Winner = team.GetName() + " Team";
UtilPlayer.message(player, team.GetColor() + C.Bold + team.GetName() + " won the game!");
winnerText = team.GetColor() + C.Bold + team.GetName() + " won the game!";
UtilPlayer.message(player, winnerText);
} }
else else
{ {
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game..."); UtilPlayer.message(player, winnerText);
} }
@ -932,12 +936,16 @@ public abstract class Game implements Listener
UtilPlayer.message(player, ArcadeFormat.Line); UtilPlayer.message(player, ArcadeFormat.Line);
} }
UtilTitle.display(winnerText, _customWinLine, 20, 120, 20);
if (AnnounceSilence) if (AnnounceSilence)
Manager.GetChat().Silence(5000, false); Manager.GetChat().Silence(5000, false);
} }
public void AnnounceEnd(List<Player> places) public void AnnounceEnd(List<Player> places)
{ {
String winnerText = ChatColor.WHITE + "§lNobody won the game...";
for (Player player : UtilServer.getPlayers()) for (Player player : UtilServer.getPlayers())
{ {
player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1f); player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1f);
@ -959,16 +967,24 @@ public abstract class Game implements Listener
if (places.size() >= 1) if (places.size() >= 1)
{ {
Winner = places.get(0).getName(); Winner = places.get(0).getName();
winnerText = C.cYellow + C.Bold + places.get(0).getName() + " won the game!";
UtilPlayer.message(player, C.cRed + C.Bold + "1st Place" + C.cWhite + " - " + places.get(0).getName()); UtilPlayer.message(player, C.cRed + C.Bold + "1st Place" + C.cWhite + " - " + places.get(0).getName());
} }
if (places.size() >= 2) if (places.size() >= 2)
{
UtilPlayer.message(player, C.cGold + C.Bold + "2nd Place" + C.cWhite + " - " + places.get(1).getName()); UtilPlayer.message(player, C.cGold + C.Bold + "2nd Place" + C.cWhite + " - " + places.get(1).getName());
}
if (places.size() >= 3) if (places.size() >= 3)
{
UtilPlayer.message(player, C.cYellow + C.Bold + "3rd Place" + C.cWhite + " - " + places.get(2).getName()); UtilPlayer.message(player, C.cYellow + C.Bold + "3rd Place" + C.cWhite + " - " + places.get(2).getName());
} }
}
UtilPlayer.message(player, ""); UtilPlayer.message(player, "");
UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l" + WorldData.MapAuthor); UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l" + WorldData.MapAuthor);
@ -976,6 +992,8 @@ public abstract class Game implements Listener
UtilPlayer.message(player, ArcadeFormat.Line); UtilPlayer.message(player, ArcadeFormat.Line);
} }
UtilTitle.display(winnerText, null, 20, 120, 20);
if (AnnounceSilence) if (AnnounceSilence)
Manager.GetChat().Silence(5000, false); Manager.GetChat().Silence(5000, false);
} }

View File

@ -8,6 +8,7 @@ import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilTitle;
import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.common.Domination; import nautilus.game.arcade.game.games.common.Domination;

View File

@ -62,6 +62,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTitle;
import mineplex.core.common.util.UtilWorld; import mineplex.core.common.util.UtilWorld;
import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ParticleType;
@ -1721,6 +1722,8 @@ 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);
//Check for total game win //Check for total game win
EndCheck(); EndCheck();

View File

@ -90,7 +90,7 @@ public class Quiver extends SoloGame
for (Player player : GetPlayers(true)) for (Player player : GetPlayers(true))
{ {
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)1, 1, F.item("Super Arrow"))); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Super Arrow")));
player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f); player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f);
} }
} }
@ -124,7 +124,7 @@ public class Quiver extends SoloGame
public void run() public void run()
{ {
if (!player.getInventory().contains(Material.ARROW)) if (!player.getInventory().contains(Material.ARROW))
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)1, 1, F.item("Super Arrow"))); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Super Arrow")));
} }
}, 10); }, 10);
@ -148,7 +148,7 @@ public class Quiver extends SoloGame
if (player == null) return; if (player == null) return;
//New Arrow //New Arrow
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)1, 1, F.item("Super Arrow"))); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Super Arrow")));
player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f); player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f);
//Score //Score

View File

@ -261,14 +261,14 @@ public class GameFlagManager implements Listener
} }
if (!game.InventoryOpenChest) // if (!game.InventoryOpenChest)
{ // {
if (event.getInventory().getType() == InventoryType.CHEST) // if (event.getInventory().getType() == InventoryType.CHEST)
{ // {
event.setCancelled(true); // event.setCancelled(true);
event.getPlayer().closeInventory(); // event.getPlayer().closeInventory();
} // }
} // }
} }
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)