Added default ChatStat for all games to prevent my server from dying when testing
This commit is contained in:
parent
02ff8bdbdb
commit
88c53bf464
@ -109,7 +109,7 @@ import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.event.EventModule;
|
||||
import nautilus.game.arcade.game.games.uhc.UHC;
|
||||
import nautilus.game.arcade.managers.GameAchievementManager;
|
||||
import nautilus.game.arcade.managers.GameChatManager;
|
||||
import nautilus.game.arcade.managers.chat.GameChatManager;
|
||||
import nautilus.game.arcade.managers.GameCreationManager;
|
||||
import nautilus.game.arcade.managers.GameFlagManager;
|
||||
import nautilus.game.arcade.managers.GameGemManager;
|
||||
|
@ -273,9 +273,9 @@ public abstract class Game implements Listener
|
||||
public boolean PlaySoundGameStart = true;
|
||||
|
||||
// Chat Stats
|
||||
public final ChatStatData Kills = new ChatStatData(new String[]{"Kills"}, "Kills", true);
|
||||
public final ChatStatData Deaths = new ChatStatData(new String[]{"Deaths"}, "Deaths", true);
|
||||
public final ChatStatData KDRatio = new ChatStatData(new String[]{"KDRatio"}, "KD-Ratio", true);
|
||||
public final ChatStatData Kills = new ChatStatData("Kills", "Kills", true);
|
||||
public final ChatStatData Deaths = new ChatStatData("Deaths", "Deaths", true);
|
||||
public final ChatStatData KDRatio = new ChatStatData("KDRatio", "KD-Ratio", true);
|
||||
|
||||
// Gems
|
||||
public double GemMultiplier = 1;
|
||||
@ -1426,6 +1426,11 @@ public abstract class Game implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
public void registerChatStats(ChatStatData... stats)
|
||||
{
|
||||
Manager.getGameChatManager().setGameChatStats(stats);
|
||||
}
|
||||
|
||||
public Collection<StatTracker<? extends Game>> getStatTrackers()
|
||||
{
|
||||
return _statTrackers;
|
||||
|
@ -39,7 +39,7 @@ public class BaconBrawl extends SoloGame
|
||||
HungerSet = 20;
|
||||
PrepareFreeze = false;
|
||||
|
||||
Manager.getGameChatManager().setGameChatStats(Kills, Deaths);
|
||||
registerChatStats(Kills);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -58,6 +58,8 @@ public class Barbarians extends SoloGame
|
||||
this.BlockBreakAllow.add(134);
|
||||
this.BlockBreakAllow.add(135);
|
||||
this.BlockBreakAllow.add(136);
|
||||
|
||||
registerChatStats(Kills);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -58,6 +58,8 @@ public class BossBattles extends TeamGame
|
||||
HungerSet = 20;
|
||||
CreatureAllowOverride = true;
|
||||
PrepareFreeze = false;
|
||||
|
||||
registerChatStats(Kills);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -35,6 +35,8 @@ public class BouncyBalls extends SoloGame
|
||||
});
|
||||
|
||||
this.HungerSet = 20;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -233,6 +233,8 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
new KillFastStatTracker(this, 4, 10, "Rampage"),
|
||||
new DeathBomberStatTracker(this, 5)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -215,6 +215,8 @@ public class Build extends SoloGame
|
||||
_mobShop = new MobShop(getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
|
||||
_optionsShop = new OptionsShop(this, getArcadeManager(), getArcadeManager().GetClients(), getArcadeManager().GetDonation());
|
||||
_shopItem = ItemStackFactory.Instance.CreateStack(Material.DIAMOND, (byte) 0, 1, C.cGreen + "Options");
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -70,6 +70,8 @@ public class Cards extends SoloGame
|
||||
this.PrepareFreeze = false;
|
||||
|
||||
_cardFactory = new CardFactory();
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -219,6 +219,8 @@ public class CastleSiege extends TeamGame
|
||||
new TeamDeathsStatTracker(this),
|
||||
new TeamKillsStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,6 +87,8 @@ public class ChampionsCTF extends CaptureTheFlag
|
||||
new SpecialWinStatTracker(this, "SpecialWin")
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
|
||||
new ChampionsFixes(this);
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,8 @@ public class ChampionsDominate extends Domination
|
||||
new SeismicSlamStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
|
||||
new ChampionsFixes(this);
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,8 @@ public class ChampionsTDM extends TeamDeathmatch
|
||||
new SeismicSlamStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
|
||||
new ChampionsFixes(this);
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,8 @@ public class Christmas extends SoloGame
|
||||
HungerSet = 20;
|
||||
WorldTimeSet = 2000;
|
||||
PrepareFreeze = false;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
//parse 129 19 47 48 103 86 137 56 22 45 121 14 15 16 87 88 89 153 173 172 162
|
||||
|
@ -73,6 +73,8 @@ public class DeathTag extends SoloGame
|
||||
this.PrepareFreeze = false;
|
||||
|
||||
registerStatTrackers(new ComeAtMeBroStatTracker(this));
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -120,6 +120,8 @@ public class DragonEscape extends SoloGame
|
||||
new ParalympicsStatTracker(this),
|
||||
new WinMapStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,6 +70,8 @@ public class Dragons extends SoloGame
|
||||
registerStatTrackers(
|
||||
new SparklezStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,6 +135,8 @@ public class Draw extends SoloGame
|
||||
new PureLuckStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
|
||||
Manager.GetChat().setThreeSecondDelay(false);
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ public class Evolution extends SoloGame
|
||||
new KillsWhileEvolvingTracker(this)
|
||||
);
|
||||
|
||||
Manager.getGameChatManager().setGameChatStats(Kills, Deaths);
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
public EvolveManager getEvolve()
|
||||
|
@ -120,6 +120,8 @@ public class Gladiators extends SoloGame
|
||||
new SwiftKillTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
|
||||
_playerArenas = new HashMap<>();
|
||||
|
||||
_roundState = RoundState.WAITING;
|
||||
|
@ -115,6 +115,8 @@ public class Gravity extends SoloGame
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.WorldBoundaryKill = false;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,6 +135,8 @@ public class Halloween extends SoloGame
|
||||
this.WorldBoundaryKill = false;
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -341,8 +341,15 @@ public class HideSeek extends TeamGame
|
||||
Manager.GetExplosion().SetTNTSpread(false);
|
||||
Manager.getCosmeticManager().setHideParticles(true);
|
||||
|
||||
registerStatTrackers(new HunterKillerStatTracker(this), new MeowStatTracker(this), new HunterKillerStatTracker(this),
|
||||
new HunterOfTheYearStatTracker(this), new BadHiderStatTracker(this));
|
||||
registerStatTrackers(
|
||||
new HunterKillerStatTracker(this),
|
||||
new MeowStatTracker(this),
|
||||
new HunterKillerStatTracker(this),
|
||||
new HunterOfTheYearStatTracker(this),
|
||||
new BadHiderStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -57,6 +57,8 @@ public class HoleInTheWall extends SoloGame
|
||||
DamageFall = false;
|
||||
HungerSet = 20;
|
||||
WorldTimeSet = 8000;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
private ArrayList<Entry<Integer, Integer>> getWall()
|
||||
|
@ -35,6 +35,8 @@ public class Horse extends TeamGame
|
||||
"",
|
||||
"Teams swap after game is over"
|
||||
});
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,19 +74,23 @@ public class BombLobbers extends TeamGame implements IThrown
|
||||
@SuppressWarnings("unchecked")
|
||||
public BombLobbers(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.Lobbers, new Kit[]
|
||||
super(manager, GameType.Lobbers,
|
||||
new Kit[]
|
||||
{
|
||||
new KitJumper(manager),
|
||||
new KitArmorer(manager),
|
||||
new KitPitcher(manager),
|
||||
new KitWaller(manager)
|
||||
}, new String[]
|
||||
},
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Fight against your enemies using",
|
||||
"the power of explosives!",
|
||||
"Left click TNT to throw at your enemy.",
|
||||
"Last team alive wins!"
|
||||
});
|
||||
|
||||
DamageFall = true;
|
||||
DamageEvP = true;
|
||||
|
||||
@ -110,7 +114,15 @@ public class BombLobbers extends TeamGame implements IThrown
|
||||
|
||||
WorldTimeSet = 6000;
|
||||
|
||||
registerStatTrackers(new Tracker6Kill(this), new TrackerBlastProof(this), new TrackerNoDamage(this), new TrackerTNTThrown(this), new TrackerDirectHit(this));
|
||||
registerStatTrackers(
|
||||
new Tracker6Kill(this),
|
||||
new TrackerBlastProof(this),
|
||||
new TrackerNoDamage(this),
|
||||
new TrackerTNTThrown(this),
|
||||
new TrackerDirectHit(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -58,7 +58,11 @@ public class Micro extends TeamGame
|
||||
this.BlockBreak = true;
|
||||
this.BlockPlace = true;
|
||||
|
||||
registerStatTrackers(new KillsWithinGameStatTracker(this, 8, "Annihilation"));
|
||||
registerStatTrackers(
|
||||
new KillsWithinGameStatTracker(this, 8, "Annihilation")
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,6 +97,8 @@ public class MilkCow extends SoloGame
|
||||
|
||||
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("Milk", "dummy");
|
||||
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -310,14 +310,14 @@ public class MineStrike extends TeamGame
|
||||
new TeamKillsStatTracker(this)
|
||||
);
|
||||
|
||||
Manager.getGameChatManager().setGameChatStats(
|
||||
registerChatStats(
|
||||
Kills,
|
||||
new ChatStatData(new String[]{"BoomHeadshot"}, "Headshots", true),
|
||||
new ChatStatData("BoomHeadshot", "Headshots", true),
|
||||
new ChatStatData().blankLine(),
|
||||
Deaths,
|
||||
KDRatio,
|
||||
new ChatStatData().blankLine(),
|
||||
new ChatStatData(new String[]{null}, C.cGray + C.Italics + "Testing stage", false)
|
||||
new ChatStatData().plainText(C.cGray + C.Italics + "Testing stage")
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,8 @@ public class MineWare extends SoloGame
|
||||
Manager.GetCreature().SetDisableCustomDrops(true);
|
||||
|
||||
PopulateOrders();
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,6 +31,8 @@ public class Moba extends TeamGame
|
||||
this.DeathSpectateSecs = 8;
|
||||
|
||||
this.HungerSet = 20;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,6 +63,8 @@ public class MonsterLeague extends TeamGame
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
//Supports anywhere from 2-4 teams on a map
|
||||
|
@ -101,6 +101,8 @@ public class MonsterMaze extends SoloGame
|
||||
new SurvivePast10thSafepadTracker(this)
|
||||
);
|
||||
//_maze = new SnowmanMaze(this, WorldData.GetDataLocs("GRAY")/*, WorldData.GetCustomLocs("103")*/);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
public Maze getMaze()
|
||||
|
@ -88,6 +88,8 @@ public class OldMineWare extends SoloGame
|
||||
InventoryClick = true;
|
||||
|
||||
PopulateOrders();
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,6 +114,8 @@ public class Paintball extends TeamGame
|
||||
new WinFastStatTracker(this, 30, "Speedrunner"),
|
||||
new LastStandStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -92,6 +92,8 @@ public class Quiver extends SoloGame
|
||||
new SharpShooterStatTracker(this),
|
||||
new WinWithoutBowStatTracker(this, "WhatsABow")
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
@ -65,6 +65,8 @@ public class QuiverTeams extends TeamGame
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
@ -66,6 +66,8 @@ public class Runner extends SoloGame implements IThrown
|
||||
this.PrepareFreeze = false;
|
||||
|
||||
registerStatTrackers(new DistanceTraveledStatTracker(this, "MarathonRunner"));
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -72,6 +72,8 @@ public class SearchAndDestroy extends TeamGame
|
||||
DamageSelf = false;
|
||||
|
||||
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
public ArrayList<TeamBomb> getBombs()
|
||||
|
@ -155,6 +155,8 @@ public class SheepGame extends TeamGame
|
||||
new SheepDropStatTracker(this),
|
||||
new WinWithSheepStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,6 +36,8 @@ public class SoloSkywars extends Skywars
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
|
||||
registerChatStats();
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -53,6 +53,8 @@ public class TeamSkywars extends Skywars
|
||||
this.DamageTeamSelf = false;
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -32,6 +32,8 @@ public class SoloSuperSmash extends SuperSmash
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -55,6 +55,8 @@ public class SuperSmashDominate extends Domination
|
||||
new KitMagmaCube(manager),
|
||||
|
||||
});
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
|
@ -53,6 +53,8 @@ public class TeamSuperSmash extends SuperSmash
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -157,6 +157,8 @@ public class Snake extends SoloGame
|
||||
new ChooChooStatTracker(this),
|
||||
new SlimySheepStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -92,6 +92,8 @@ public class SneakyAssassins extends SoloGame
|
||||
new RevealStatTracker(this, "ISeeYou"),
|
||||
_killEntityStatTracker
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -105,6 +105,8 @@ public class SnowFight extends TeamGame
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
registerChatStats();
|
||||
|
||||
// this.WorldWeatherEnabled = true;
|
||||
// this.WorldTimeSet = 4000;
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ public class Spleef extends SoloGame
|
||||
this.PrepareFreeze = false;
|
||||
|
||||
registerStatTrackers(new SpleefBlockDestroyStatTracker(this));
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -59,6 +59,8 @@ public class SpleefTeams extends TeamGame
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -50,6 +50,8 @@ public class SquidShooter extends SoloGame
|
||||
this.PrepareFreeze = false;
|
||||
this.CompassEnabled = true;
|
||||
this.KitRegisterState = GameState.Prepare;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
@EventHandler
|
||||
public void Death(CombatDeathEvent event)
|
||||
|
@ -54,6 +54,8 @@ public class Stacker extends SoloGame implements IThrown
|
||||
"Players lose 5 stacked animals if they get hit.",
|
||||
"First to stack 16 high wins!"
|
||||
});
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -40,6 +40,8 @@ public class SoloSurvivalGames extends SurvivalGames
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
|
||||
registerChatStats();
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -255,6 +255,8 @@ public class SurvivalGamesTeams extends TeamGame
|
||||
//Tournament
|
||||
if (Manager.IsTournamentServer())
|
||||
QuitOut = false;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,6 +60,8 @@ public class TeamSurvivalGames extends SurvivalGames
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
|
||||
registerChatStats();
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -75,6 +75,8 @@ public class Tug extends TeamGame
|
||||
this.DeathOut = false;
|
||||
|
||||
this.DeathSpectateSecs = 20;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -153,6 +153,8 @@ public class TurfForts extends TeamGame
|
||||
new BehindEnemyLinesStatTracker(this),
|
||||
new TheComebackStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -168,6 +168,8 @@ public class TypeWars extends TeamGame
|
||||
new TimeInGameTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
|
||||
manager.GetCreature().SetDisableCustomDrops(true);
|
||||
manager.GetChat().setThreeSecondDelay(false);
|
||||
}
|
||||
|
@ -207,6 +207,8 @@ public class UHC extends TeamGame
|
||||
|
||||
_createTime = System.currentTimeMillis();
|
||||
_serverTime = Utility.currentTimeMillis();
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -148,6 +148,8 @@ public class WitherGame extends TeamGame implements IBlockRestorer
|
||||
new TeamDeathsStatTracker(this),
|
||||
new TeamKillsStatTracker(this)
|
||||
);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -166,6 +166,8 @@ public class Wizards extends SoloGame
|
||||
SoupEnabled = false;
|
||||
DamageTeamSelf = true;
|
||||
|
||||
registerChatStats();
|
||||
|
||||
Manager.getCosmeticManager().setHideParticles(true);
|
||||
// Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);
|
||||
|
||||
|
@ -71,6 +71,8 @@ public class ZombieSurvival extends SoloGame
|
||||
this.HungerSet = 20;
|
||||
|
||||
this.CompassEnabled = true;
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,13 +1,11 @@
|
||||
package nautilus.game.arcade.managers.chat;
|
||||
|
||||
import mineplex.core.chat.Chat;
|
||||
|
||||
/**
|
||||
* Created by TeddyDev on 10/01/2016.
|
||||
*/
|
||||
public class ChatStatData
|
||||
{
|
||||
private String[] _stat;
|
||||
private String _stat;
|
||||
private String _display;
|
||||
private boolean _isValue;
|
||||
|
||||
@ -16,7 +14,7 @@ public class ChatStatData
|
||||
|
||||
}
|
||||
|
||||
public ChatStatData(String[] stat, String display, boolean isValue)
|
||||
public ChatStatData(String stat, String display, boolean isValue)
|
||||
{
|
||||
_stat = stat;
|
||||
_display = display;
|
||||
@ -25,14 +23,23 @@ public class ChatStatData
|
||||
|
||||
public ChatStatData blankLine()
|
||||
{
|
||||
_stat = new String[]{null};
|
||||
_stat = null;
|
||||
_display = " ";
|
||||
_isValue = false;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public String[] getStat()
|
||||
public ChatStatData plainText(String text)
|
||||
{
|
||||
_stat = null;
|
||||
_display = text;
|
||||
_isValue = false;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStat()
|
||||
{
|
||||
return _stat;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.managers;
|
||||
package nautilus.game.arcade.managers.chat;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.AbstractMap;
|
||||
@ -269,7 +269,6 @@ public class GameChatManager implements Listener
|
||||
_chatStats = new LinkedList<ChatStatData>();
|
||||
for(ChatStatData chatStat : stats)
|
||||
{
|
||||
System.out.println(chatStat.getStat());
|
||||
_chatStats.add(chatStat);
|
||||
}
|
||||
}
|
||||
@ -294,7 +293,7 @@ public class GameChatManager implements Listener
|
||||
}
|
||||
|
||||
ChatStatData chatStatData = hoverText.get(i);
|
||||
String display = (chatStatData.getDisplay() == null ? chatStatData.getStat()[0] : chatStatData.getDisplay());
|
||||
String display = (chatStatData.getDisplay() == null ? chatStatData.getStat() : chatStatData.getDisplay());
|
||||
|
||||
if(!chatStatData.isValue())
|
||||
{
|
||||
@ -302,7 +301,7 @@ public class GameChatManager implements Listener
|
||||
continue;
|
||||
}
|
||||
|
||||
if (chatStatData.getStat()[0].equalsIgnoreCase("kdratio"))
|
||||
if (chatStatData.getStat().equalsIgnoreCase("kdratio"))
|
||||
{
|
||||
int kills;
|
||||
int deaths;
|
||||
@ -321,9 +320,9 @@ public class GameChatManager implements Listener
|
||||
continue;
|
||||
}
|
||||
|
||||
if (game.GetStats().get(player).containsKey(gameName + "." + chatStatData.getStat()[0]))
|
||||
if (game.GetStats().get(player).containsKey(gameName + "." + chatStatData.getStat()))
|
||||
{
|
||||
temp.add(new AbstractMap.SimpleEntry<String, String>(display + ": ", (game.GetStats().get(player).get(gameName + "." + chatStatData.getStat()[0]).toString())));
|
||||
temp.add(new AbstractMap.SimpleEntry<String, String>(display + ": ", (game.GetStats().get(player).get(gameName + "." + chatStatData.getStat()).toString())));
|
||||
}
|
||||
else
|
||||
{
|
Loading…
Reference in New Issue
Block a user