more 1.8 stuff

This commit is contained in:
Mini-Chiss 2015-05-03 16:54:02 -05:00
parent bd8bd2dfd6
commit a42c71ebb8
2 changed files with 4 additions and 46 deletions

View File

@ -243,6 +243,8 @@ public class SurvivalGames extends SoloGame
PlaySoundGameStart = false;
PrepareTime = 15000;
VersionRequire1_8 = true;
BlockBreakAllow.add(Material.WEB.getId()); // Web
BlockPlaceAllow.add(Material.WEB.getId());
@ -1103,13 +1105,6 @@ public class SurvivalGames extends SoloGame
event.setCancelled(true);
}
@EventHandler
public void joinMessage(PlayerJoinEvent event)
{
if (!UtilPlayer.is1_8(event.getPlayer()))
returnToHub(event.getPlayer());
}
@EventHandler
public void onGameEnd(GameStateChangeEvent event)
{
@ -1166,13 +1161,6 @@ public class SurvivalGames extends SoloGame
return;
}
for (Player player : Bukkit.getOnlinePlayers())
{
if (!UtilPlayer.is1_8(player))
{
returnToHub(player);
}
}
if (!IsLive())
{
@ -1333,16 +1321,6 @@ public class SurvivalGames extends SoloGame
}
}
@EventHandler
public void outdatedVersion(GameStateChangeEvent event)
{
for (Player player : UtilServer.getPlayers())
{
if (!UtilPlayer.is1_8(player))
returnToHub(player);
}
}
@EventHandler
public void outsideBorder(UpdateEvent event)
{
@ -1682,16 +1660,6 @@ public class SurvivalGames extends SoloGame
}
public void returnToHub(Player player)
{
UtilPlayer.message(player, " ");
UtilPlayer.message(player, C.cGold + C.Bold + "SurvivalGames requires you to be using Minecraft 1.8!");
UtilPlayer.message(player, " ");
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 10f, 1f);
Manager.GetPortal().sendPlayerToServer(player, "Lobby");
}
@Override
@EventHandler
public void ScoreboardUpdate(UpdateEvent event)

View File

@ -755,18 +755,8 @@ public class Wizards extends SoloGame
// Send to Player
for (Player player : players)
{
// 1.7 - Add Color
if (!UtilPlayer.is1_8(player))
{
UtilTextTop.displayProgress((prefix == null ? "" : C.cYellow + C.Bold + prefix)
+ (suffix == null ? "" : ChatColor.RESET + C.Bold + " - " + C.cGreen + C.Bold + suffix), amount, player);
}
// 1.8
else
{
UtilTextBottom.display((prefix == null ? "" : prefix + ChatColor.RESET + " ") + progressBar
+ (suffix == null ? "" : ChatColor.RESET + " " + suffix), players);
}
UtilTextBottom.display((prefix == null ? "" : prefix + ChatColor.RESET + " ") + progressBar
+ (suffix == null ? "" : ChatColor.RESET + " " + suffix), players);
}
}