Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/Mineplex
This commit is contained in:
commit
66aa7223cc
@ -500,16 +500,12 @@ public class UtilEnt
|
||||
for (int x=xMin ; x<=xMax ; x++)
|
||||
{
|
||||
for (int z=zMin ; z<=zMax ; z++)
|
||||
{
|
||||
//half block, carpet, snow, etc
|
||||
//if (player.getLocation().getBlock().getType() != Material.AIR)
|
||||
// return true;
|
||||
|
||||
//standing on...
|
||||
if (player.getLocation().add(x, -0.5, z).getBlock().getType() != Material.AIR)
|
||||
{
|
||||
//Standing on SOMETHING
|
||||
if (player.getLocation().add(x, -0.5, z).getBlock().getType() != Material.AIR && !player.getLocation().add(x, -0.5, z).getBlock().isLiquid())
|
||||
return true;
|
||||
|
||||
//fences/walls
|
||||
//Fences/Walls
|
||||
Material beneath = player.getLocation().add(x, -1.5, z).getBlock().getType();
|
||||
if (player.getLocation().getY() % 0.5 == 0 &&
|
||||
(beneath == Material.FENCE ||
|
||||
|
@ -141,21 +141,21 @@ public class UtilText
|
||||
for (int y=0 ; y<5 ; y++)
|
||||
{
|
||||
if (align == TextAlign.CENTER)
|
||||
for (int i=-48 ; i<=48 ; i++)
|
||||
for (int i=-64 ; i<=64 ; i++)
|
||||
{
|
||||
chunks.add(MapUtil.ChunkBlockChange(world, bX + i * face.getModX(), bY + i * face.getModY(), bZ + i * face.getModZ(), 0, (byte)0));
|
||||
}
|
||||
|
||||
|
||||
if (align == TextAlign.LEFT)
|
||||
for (int i=0 ; i<=96 ; i++)
|
||||
for (int i=0 ; i<=128 ; i++)
|
||||
{
|
||||
chunks.add(MapUtil.ChunkBlockChange(world, bX + i * face.getModX(), bY + i * face.getModY(), bZ + i * face.getModZ(), 0, (byte)0));
|
||||
}
|
||||
|
||||
|
||||
if (align == TextAlign.RIGHT)
|
||||
for (int i=-96 ; i<=0 ; i++)
|
||||
for (int i=-128 ; i<=0 ; i++)
|
||||
{
|
||||
chunks.add(MapUtil.ChunkBlockChange(world, bX + i * face.getModX(), bY + i * face.getModY(), bZ + i * face.getModZ(), 0, (byte)0));
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import java.util.Map.Entry;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.antihack.types.*;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
@ -52,17 +53,17 @@ public class AntiHack extends MiniPlugin
|
||||
|
||||
//Hack Requirements
|
||||
public int FloatHackTicks = 6;
|
||||
public int HoverHackTicks = 4;
|
||||
public int RiseHackTicks = 10;
|
||||
public int HoverHackTicks = 3;
|
||||
public int RiseHackTicks = 6;
|
||||
public int SpeedHackTicks = 6;
|
||||
public int IdleTime = 16000;
|
||||
public int IdleTime = 20000;
|
||||
|
||||
//Other Times
|
||||
public int FlightTriggerCancel = 2000;
|
||||
|
||||
public ArrayList<Detector> _detectors;
|
||||
|
||||
private AntiHackRepository _repository;
|
||||
//private AntiHackRepository _repository;
|
||||
|
||||
protected AntiHack(JavaPlugin plugin, Punish punish, Portal portal)
|
||||
{
|
||||
@ -140,7 +141,7 @@ public class AntiHack extends MiniPlugin
|
||||
|
||||
if (_velocityEvent.remove(player))
|
||||
{
|
||||
setIgnore(player, 2000);
|
||||
setIgnore(player, 1500);
|
||||
}
|
||||
|
||||
//Initial Move (or Lag) Ignore
|
||||
@ -150,7 +151,7 @@ public class AntiHack extends MiniPlugin
|
||||
|
||||
if (timeBetweenPackets > 1000)
|
||||
{
|
||||
setIgnore(player, 2000);
|
||||
setIgnore(player, 1500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -273,13 +274,11 @@ public class AntiHack extends MiniPlugin
|
||||
out = out.substring(0, out.length() - 2);
|
||||
|
||||
String severity = "";
|
||||
if (total > 30) severity = "Extreme";
|
||||
else if (total > 20) severity = "High";
|
||||
else if (total > 10) severity = "Medium";
|
||||
else if (total > 5) severity = "Low";
|
||||
else
|
||||
return;
|
||||
|
||||
if (total > 6) severity = "Extreme";
|
||||
else if (total > 4) severity = "High";
|
||||
else if (total > 2) severity = "Medium";
|
||||
else severity = "Low";
|
||||
|
||||
//Send Report
|
||||
sendReport(player, out, severity);
|
||||
}
|
||||
@ -288,9 +287,18 @@ public class AntiHack extends MiniPlugin
|
||||
public void sendReport(Player player, String report, String severity)
|
||||
{
|
||||
if (severity.equals("Extreme"))
|
||||
player.kickPlayer(C.cRed + "MAC" + C.cWhite + " - " + C.cYellow + "You were kicked for suspicious movement.");
|
||||
{
|
||||
player.kickPlayer(
|
||||
C.cGold + "Mineplex Anti-Cheat" + "\n" +
|
||||
C.cWhite + "You were kicked for suspicious movement." + "\n" +
|
||||
C.cWhite + "Cheating will result in a " + C.cRed + "Permanent Ban" + C.cWhite + "."
|
||||
);
|
||||
|
||||
UtilServer.broadcast(F.main("MAC", player.getName() + " was kicked for suspicious movement."));
|
||||
}
|
||||
|
||||
|
||||
_repository.saveOffense(player, report, severity);
|
||||
//_repository.saveOffense(player, report, severity);
|
||||
}
|
||||
|
||||
private void ResetAll(Player player)
|
||||
|
@ -8,8 +8,12 @@ import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.antihack.AntiHack;
|
||||
import mineplex.core.antihack.Detector;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -22,8 +26,7 @@ public class Fly extends MiniPlugin implements Detector
|
||||
|
||||
private HashMap<Player, Entry<Integer, Double>> _floatTicks = new HashMap<Player, Entry<Integer, Double>>(); //Ticks, PrevY
|
||||
private HashMap<Player, Entry<Integer, Double>> _hoverTicks = new HashMap<Player, Entry<Integer, Double>>(); //Ticks, PrevY
|
||||
private HashMap<Player, Entry<Integer, Double>> _riseTicks = new HashMap<Player, Entry<Integer, Double>>(); //Ticks, PrevY
|
||||
private HashMap<Player, Vector> _momentum = new HashMap<Player, Vector>();
|
||||
private HashMap<Player, Entry<Integer, Double>> _riseTicks = new HashMap<Player, Entry<Integer, Double>>(); //Ticks, PrevY
|
||||
|
||||
public Fly (AntiHack host)
|
||||
{
|
||||
@ -37,7 +40,7 @@ public class Fly extends MiniPlugin implements Detector
|
||||
Player player = event.getPlayer();
|
||||
|
||||
//100% Valid
|
||||
if (Host.isValid(player, true))
|
||||
if (Host.isValid(player, true))
|
||||
return;
|
||||
|
||||
//Hasn't moved, just looking around
|
||||
@ -48,8 +51,7 @@ public class Fly extends MiniPlugin implements Detector
|
||||
}
|
||||
|
||||
updateHover(player);
|
||||
//updateRise(player);
|
||||
updateMomentum(player, event);
|
||||
updateRise(player);
|
||||
}
|
||||
|
||||
private void updateFloat(Player player)
|
||||
@ -110,7 +112,25 @@ public class Fly extends MiniPlugin implements Detector
|
||||
{
|
||||
if (player.getLocation().getY() > _riseTicks.get(player).getValue())
|
||||
{
|
||||
count = _riseTicks.get(player).getKey() + 1;
|
||||
boolean nearBlocks = false;
|
||||
for (Block block : UtilBlock.getSurrounding(player.getLocation().getBlock(), true))
|
||||
{
|
||||
if (block.getType() != Material.AIR)
|
||||
{
|
||||
nearBlocks = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nearBlocks)
|
||||
{
|
||||
count = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
count = _riseTicks.get(player).getKey() + 1;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -126,23 +146,6 @@ public class Fly extends MiniPlugin implements Detector
|
||||
|
||||
_riseTicks.put(player, new AbstractMap.SimpleEntry<Integer, Double>(count, player.getLocation().getY()));
|
||||
}
|
||||
|
||||
private void updateMomentum(Player player, PlayerMoveEvent event)
|
||||
{
|
||||
if (!_momentum.containsKey(player))
|
||||
_momentum.put(player, UtilAlg.getTrajectory2d(event.getFrom(), event.getTo()));
|
||||
|
||||
Vector newVel = UtilAlg.getTrajectory2d(event.getFrom(), event.getTo());
|
||||
Vector oldVel = _momentum.get(player);
|
||||
|
||||
//Not within 90 degrees of rotation in perfect circle
|
||||
if (oldVel.subtract(newVel).length() > 1.42 && UtilMath.offset2d(event.getFrom(), event.getTo()) > 0.4) //Ignore low velocity switch
|
||||
{
|
||||
Host.addSuspicion(player, "Fly (Momentum)");
|
||||
}
|
||||
|
||||
_momentum.put(player, newVel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
@ -150,6 +153,5 @@ public class Fly extends MiniPlugin implements Detector
|
||||
_floatTicks.remove(player);
|
||||
_hoverTicks.remove(player);
|
||||
_riseTicks.remove(player);
|
||||
_momentum.remove(player);
|
||||
}
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ public class ProjectileUser
|
||||
finalObjectPosition = new MovingObjectPosition(((CraftLivingEntity)victim).getHandle());
|
||||
|
||||
_callback.Collide(victim, null, this);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (finalObjectPosition != null)
|
||||
|
@ -65,6 +65,8 @@ import mineplex.hub.mount.MountManager;
|
||||
import mineplex.hub.party.Party;
|
||||
import mineplex.hub.party.PartyManager;
|
||||
import mineplex.hub.tutorial.TutorialManager;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
import mineplex.minecraft.game.classcombat.item.event.ItemTriggerEvent;
|
||||
import mineplex.minecraft.game.core.condition.ConditionManager;
|
||||
|
||||
public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@ -785,10 +787,19 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
|
||||
else if (player.getName().equalsIgnoreCase("sterling_"))
|
||||
UtilParticle.PlayParticle(other, ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2);
|
||||
|
||||
else if (player.getName().equalsIgnoreCase("MonsieurApple"))
|
||||
UtilParticle.PlayParticle(other, ParticleType.SPLASH, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void SkillTrigger(SkillTriggerEvent event)
|
||||
{
|
||||
event.SetCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ItemTrigger(ItemTriggerEvent event)
|
||||
{
|
||||
event.SetCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -122,12 +122,12 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
|
||||
{
|
||||
AddItem(new WaterBottle(this, Material.POTION, 1, false, 0, 1,
|
||||
ActionType.R, true, 500, 0,
|
||||
ActionType.L, true, 500, 4, 1f,
|
||||
ActionType.L, true, 500, 0, 1f,
|
||||
-1, true, true, true, false));
|
||||
|
||||
AddItem(new Web(this, Material.WEB, 3, false, 500, 1,
|
||||
null, true, 0, 0,
|
||||
ActionType.L, true, 250, 8, 1f,
|
||||
ActionType.L, true, 250, 0, 1f,
|
||||
-1, true, true, true, false));
|
||||
|
||||
/*
|
||||
@ -139,12 +139,12 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
|
||||
|
||||
AddItem(new ProximityExplosive(this, Material.COMMAND, 1, false, 1000, 2,
|
||||
null, true, 0, 0,
|
||||
ActionType.L, true, 250, 10, 0.8f,
|
||||
ActionType.L, true, 250, 0, 0.8f,
|
||||
4000, false, false, false, true));
|
||||
|
||||
AddItem(new ProximityZapper(this, Material.REDSTONE_LAMP_OFF, 1, false, 1000, 2,
|
||||
null, true, 0, 0,
|
||||
ActionType.L, true, 250, 10, 0.8f,
|
||||
ActionType.L, true, 250, 0, 0.8f,
|
||||
4000, false, false, false, true));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ import nautilus.game.arcade.game.games.hideseek.HideSeek;
|
||||
import nautilus.game.arcade.game.games.milkcow.MilkCow;
|
||||
import nautilus.game.arcade.game.games.mineware.MineWare;
|
||||
import nautilus.game.arcade.game.games.quiver.Quiver;
|
||||
import nautilus.game.arcade.game.games.quiver.QuiverTeams;
|
||||
import nautilus.game.arcade.game.games.runner.Runner;
|
||||
import nautilus.game.arcade.game.games.sheep.SheepGame;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmash;
|
||||
@ -77,6 +78,7 @@ public class GameFactory
|
||||
else if (gameType == GameType.MilkCow) return new MilkCow(_manager);
|
||||
else if (gameType == GameType.Paintball) return new Paintball(_manager);
|
||||
else if (gameType == GameType.Quiver) return new Quiver(_manager);
|
||||
else if (gameType == GameType.QuiverTeams) return new QuiverTeams(_manager);
|
||||
else if (gameType == GameType.Runner) return new Runner(_manager);
|
||||
else if (gameType == GameType.SnowFight) return new SnowFight(_manager);
|
||||
else if (gameType == GameType.Sheep) return new SheepGame(_manager);
|
||||
|
@ -22,6 +22,8 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class GameTeam
|
||||
{
|
||||
private Game Host;
|
||||
|
||||
private double _respawnTime = 0;
|
||||
|
||||
public enum PlayerState
|
||||
@ -64,8 +66,10 @@ public class GameTeam
|
||||
|
||||
private boolean _visible = true;
|
||||
|
||||
public GameTeam(String name, ChatColor color, ArrayList<Location> spawns)
|
||||
public GameTeam(Game host, String name, ChatColor color, ArrayList<Location> spawns)
|
||||
{
|
||||
Host = host;
|
||||
|
||||
_name = name;
|
||||
_color = color;
|
||||
_spawns = spawns;
|
||||
@ -97,7 +101,7 @@ public class GameTeam
|
||||
{
|
||||
double closestPlayer = -1;
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
for (Player player : Host.GetPlayers(true))
|
||||
{
|
||||
double playerDist = UtilMath.offset(player.getLocation(), loc);
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class Christmas extends SoloGame
|
||||
if (event.GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
GetTeamList().add(new GameTeam("Christmas Thieves", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
GetTeamList().add(new GameTeam(this, "Christmas Thieves", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsDominate;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.*;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
|
||||
public class Domination extends TeamGame
|
||||
{
|
||||
//Map Data
|
||||
@ -45,18 +45,18 @@ public class Domination extends TeamGame
|
||||
//Stats
|
||||
private HashMap<String, PlayerData> _stats = new HashMap<String, PlayerData>();
|
||||
|
||||
//Scoreboard
|
||||
//Scoreboard
|
||||
private ArrayList<String> _lastScoreboard = new ArrayList<String>();
|
||||
|
||||
//Scores
|
||||
//Scores
|
||||
private int _victoryScore = 15000;
|
||||
private int _redScore = 0;
|
||||
private int _redScore = 0;
|
||||
private int _blueScore = 0;
|
||||
|
||||
public Domination(ArcadeManager manager, GameType type, Kit[] kits)
|
||||
{
|
||||
super(manager, type, kits,
|
||||
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Capture Beacons for Points",
|
||||
|
@ -113,7 +113,7 @@ public class CapturePoint
|
||||
if (!_captured)
|
||||
return;
|
||||
|
||||
Host.AddScore(_owner, 6);
|
||||
Host.AddScore(_owner, 4);
|
||||
}
|
||||
|
||||
private void CaptureUpdate()
|
||||
|
@ -94,7 +94,7 @@ public class DeathTag extends SoloGame
|
||||
_runners.SetName("Runners");
|
||||
|
||||
//Undead Team
|
||||
_chasers = new GameTeam("Chasers", ChatColor.RED, _runners.GetSpawns());
|
||||
_chasers = new GameTeam(this, "Chasers", ChatColor.RED, _runners.GetSpawns());
|
||||
_chasers.SetVisible(false);
|
||||
GetTeamList().add(_chasers);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package nautilus.game.arcade.game.games.dragonescape;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -31,8 +32,10 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.dragonescape.kits.*;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
@ -45,16 +48,16 @@ public class DragonEscapeTeams extends TeamGame
|
||||
|
||||
private Location _dragon;
|
||||
private ArrayList<Location> _waypoints;
|
||||
|
||||
private HashMap<Location, Double> _waypointScore = new HashMap<Location, Double>();
|
||||
|
||||
private DragonEscapeTeamsData _dragonData;
|
||||
|
||||
private Player _winner = null;
|
||||
|
||||
private double _speedMult = 1;
|
||||
|
||||
public DragonEscapeTeams(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.DragonEscape,
|
||||
super(manager, GameType.DragonEscapeTeams,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
@ -115,6 +118,26 @@ public class DragonEscapeTeams extends TeamGame
|
||||
last = best;
|
||||
}
|
||||
|
||||
//Score Waypoints
|
||||
double dist = 0;
|
||||
Location lastLoc = null;
|
||||
for (int i=0 ; i<_waypoints.size() ; i++)
|
||||
{
|
||||
Location newLoc = _waypoints.get(i);
|
||||
|
||||
//First
|
||||
if (lastLoc == null)
|
||||
{
|
||||
_waypointScore.put(newLoc, 0d);
|
||||
lastLoc = newLoc;
|
||||
continue;
|
||||
}
|
||||
|
||||
dist += UtilMath.offset(lastLoc, newLoc);
|
||||
_waypointScore.put(newLoc, dist);
|
||||
lastLoc = newLoc;
|
||||
}
|
||||
|
||||
if (!WorldData.GetDataLocs("GREEN").isEmpty())
|
||||
_speedMult = WorldData.GetDataLocs("GREEN").get(0).getX()/100d;
|
||||
|
||||
@ -171,8 +194,7 @@ public class DragonEscapeTeams extends TeamGame
|
||||
{
|
||||
double playerScore = GetScore(player);
|
||||
|
||||
if (SetScore(player, playerScore))
|
||||
return;
|
||||
SetScore(player, playerScore);
|
||||
|
||||
if (dragonScore > playerScore)
|
||||
player.damage(50);
|
||||
@ -183,8 +205,19 @@ public class DragonEscapeTeams extends TeamGame
|
||||
{
|
||||
return _ranks;
|
||||
}
|
||||
|
||||
public double GetPlayerScore(Player player)
|
||||
{
|
||||
for (DragonScore score : _ranks)
|
||||
{
|
||||
if (score.Player.equals(player))
|
||||
return Math.max(0, score.Score);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean SetScore(Player player, double playerScore)
|
||||
public void SetScore(Player player, double playerScore)
|
||||
{
|
||||
//Rank
|
||||
for (DragonScore score : _ranks)
|
||||
@ -198,7 +231,7 @@ public class DragonEscapeTeams extends TeamGame
|
||||
//Backwards
|
||||
if (preNode - postNode >= 3)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
//Shortcut
|
||||
@ -208,42 +241,37 @@ public class DragonEscapeTeams extends TeamGame
|
||||
{
|
||||
score.Player.damage(500);
|
||||
UtilPlayer.message(player, F.main("Game", "You were killed for trying to cheat!"));
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Finish
|
||||
if (GetWaypointIndex(player.getLocation()) == _waypoints.size() - 1)
|
||||
{
|
||||
//Only if NEAR end.
|
||||
if (UtilMath.offset(player.getLocation(), _waypoints.get(_waypoints.size()-1)) < 3)
|
||||
{
|
||||
_winner = player;
|
||||
this.SetCustomWinLine(player.getName() + " reached the end of the course!");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
score.Score = playerScore;
|
||||
return false;
|
||||
if (playerScore > score.Score)
|
||||
score.Score = playerScore;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_ranks.add(new DragonScore(player, playerScore));
|
||||
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
public double GetScore(Entity ent)
|
||||
{
|
||||
int index = GetWaypointIndex(ent.getLocation());
|
||||
|
||||
double score = 10000 * index;
|
||||
|
||||
score -= UtilMath.offset(ent.getLocation(), _waypoints.get(Math.min(_waypoints.size()-1, index+1)));
|
||||
|
||||
return score;
|
||||
//Not at last waypoint
|
||||
if (index < _waypoints.size() - 1)
|
||||
{
|
||||
double score = _waypointScore.get(_waypoints.get(index + 1));
|
||||
score -= UtilMath.offset(ent.getLocation(), _waypoints.get(index+1));
|
||||
return score;
|
||||
}
|
||||
|
||||
//Finished, max score
|
||||
return _waypointScore.get(_waypoints.get(index));
|
||||
|
||||
}
|
||||
|
||||
public int GetWaypointIndex(Location loc)
|
||||
@ -266,6 +294,43 @@ public class DragonEscapeTeams extends TeamGame
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
public Location GetWaypoint(Location loc)
|
||||
{
|
||||
Location best = null;
|
||||
double bestDist = 0;
|
||||
|
||||
for (int i=0 ; i<_waypoints.size() ; i++)
|
||||
{
|
||||
Location waypoint = _waypoints.get(i);
|
||||
|
||||
double dist = UtilMath.offset(waypoint, loc);
|
||||
|
||||
if (best == null || dist < bestDist)
|
||||
{
|
||||
best = waypoint;
|
||||
bestDist = dist;
|
||||
}
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
public HashMap<GameTeam, Double> GetTeamScores()
|
||||
{
|
||||
HashMap<GameTeam, Double> scores = new HashMap<GameTeam, Double>();
|
||||
|
||||
for (GameTeam team : GetTeamList())
|
||||
{
|
||||
double score = 0;
|
||||
for (Player player : team.GetPlayers(false))
|
||||
score += GetPlayerScore(player);
|
||||
|
||||
scores.put(team, score);
|
||||
}
|
||||
|
||||
return scores;
|
||||
}
|
||||
|
||||
private void SortScores()
|
||||
{
|
||||
@ -282,9 +347,7 @@ public class DragonEscapeTeams extends TeamGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@EventHandler
|
||||
public void ScoreboardUpdate(UpdateEvent event)
|
||||
@ -297,25 +360,43 @@ public class DragonEscapeTeams extends TeamGame
|
||||
GetScoreboard().resetScores(string);
|
||||
_lastScoreboard.clear();
|
||||
|
||||
SortScores();
|
||||
|
||||
//Write New
|
||||
for (int i=0 ; i<_ranks.size() && i<15 ; i++)
|
||||
int i=1;
|
||||
String space = " ";
|
||||
HashMap<GameTeam, Double> scores = GetTeamScores();
|
||||
for (GameTeam team : scores.keySet())
|
||||
{
|
||||
DragonScore score = _ranks.get(i);
|
||||
|
||||
ChatColor col = ChatColor.GREEN;
|
||||
if (!IsAlive(score.Player))
|
||||
col = ChatColor.RED;
|
||||
|
||||
String out = i+1 + " " + col + score.Player.getName();
|
||||
//Time
|
||||
int score = scores.get(team).intValue();
|
||||
|
||||
String out = team.GetColor() + "" + score;
|
||||
|
||||
if (out.length() >= 16)
|
||||
out = out.substring(0, 15);
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(16-i);
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
|
||||
//Team
|
||||
out = team.GetColor() + C.Bold + team.GetName() + " Score";
|
||||
|
||||
if (out.length() >= 16)
|
||||
out = out.substring(0, 15);
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
|
||||
//Space
|
||||
space += " ";
|
||||
out = space;
|
||||
|
||||
if (out.length() >= 16)
|
||||
out = out.substring(0, 15);
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,7 +435,50 @@ public class DragonEscapeTeams extends TeamGame
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
//DO ME XXX
|
||||
ArrayList<GameTeam> teamsAlive = new ArrayList<GameTeam>();
|
||||
|
||||
for (GameTeam team : this.GetTeamList())
|
||||
if (team.GetPlayers(true).size() > 0)
|
||||
teamsAlive.add(team);
|
||||
|
||||
if (teamsAlive.size() <= 0)
|
||||
{
|
||||
//Get Winner
|
||||
GameTeam winner = null;
|
||||
double bestScore = 0;
|
||||
|
||||
HashMap<GameTeam, Double> scores = GetTeamScores();
|
||||
for (GameTeam team : scores.keySet())
|
||||
{
|
||||
if (winner == null || scores.get(team) > bestScore)
|
||||
{
|
||||
winner = team;
|
||||
bestScore = scores.get(team);
|
||||
}
|
||||
}
|
||||
|
||||
//Announce
|
||||
if (winner != null)
|
||||
{
|
||||
AnnounceEnd(winner);
|
||||
}
|
||||
|
||||
for (GameTeam team : GetTeamList())
|
||||
{
|
||||
if (WinnerTeam != null && team.equals(WinnerTeam))
|
||||
{
|
||||
for (Player player : team.GetPlayers(false))
|
||||
AddGems(player, 10, "Winning Team", false);
|
||||
}
|
||||
|
||||
for (Player player : team.GetPlayers(false))
|
||||
if (player.isOnline())
|
||||
AddGems(player, 10, "Participation", false);
|
||||
}
|
||||
|
||||
//End
|
||||
SetState(GameState.End);
|
||||
}
|
||||
}
|
||||
|
||||
public double GetSpeedMult()
|
||||
|
@ -39,7 +39,7 @@ public class Dragons extends SoloGame
|
||||
private HashMap<EnderDragon, DragonData> _dragons = new HashMap<EnderDragon, DragonData>();
|
||||
private ArrayList<Location> _dragonSpawns = new ArrayList<Location>();
|
||||
|
||||
private PerkSparkler _sparkler = null;
|
||||
private PerkSparkler _sparkler = null;
|
||||
|
||||
public Dragons(ArcadeManager manager)
|
||||
{
|
||||
@ -54,7 +54,7 @@ public class Dragons extends SoloGame
|
||||
|
||||
new String[]
|
||||
{
|
||||
"You have angered the Dragons!",
|
||||
"You have angered the Dragons!",
|
||||
"Survive as best you can!!!",
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
@ -230,13 +230,15 @@ public class DragonsTeams extends TeamGame
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
for (GameTeam team : GetTeamList())
|
||||
{
|
||||
if (!_teamScore.containsKey(team))
|
||||
_teamScore.put(team, 0);
|
||||
|
||||
_teamScore.put(team, _teamScore.get(team) + 1);
|
||||
}
|
||||
if (IsLive())
|
||||
for (GameTeam team : GetTeamList())
|
||||
{
|
||||
if (!_teamScore.containsKey(team))
|
||||
_teamScore.put(team, 0);
|
||||
|
||||
if (team.IsTeamAlive())
|
||||
_teamScore.put(team, _teamScore.get(team) + team.GetPlayers(true).size());
|
||||
}
|
||||
|
||||
WriteScoreboard();
|
||||
}
|
||||
@ -248,20 +250,21 @@ public class DragonsTeams extends TeamGame
|
||||
GetScoreboard().resetScores(string);
|
||||
_lastScoreboard.clear();
|
||||
|
||||
int i=0;
|
||||
int i=1;
|
||||
String space = " ";
|
||||
for (GameTeam team : _teamScore.keySet())
|
||||
{
|
||||
//Space
|
||||
space += " ";
|
||||
String out = space;
|
||||
//Time
|
||||
int seconds = _teamScore.get(team);
|
||||
|
||||
String out = team.GetColor() + "" + seconds + " Seconds";
|
||||
|
||||
if (out.length() >= 16)
|
||||
out = out.substring(0, 15);
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
|
||||
//Team
|
||||
out = team.GetColor() + C.Bold + team.GetName() + " Time";
|
||||
@ -273,17 +276,16 @@ public class DragonsTeams extends TeamGame
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
|
||||
//Time
|
||||
int seconds = _teamScore.get(team);
|
||||
|
||||
out = seconds + " Seconds";
|
||||
//Space
|
||||
space += " ";
|
||||
out = space;
|
||||
|
||||
if (out.length() >= 16)
|
||||
out = out.substring(0, 15);
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
GetObjectiveSide().getScore(out).setScore(i++);
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,7 +301,7 @@ public class DragonsTeams extends TeamGame
|
||||
if (team.GetPlayers(true).size() > 0)
|
||||
teamsAlive.add(team);
|
||||
|
||||
if (teamsAlive.size() <= 1)
|
||||
if (teamsAlive.size() <= 0)
|
||||
{
|
||||
//Get Winner
|
||||
GameTeam winner = null;
|
||||
|
@ -98,28 +98,7 @@ public class Draw extends SoloGame
|
||||
|
||||
_words = new String[]
|
||||
{
|
||||
"Bird", "Volcano", "Love", "Dance", "Hair", "Glasses", "Domino", "Dice", "Computer", "Top Hat", "Beard", "Wind", "Rain", "Minecraft",
|
||||
"Push", "Fighting", "Juggle", "Clown", "Miner", "Creeper", "Ghast", "Spider", "Punch", "Roll", "River", "Desert", "Cold", "Pregnant",
|
||||
"Photo", "Quick", "Mario", "Luigi", "Bridge", "Turtle", "Door Knob", "Mineplex", "Binoculars", "Telescope", "Planet", "Mountain Bike",
|
||||
"Moon", "Comet", "Flower", "Squirrel", "Horse Riding", "Chef", "Elephant", "Yoshi", "Shotgun", "Pistol", "James Bond", "Money", "Salt and Pepper",
|
||||
"Truck", "Helicopter", "Hot Air Balloon", "Sprout", "Yelling", "Muscles", "Skinny", "Zombie", "Lava", "Snake", "Motorbike", "Whale",
|
||||
"Boat", "Letterbox", "Window", "Lollipop", "Handcuffs", "Police", "Uppercut", "Windmill", "Eyepatch", "Campfire", "Rainbow", "Storm", "Pikachu",
|
||||
"Charmander", "Tornado", "Crying", "King", "Hobo", "Worm", "Snail", "XBox", "Playstation", "Nintendo", "Duck", "Pull", "Dinosaur", "Alligator",
|
||||
"Ankle", "Angel", "Acorn", "Bread", "Booty", "Bacon", "Crown", "Donut", "Drill", "Crack", "Leash", "Magic", "Wizard", "Igloo", "Plant", "Screw",
|
||||
"Rifle", "Puppy", "Stool", "Stamp", "Letter", "Witch", "Zebra", "Wagon", "Compass", "Watch", "Clock", "Time", "Cyclops", "Coconut", "Hang",
|
||||
"Penguin", "Confused", "Bucket", "Lion", "Rubbish", "Spaceship", "Bowl", "Shark", "Pizza", "Pyramid", "Dress", "Pants", "Shorts", "Boots", "Boy",
|
||||
"Girl", "Math", "Sunglasses", "Frog", "Chair", "Cake", "Grapes", "Kiss", "Snorlax", "Earth", "Spaghetti", "Murder", "Couch", "Family", "Milk",
|
||||
"Blood", "Pig", "Giraffe", "Mouse", "Couch", "Fat", "Chocolate", "Camel", "Cheese", "Beans", "Water", "Chicken", "Cannibal", "Zipper",
|
||||
"Book", "Swimming", "Horse", "Paper", "Toaster", "Television", "Hammer", "Piano", "Sleeping", "Yawn", "Sheep", "Night", "Chest", "Lamp", "Redstone",
|
||||
"Grass", "Plane", "Ocean", "Lake", "Melon", "Pumpkin", "Gift", "Fishing", "Pirate", "Lightning", "Stomach", "Belly Button", "Fishing Rod",
|
||||
"Iron Ore", "Diamonds", "Emeralds", "Nether Portal", "Ender Dragon", "Rabbit", "Harry Potter", "Miley Cyrus", "Torch", "Light", "Battery",
|
||||
"Zombie Pigman", "Telephone", "Tent", "Hand", "Traffic Lights", "Anvil", "Tail", "Umbrella", "Piston", "Skeleton", "Spikes", "Bridge", "Bomb",
|
||||
"Spoon", "Rainbow", "Staircase", "Poop", "Dragon", "Fire", "Apple", "Shoe", "Squid", "Cookie", "Tooth", "Camera", "Sock", "Monkey",
|
||||
"Unicorn", "Smile", "Pool", "Rabbit", "Cupcake", "Pancake", "Princess", "Castle", "Flag", "Planet", "Stars", "Camp Fire", "Rose",
|
||||
"Spray", "Pencil", "Torch", "Ice Cream", "Toilet", "Moose", "Bear", "Beer", "Batman", "Sun Glasses", "Eggs", "Teapot",
|
||||
"Golf Club", "Tennis Racket", "Shield", "Crab", "Pot of Gold", "Cactus", "Television", "Pumpkin Pie", "Chimney", "Stable", "Nether", "Wither",
|
||||
"Beach", "Stop Sign", "Chestplate", "Pokeball", "Christmas Tree", "Present", "Snowflake", "Laptop", "Superman", "Football", "Basketball", "Creeper",
|
||||
"Tetris", "Jump", "Ninja", "Baby", "Troll Face", "Grim Reaper", "Temple",
|
||||
"Bird", "Volcano", "Love", "Dance", "Hair", "Glasses", "Domino", "Dice", "Computer", "Top Hat", "Beard", "Wind", "Rain", "Minecraft", "Push", "Fighting", "Juggle", "Clown", "Miner", "Creeper", "Ghast", "Spider", "Punch", "Roll", "River", "Desert", "Cold", "Pregnant", "Photo", "Quick", "Mario", "Luigi", "Bridge", "Turtle", "Door Knob", "Mineplex", "Binoculars", "Telescope", "Planet", "Mountain Bike", "Moon", "Comet", "Flower", "Squirrel", "Horse Riding", "Chef", "Elephant", "Yoshi", "Shotgun", "Pistol", "James Bond", "Money", "Salt and Pepper", "Truck", "Helicopter", "Hot Air Balloon", "Sprout", "Yelling", "Muscles", "Skinny", "Zombie", "Lava", "Snake", "Motorbike", "Whale", "Boat", "Letterbox", "Window", "Lollipop", "Handcuffs", "Police", "Uppercut", "Windmill", "Eyepatch", "Campfire", "Rainbow", "Storm", "Pikachu", "Charmander", "Tornado", "Crying", "King", "Hobo", "Worm", "Snail", "XBox", "Playstation", "Nintendo", "Duck", "Pull", "Dinosaur", "Alligator", "Ankle", "Angel", "Acorn", "Bread", "Booty", "Bacon", "Crown", "Donut", "Drill", "Crack", "Leash", "Magic", "Wizard", "Igloo", "Plant", "Screw", "Rifle", "Puppy", "Stool", "Stamp", "Letter", "Witch", "Zebra", "Wagon", "Compass", "Watch", "Clock", "Time", "Cyclops", "Coconut", "Hang", "Penguin", "Confused", "Bucket", "Lion", "Rubbish", "Spaceship", "Bowl", "Shark", "Pizza", "Pyramid", "Dress", "Pants", "Shorts", "Boots", "Boy", "Girl", "Math", "Sunglasses", "Frog", "Chair", "Cake", "Grapes", "Kiss", "Snorlax", "Earth", "Spaghetti", "Couch", "Family", "Milk", "Blood", "Pig", "Giraffe", "Mouse", "Couch", "Fat", "Chocolate", "Camel", "Cheese", "Beans", "Water", "Chicken", "Cannibal", "Zipper", "Book", "Swimming", "Horse", "Paper", "Toaster", "Television", "Hammer", "Piano", "Sleeping", "Yawn", "Sheep", "Night", "Chest", "Lamp", "Redstone", "Grass", "Plane", "Ocean", "Lake", "Melon", "Pumpkin", "Gift", "Fishing", "Pirate", "Lightning", "Stomach", "Belly Button", "Fishing Rod", "Iron Ore", "Diamonds", "Emeralds", "Nether Portal", "Ender Dragon", "Rabbit", "Harry Potter", "Torch", "Light", "Battery", "Zombie Pigman", "Telephone", "Tent", "Hand", "Traffic Lights", "Anvil", "Tail", "Umbrella", "Piston", "Skeleton", "Spikes", "Bridge", "Bomb", "Spoon", "Rainbow", "Staircase", "Poop", "Dragon", "Fire", "Apple", "Shoe", "Squid", "Cookie", "Tooth", "Camera", "Sock", "Monkey", "Unicorn", "Smile", "Pool", "Rabbit", "Cupcake", "Pancake", "Princess", "Castle", "Flag", "Planet", "Stars", "Camp Fire", "Rose", "Spray", "Pencil", "Ice Cream", "Toilet", "Moose", "Bear", "Beer", "Batman", "Eggs", "Teapot", "Golf Club", "Tennis Racket", "Shield", "Crab", "Pot of Gold", "Cactus", "Television", "Pumpkin Pie", "Chimney", "Stable", "Nether", "Wither", "Beach", "Stop Sign", "Chestplate", "Pokeball", "Christmas Tree", "Present", "Snowflake", "Laptop", "Superman", "Football", "Basketball", "Creeper", "Tetris", "Jump", "Ninja", "Baby", "Troll Face", "Grim Reaper", "Temple", "Explosion", "Vomit", "Ants", "Barn", "Burn", "Baggage", "Frisbee", "Iceberg", "Sleeping", "Dream", "Snorlax", "Balloons", "Elevator", "Alligator", "Bikini", "Butterfly", "Bumblebee", "Pizza", "Jellyfish", "Sideburns", "Speedboat", "Treehouse", "Water Gun", "Drink", "Hook", "Dance", "Fall", "Summer", "Autumn", "Spring", "Winter", "Night Time", "Galaxy", "Sunrise", "Sunset", "Picnic", "Snowflake", "Holding Hands", "America", "Laptop", "Anvil", "Bagel", "Bench", "Cigar", "Darts", "Muffin", "Queen", "Wheat", "Dolphin", "Scarf", "Swing", "Thumb", "Tomato", "Alcohol", "Armor", "Alien", "Beans", "Cheek", "Phone", "Keyboard", "Orange", "Calculator", "Paper", "Desk", "Disco", "Elbow", "Drool", "Giant", "Golem", "Grave", "Llama", "Moose", "Party", "Panda", "Plumber", "Salsa", "Salad", "Skunk", "Skull", "Stump", "Sugar", "Ruler", "Bookcase", "Hamster", "Soup", "Teapot", "Towel", "Waist", "Archer", "Anchor", "Bamboo", "Branch", "Booger", "Carrot", "Cereal", "Coffee", "Wolf", "Crayon", "Finger", "Forest", "Hotdog", "Burger", "Obsidian", "Pillow", "Swing", "YouTube", "Farm", "Rain", "Cloud", "Frozen", "Garbage", "Music", "Twitter", "Facebook", "Santa Hat", "Rope", "Neck", "Sponge", "Sushi", "Noodles", "Soup", "Tower", "Berry", "Capture", "Prison", "Robot", "Trash", "School", "Skype", "Snowman", "Crowd", "Bank", "Mudkip", "Joker", "Lizard", "Tiger", "Royal", "Erupt", "Wizard", "Stain", "Cinema", "Notebook", "Blanket", "Paint", "Guard", "Astronaut" , "Slime" , "Mansion" , "Radar" , "Thorn" , "Tears" , "Tiny" , "Candy" , "Pepsi" , "Flint" , "Draw My Thing" , "Rice" , "Shout" , "Prize" , "Skirt" , "Thief" , "Syrup" , "Kirby" , "Brush" , "Violin",
|
||||
};
|
||||
}
|
||||
|
||||
@ -154,7 +133,7 @@ public class Draw extends SoloGame
|
||||
return;
|
||||
|
||||
//Undead Team
|
||||
_drawers = new GameTeam("Drawer", ChatColor.RED, WorldData.GetDataLocs("RED"));
|
||||
_drawers = new GameTeam(this, "Drawer", ChatColor.RED, WorldData.GetDataLocs("RED"));
|
||||
GetTeamList().add(_drawers);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ public class Halloween extends SoloGame
|
||||
if (event.GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
GetTeamList().add(new GameTeam("Pumpkin King", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
GetTeamList().add(new GameTeam(this, "Pumpkin King", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
|
@ -133,7 +133,7 @@ public class MilkCow extends SoloGame
|
||||
_farmers.SetName("Farmers");
|
||||
|
||||
//Undead Team
|
||||
_cows = new GameTeam("Cow", ChatColor.RED, _farmers.GetSpawns());
|
||||
_cows = new GameTeam(this, "Cow", ChatColor.RED, _farmers.GetSpawns());
|
||||
GetTeamList().add(_cows);
|
||||
|
||||
RestrictKits();
|
||||
|
@ -35,6 +35,8 @@ public class QuiverTeams extends TeamGame
|
||||
private ArrayList<String> _lastScoreboard = new ArrayList<String>();
|
||||
private HashMap<Player, Long> _deathTime = new HashMap<Player, Long>();
|
||||
|
||||
private int _reqKills = 100;
|
||||
|
||||
public QuiverTeams(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.QuiverTeams,
|
||||
@ -43,7 +45,6 @@ public class QuiverTeams extends TeamGame
|
||||
{
|
||||
new KitLeaper(manager),
|
||||
new KitBrawler(manager),
|
||||
new KitElementalist(manager),
|
||||
},
|
||||
|
||||
new String[]
|
||||
@ -76,7 +77,7 @@ public class QuiverTeams extends TeamGame
|
||||
player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f);
|
||||
}
|
||||
|
||||
GetObjectiveSide().setDisplayName(C.cWhite + C.Bold + "First to " + C.cGold + C.Bold + "20 Kills");
|
||||
GetObjectiveSide().setDisplayName(C.cWhite + C.Bold + "First to " + C.cGold + C.Bold + _reqKills +" Kills");
|
||||
|
||||
for (GameTeam team : GetTeamList())
|
||||
{
|
||||
@ -196,6 +197,9 @@ public class QuiverTeams extends TeamGame
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
if (kills == 0)
|
||||
kills = -1;
|
||||
|
||||
GetObjectiveSide().getScore(out).setScore(kills);
|
||||
}
|
||||
}
|
||||
@ -216,7 +220,7 @@ public class QuiverTeams extends TeamGame
|
||||
|
||||
for (GameTeam team : _teamKills.keySet())
|
||||
{
|
||||
if (_teamKills.get(team) >= 100)
|
||||
if (_teamKills.get(team) >= _reqKills)
|
||||
{
|
||||
winner = team;
|
||||
break;
|
||||
|
@ -31,7 +31,7 @@ public class SpleefTeams extends TeamGame
|
||||
{
|
||||
public SpleefTeams(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.Spleef,
|
||||
super(manager, GameType.SpleefTeams,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
|
@ -1355,7 +1355,7 @@ public class UHC extends TeamGame
|
||||
|
||||
if (endTeam == null)
|
||||
{
|
||||
endTeam = new GameTeam("Post Game", ChatColor.GRAY, GetTeamList().get(0).GetSpawns());
|
||||
endTeam = new GameTeam(this, "Post Game", ChatColor.GRAY, GetTeamList().get(0).GetSpawns());
|
||||
AddTeam(endTeam);
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ public class ZombieSurvival extends SoloGame
|
||||
_survivors.SetName("Survivors");
|
||||
|
||||
//Undead Team
|
||||
_undead = new GameTeam("Undead", ChatColor.RED, WorldData.GetDataLocs("RED"));
|
||||
_undead = new GameTeam(this, "Undead", ChatColor.RED, WorldData.GetDataLocs("RED"));
|
||||
GetTeamList().add(_undead);
|
||||
|
||||
RestrictKits();
|
||||
|
@ -309,7 +309,7 @@ public class GameManager implements Listener
|
||||
if (game.GetTeamList().size() == 12) color = ChatColor.DARK_RED;
|
||||
}
|
||||
|
||||
GameTeam newTeam = new GameTeam(team, color, game.WorldData.SpawnLocs.get(team));
|
||||
GameTeam newTeam = new GameTeam(game, team, color, game.WorldData.SpawnLocs.get(team));
|
||||
game.AddTeam(newTeam);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user