game not end
This commit is contained in:
parent
c9e1c0a0f4
commit
83bec39aef
@ -732,34 +732,6 @@ public class HungerGames extends SoloGame
|
||||
}
|
||||
if (!added)
|
||||
_redChunks.get(player).add(new ChunkChange(loc, id, data));
|
||||
|
||||
/*
|
||||
if (_fixChoice.containsKey(player))
|
||||
{
|
||||
int req = _fixChoice.get(player);
|
||||
|
||||
int done = 0;
|
||||
if (_fixSkip.containsKey(player))
|
||||
done = _fixSkip.get(player);
|
||||
|
||||
done = (done + 1)%req;
|
||||
|
||||
_fixSkip.put(player, done);
|
||||
|
||||
if (done != 999999)
|
||||
{
|
||||
if (!_fixChunk.containsKey(player))
|
||||
_fixChunk.put(player, new ArrayList<Chunk>());
|
||||
|
||||
if (!_fixChunk.get(player).contains(loc.getChunk()))
|
||||
_fixChunk.get(player).add(loc.getChunk());
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
player.sendBlockChange(loc, id, data);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -808,15 +780,6 @@ public class HungerGames extends SoloGame
|
||||
return false;
|
||||
|
||||
return _redMap.get(block.getX()).get(block.getY()).contains(block.getZ());
|
||||
|
||||
/*
|
||||
for (Entry<Integer,Integer> entry : _spreadTypeBlocks)
|
||||
{
|
||||
if (block.getTypeId() == entry.getKey() && block.getData() == entry.getValue())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;*/
|
||||
}
|
||||
|
||||
public void SetRed(Location loc)
|
||||
@ -1222,94 +1185,15 @@ public class HungerGames extends SoloGame
|
||||
event.blockList().clear();
|
||||
}
|
||||
|
||||
/*
|
||||
private long _fixTimer = 0;
|
||||
private HashMap<Player, Integer> _fixChoice = new HashMap<Player, Integer>();
|
||||
private HashMap<Player, Integer> _fixSkip = new HashMap<Player, Integer>();
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void FixInform(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
if (this.GetState() != GameState.Recruit)
|
||||
return;
|
||||
|
||||
if (!UtilTime.elapsed(_fixTimer, 15000))
|
||||
return;
|
||||
|
||||
_fixTimer = System.currentTimeMillis();
|
||||
|
||||
Announce(C.cGold + C.Bold + "Are you getting frame lag?");
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
UtilPlayer.message(player, "/fix low " + C.cYellow + "Slightly reduce freeze visuals");
|
||||
UtilPlayer.message(player, "/fix high " + C.cYellow + "Highly reduce freeze visuals");
|
||||
UtilPlayer.message(player, "/fix max " + C.cYellow + "Extremely reduce freeze visuals");
|
||||
UtilPlayer.message(player, "/fix off " + C.cYellow + "Turn off lag reduction");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void FixCommand(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
String[] tokens = event.getMessage().split(" ");
|
||||
|
||||
if (tokens.length < 2)
|
||||
return;
|
||||
|
||||
if (!tokens[0].equalsIgnoreCase("/fix"))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (tokens[1].equalsIgnoreCase("off"))
|
||||
{
|
||||
_fixChoice.remove(event.getPlayer());
|
||||
UtilPlayer.message(event.getPlayer(), C.cPurple + C.Bold + "Turned off freeze visual fix!");
|
||||
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.NOTE_PLING, 2f, 2f);
|
||||
}
|
||||
else if (tokens[1].equalsIgnoreCase("low"))
|
||||
{
|
||||
_fixChoice.put(event.getPlayer(), 2);
|
||||
UtilPlayer.message(event.getPlayer(), C.cPurple + C.Bold + "Freeze visuals slightly reduced!");
|
||||
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.NOTE_PLING, 2f, 2f);
|
||||
}
|
||||
else if (tokens[1].equalsIgnoreCase("high"))
|
||||
{
|
||||
_fixChoice.put(event.getPlayer(), 4);
|
||||
UtilPlayer.message(event.getPlayer(), C.cPurple + C.Bold + "Freeze visuals highly reduced!");
|
||||
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.NOTE_PLING, 2f, 2f);
|
||||
}
|
||||
else if (tokens[1].equalsIgnoreCase("max"))
|
||||
{
|
||||
_fixChoice.put(event.getPlayer(), 9);
|
||||
UtilPlayer.message(event.getPlayer(), C.cPurple + C.Bold + "Freeze visuals extremely reduced!");
|
||||
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.NOTE_PLING, 2f, 2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), "/fix low " + C.cYellow + "Slightly reduce freeze visuals");
|
||||
UtilPlayer.message(event.getPlayer(), "/fix high " + C.cYellow + "Highly reduce freeze visuals");
|
||||
UtilPlayer.message(event.getPlayer(), "/fix max " + C.cYellow + "Extremely reduce freeze visuals");
|
||||
UtilPlayer.message(event.getPlayer(), "/fix off " + C.cYellow + "Turn off lag reduction");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void FixClean(PlayerQuitEvent event)
|
||||
{
|
||||
_fixChoice.remove(event.getPlayer());
|
||||
_fixSkip.remove(event.getPlayer());
|
||||
_fixChunk.remove(event.getPlayer());
|
||||
}
|
||||
*/
|
||||
|
||||
@EventHandler
|
||||
public void FixClean(PlayerQuitEvent event)
|
||||
{
|
||||
_redChunks.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EndCheck()
|
||||
{
|
||||
///XXX REMOVE ME
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class GameManager implements Listener
|
||||
//Stop Countdown!
|
||||
if (game.GetCountdown() != -1 &&
|
||||
UtilServer.getPlayers().length < Manager.GetPlayerMin() &&
|
||||
!game.GetCountdownForce())
|
||||
!game.GetCountdownForce() && game.GetType() != GameType.HungerGames) //XXX
|
||||
{
|
||||
game.SetCountdown(-1);
|
||||
Manager.GetLobby().DisplayWaiting();
|
||||
@ -124,7 +124,7 @@ public class GameManager implements Listener
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
player.playSound(player.getLocation(), Sound.NOTE_PLING, 2f, 2f);
|
||||
|
||||
if (game.GetPlayers(true).size() < 2)
|
||||
if (game.GetPlayers(true).size() < 2 && game.GetType() != GameType.HungerGames) //XXX
|
||||
{
|
||||
game.Announce(C.cWhite + C.Bold + game.GetName() + " ended, not enough players!");
|
||||
game.SetState(GameState.Dead);
|
||||
|
Loading…
Reference in New Issue
Block a user