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

This commit is contained in:
Jonathan Williams 2014-11-07 13:54:22 -08:00
commit 4ac70281d4
3 changed files with 64 additions and 0 deletions

View File

@ -1,7 +1,9 @@
package nautilus.game.arcade.game.games.deathtag; package nautilus.game.arcade.game.games.deathtag;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -26,6 +28,7 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.SoloGame; import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.GameTeam.PlayerState; import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.game.games.deathtag.kits.*; import nautilus.game.arcade.game.games.deathtag.kits.*;
import nautilus.game.arcade.game.games.sneakyassassins.powerups.PowerUpManager; import nautilus.game.arcade.game.games.sneakyassassins.powerups.PowerUpManager;
@ -377,4 +380,36 @@ public class DeathTag extends SoloGame
return 0; return 0;
} }
@Override
public List<Player> getWinners()
{
if (GetState().ordinal() >= GameState.End.ordinal())
{
List<Player> places = _runners.GetPlayers(true);
if (places.isEmpty() || !places.get(0).isOnline())
return Arrays.asList();
else
return Arrays.asList(places.get(0));
}
else
return null;
}
@Override
public List<Player> getLosers()
{
if (GetState().ordinal() >= GameState.End.ordinal())
{
List<Player> places = _chasers.GetPlayers(true);
if (places.isEmpty() || !places.get(0).isOnline())
return Arrays.asList();
else
return Arrays.asList(places.get(0));
}
else
return null;
}
} }

View File

@ -56,6 +56,9 @@ public class DrawRound
//Word //Word
if (kit != null && kit instanceof KitSelector) if (kit != null && kit instanceof KitSelector)
{ {
//Silence
Host.Manager.GetChat().Silence(12000, true);
WordChoices = new ArrayList<String>(); WordChoices = new ArrayList<String>();
while (WordChoices.size() < 3) while (WordChoices.size() < 3)
@ -93,6 +96,8 @@ public class DrawRound
Time = System.currentTimeMillis(); Time = System.currentTimeMillis();
UtilPlayer.message(Drawer, C.cWhite + C.Bold + "You must draw: " + C.cGreen + C.Bold + Word); UtilPlayer.message(Drawer, C.cWhite + C.Bold + "You must draw: " + C.cGreen + C.Bold + Word);
Host.Manager.GetChat().SilenceEnd();
} }
public boolean Guessed(Player player) public boolean Guessed(Player player)

View File

@ -1,7 +1,9 @@
package nautilus.game.arcade.game.games.quiver; package nautilus.game.arcade.game.games.quiver;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -31,6 +33,7 @@ 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;
import nautilus.game.arcade.game.SoloGame; import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.quiver.kits.*; import nautilus.game.arcade.game.games.quiver.kits.*;
import nautilus.game.arcade.kit.Kit; import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.SharpShooterStatTracker; import nautilus.game.arcade.stats.SharpShooterStatTracker;
@ -344,4 +347,25 @@ public class Quiver extends SoloGame
AnnounceEnd(places); AnnounceEnd(places);
} }
} }
@Override
public List<Player> getWinners()
{
if (GetState().ordinal() >= GameState.End.ordinal())
{
SortScores();
//Set Places
ArrayList<Player> places = new ArrayList<Player>();
for (int i=0 ; i<_ranks.size() ; i++)
places.add(i, _ranks.get(i).Player);
if (places.isEmpty() || !places.get(0).isOnline())
return Arrays.asList();
else
return Arrays.asList(places.get(0));
}
else
return null;
}
} }