Merge branch 'feature/hoverable-chat' of http://dev.mineplex.com:7990/scm/min/mineplex into rankdescriptions

# Conflicts:
#	Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/typewars/TypeWars.java
#	Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameChatManager.java
This commit is contained in:
Teddy 2016-01-27 19:42:11 +00:00
commit 70be135a40
68 changed files with 2532 additions and 95 deletions

View File

@ -82,7 +82,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;
@ -171,6 +171,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
private GameTournamentManager _gameTournamentManager;
private GameWorldManager _gameWorldManager;
private GameHostManager _gameHostManager;
private GameChatManager _gameChatManager;
private ServerStatusManager _serverStatusManager;
private InventoryManager _inventoryManager;
private CosmeticManager _cosmeticManager;
@ -275,7 +276,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
_arcadeShop = new ArcadeShop(this, clientManager, donationManager);
// Managers
new GameChatManager(this);
_gameChatManager = new GameChatManager(this);
_gameCreationManager = new GameCreationManager(this);
_gameGemManager = new GameGemManager(this);
_gameManager = new GameManager(this);
@ -349,6 +350,11 @@ public class ArcadeManager extends MiniPlugin implements IRelation
addCommand(new RequiredRankCommand(this));
}
public GameChatManager getGameChatManager()
{
return _gameChatManager;
}
public GameServerConfig GetServerConfig()
{
return _serverConfig;

View File

@ -74,6 +74,7 @@ import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.managers.GameLobbyManager;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.scoreboard.GameScoreboard;
import nautilus.game.arcade.stats.AssistsStatTracker;
import nautilus.game.arcade.stats.DamageDealtStatTracker;
@ -271,6 +272,21 @@ public abstract class Game implements Listener
public long PrepareTime = 9000;
public boolean PlaySoundGameStart = true;
// Chat Stats
public final ChatStatData Kills = new ChatStatData("Kills", "Kills", true);
public final ChatStatData Assists = new ChatStatData("Assists", "Assists", true);
public final ChatStatData DamageDealt = new ChatStatData("Damage Dealt", "Damage Dealt", true);
public final ChatStatData DamageTaken = new ChatStatData("Damage Taken", "Damage Taken", true);
public final ChatStatData DamageTakenPVP = new ChatStatData("Damage Taken PvP", "Damage Taken", true);
public final ChatStatData Deaths = new ChatStatData("Deaths", "Deaths", true);
public final ChatStatData ExpEarned = new ChatStatData("ExpEarned", "Exp Earned", true);
public final ChatStatData GamesPlayed = new ChatStatData("GamesPlayed", "Games Played", true);
public final ChatStatData GemsEarned = new ChatStatData("GemsEarned", "Gems Earned", true);
public final ChatStatData Losses = new ChatStatData("Losses", "Losses", true);
public final ChatStatData Wins = new ChatStatData("Wins", "Wins", true);
public final ChatStatData KDRatio = new ChatStatData("KDRatio", "KD-Ratio", true);
public final ChatStatData BlankLine = new ChatStatData().blankLine();
// Gems
public double GemMultiplier = 1;
public boolean GemHunterEnabled = true;
@ -1420,6 +1436,11 @@ public abstract class Game implements Listener
}
}
public void registerChatStats(ChatStatData... stats)
{
Manager.getGameChatManager().setGameChatStats(stats);
}
public Collection<StatTracker<? extends Game>> getStatTrackers()
{
return _statTrackers;

View File

@ -38,6 +38,16 @@ public class BaconBrawl extends SoloGame
DamageTeamSelf = true;
HungerSet = 20;
PrepareFreeze = false;
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken
);
}
@EventHandler

View File

@ -15,6 +15,8 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.barbarians.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.BlockBreakStatTracker;
public class Barbarians extends SoloGame
{
@ -58,6 +60,22 @@ public class Barbarians extends SoloGame
this.BlockBreakAllow.add(134);
this.BlockBreakAllow.add(135);
this.BlockBreakAllow.add(136);
registerStatTrackers(
new BlockBreakStatTracker(this, true)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken,
BlankLine,
new ChatStatData("BlockBreak", "Blocks Broken", true)
);
}
@EventHandler

View File

@ -58,6 +58,9 @@ public class BossBattles extends TeamGame
HungerSet = 20;
CreatureAllowOverride = true;
PrepareFreeze = false;
// registerChatStats(Kills);
// Game giving constant errors when loading.
}
@EventHandler

View File

@ -15,6 +15,7 @@ import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.bouncyballs.kits.*;
import nautilus.game.arcade.game.games.bouncyballs.Ball;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
public class BouncyBalls extends SoloGame
{
@ -35,6 +36,8 @@ public class BouncyBalls extends SoloGame
});
this.HungerSet = 20;
// registerChatStats();
}
@EventHandler

View File

@ -233,6 +233,16 @@ public class Bridge extends TeamGame implements OreObsfucation
new KillFastStatTracker(this, 4, 10, "Rampage"),
new DeathBomberStatTracker(this, 5)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageTaken
);
}
@EventHandler

View File

@ -37,6 +37,9 @@ import nautilus.game.arcade.game.games.build.gui.MobShop;
import nautilus.game.arcade.game.games.build.gui.OptionsShop;
import nautilus.game.arcade.game.games.build.kits.KitBuilder;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.BlockBreakStatTracker;
import nautilus.game.arcade.stats.BlockPlaceStatTracker;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
@ -216,6 +219,16 @@ 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");
registerStatTrackers(
new BlockBreakStatTracker(this, false),
new BlockPlaceStatTracker(this, new Material[]{})
);
registerChatStats(
new ChatStatData("BlocksPlaced", "Blocks Placed", true),
new ChatStatData("BlocksBroken", "Blocks Broken", true)
);
}
@EventHandler

View File

@ -70,6 +70,8 @@ public class Cards extends SoloGame
this.PrepareFreeze = false;
_cardFactory = new CardFactory();
registerChatStats();
}
@Override

View File

@ -71,6 +71,7 @@ import nautilus.game.arcade.game.games.castlesiege.kits.KitUndeadGhoul;
import nautilus.game.arcade.game.games.castlesiege.kits.KitUndeadZombie;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.NullKit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.BloodThirstyStatTracker;
import nautilus.game.arcade.stats.KingDamageStatTracker;
import nautilus.game.arcade.stats.KingSlayerStatTracker;
@ -219,6 +220,18 @@ public class CastleSiege extends TeamGame
new TeamDeathsStatTracker(this),
new TeamKillsStatTracker(this)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken
);
registerChatStats();
}
@Override

View File

@ -18,6 +18,7 @@ import nautilus.game.arcade.game.games.champions.kits.KitMage;
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
import nautilus.game.arcade.game.games.common.CaptureTheFlag;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.CapturesStatTracker;
import nautilus.game.arcade.stats.ClutchStatTracker;
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
@ -37,20 +38,20 @@ import org.bukkit.event.inventory.InventoryType;
public class ChampionsCTF extends CaptureTheFlag
{
public ChampionsCTF(ArcadeManager manager)
{
{
super(manager, GameType.ChampionsCTF,
new Kit[]
{
new KitBrute(manager),
new KitRanger(manager),
new Kit[]
{
new KitBrute(manager),
new KitRanger(manager),
new KitKnight(manager),
new KitMage(manager),
new KitAssassin(manager),
});
_help = new String[]
{
_help = new String[]
{
"Make sure you use all of your Skill/Item Tokens",
"Collect Resupply Chests to restock your inventory",
"Customize your Class to suit your play style",
@ -59,7 +60,7 @@ public class ChampionsCTF extends CaptureTheFlag
"Gold/Iron Weapons deal 6 damage",
"Diamond Weapons deal 7 damage",
};
};
Manager.GetDamage().UseSimpleWeaponDamage = false;
Manager.getCosmeticManager().setHideParticles(true);
@ -86,6 +87,18 @@ public class ChampionsCTF extends CaptureTheFlag
new ClutchStatTracker(this, "Clutch"),
new SpecialWinStatTracker(this, "SpecialWin")
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken,
BlankLine,
new ChatStatData("Captures", "Flag Captures", true)
);
new ChampionsFixes(this);
}

View File

@ -16,6 +16,7 @@ import nautilus.game.arcade.game.games.champions.kits.KitMage;
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
import nautilus.game.arcade.game.games.common.Domination;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
import nautilus.game.arcade.stats.KillReasonStatTracker;
import nautilus.game.arcade.stats.SeismicSlamStatTracker;
@ -78,6 +79,16 @@ public class ChampionsDominate extends Domination
new TheLongestShotStatTracker(this),
new SeismicSlamStatTracker(this)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken
);
new ChampionsFixes(this);
}

View File

@ -16,6 +16,7 @@ import nautilus.game.arcade.game.games.champions.kits.KitMage;
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
import nautilus.game.arcade.game.games.common.TeamDeathmatch;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
import nautilus.game.arcade.stats.KillAllOpposingStatTracker;
import nautilus.game.arcade.stats.KillReasonStatTracker;
@ -78,6 +79,16 @@ public class ChampionsTDM extends TeamDeathmatch
new TheLongestShotStatTracker(this),
new SeismicSlamStatTracker(this)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken
);
new ChampionsFixes(this);
}

View File

@ -152,6 +152,14 @@ public class Christmas extends SoloGame
HungerSet = 20;
WorldTimeSet = 2000;
PrepareFreeze = false;
registerChatStats(
Kills,
Assists,
BlankLine,
DamageDealt,
DamageTaken
);
}
//parse 129 19 47 48 103 86 137 56 22 45 121 14 15 16 87 88 89 153 173 172 162

View File

@ -73,6 +73,12 @@ public class DeathTag extends SoloGame
this.PrepareFreeze = false;
registerStatTrackers(new ComeAtMeBroStatTracker(this));
registerChatStats(
Kills,
Deaths,
KDRatio
);
}
@Override

View File

@ -52,6 +52,7 @@ import nautilus.game.arcade.events.PlayerKitGiveEvent;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.dragonescape.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.ParalympicsStatTracker;
import nautilus.game.arcade.stats.WinMapStatTracker;
@ -120,6 +121,13 @@ public class DragonEscape extends SoloGame
new ParalympicsStatTracker(this),
new WinMapStatTracker(this)
);
registerChatStats(
Deaths,
DamageTaken,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -45,6 +45,7 @@ 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;
import nautilus.game.arcade.managers.chat.ChatStatData;
public class DragonEscapeTeams extends TeamGame
{
@ -84,6 +85,13 @@ public class DragonEscapeTeams extends TeamGame
this.HungerSet = 20;
this.TeamArmorHotbar = true;
registerChatStats(
Deaths,
DamageTaken,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -24,5 +24,8 @@ public class DragonRiders extends SoloGame
this.Damage = false;
this.HungerSet = 20;
//Chat stats
registerChatStats();
}
}

View File

@ -36,6 +36,7 @@ import nautilus.game.arcade.game.games.dragons.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkSparkler;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.SparklezStatTracker;
public class Dragons extends SoloGame
@ -70,6 +71,13 @@ public class Dragons extends SoloGame
registerStatTrackers(
new SparklezStatTracker(this)
);
registerChatStats(
Deaths,
DamageTaken,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -35,6 +35,7 @@ import nautilus.game.arcade.game.games.dragons.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.perks.PerkSparkler;
import nautilus.game.arcade.managers.chat.ChatStatData;
public class DragonsTeams extends TeamGame
{
@ -72,6 +73,13 @@ public class DragonsTeams extends TeamGame
this.TeamArmor = true;
this.TeamArmorHotbar = true;
registerChatStats(
Deaths,
DamageTaken,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -51,6 +51,7 @@ import nautilus.game.arcade.game.games.GameScore;
import nautilus.game.arcade.game.games.draw.kits.*;
import nautilus.game.arcade.game.games.draw.tools.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.KeenEyeStatTracker;
import nautilus.game.arcade.stats.MrSquiggleStatTracker;
import nautilus.game.arcade.stats.PureLuckStatTracker;
@ -135,6 +136,10 @@ public class Draw extends SoloGame
new KeenEyeStatTracker(this),
new PureLuckStatTracker(this)
);
registerChatStats(
new ChatStatData("PureLuck", "Lucky Guess", true)
);
Manager.GetChat().setThreeSecondDelay(false);
}

View File

@ -162,6 +162,16 @@ public class Evolution extends SoloGame
new NoMeleeTracker(this),
new KillsWhileEvolvingTracker(this)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageDealt,
DamageTaken
);
}
public EvolveManager getEvolve()

View File

@ -123,6 +123,14 @@ public class Gladiators extends SoloGame
new SwiftKillTracker(this)
);
registerChatStats(
Kills,
Assists,
BlankLine,
DamageDealt,
DamageTaken
);
_playerArenas = new HashMap<>();
_roundState = RoundState.WAITING;

View File

@ -115,6 +115,11 @@ public class Gravity extends SoloGame
this.CompassEnabled = true;
this.WorldBoundaryKill = false;
registerChatStats(
Kills,
Assists
);
}
@Override

View File

@ -38,6 +38,8 @@ import nautilus.game.arcade.game.games.halloween.waves.WaveBase;
import nautilus.game.arcade.game.games.halloween.waves.WaveBoss;
import nautilus.game.arcade.game.games.halloween.waves.WaveVictory;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedSoundEffect;
import org.bukkit.ChatColor;
@ -135,6 +137,14 @@ public class Halloween extends SoloGame
this.WorldBoundaryKill = false;
this.DontAllowOverfill = true;
registerChatStats(
Kills,
DamageDealt,
DamageTaken,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -341,8 +341,16 @@ 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)
);
//Need ideas for this one
registerChatStats();
}
@EventHandler

View File

@ -57,6 +57,8 @@ public class HoleInTheWall extends SoloGame
DamageFall = false;
HungerSet = 20;
WorldTimeSet = 8000;
registerChatStats();
}
private ArrayList<Entry<Integer, Integer>> getWall()

View File

@ -18,23 +18,25 @@ public class Horse extends TeamGame
{
super(manager, GameType.Horse,
new Kit[]
{
new KitHorseKnight(manager),
new NullKit(manager),
new KitDefenceArcher(manager),
},
new Kit[]
{
new KitHorseKnight(manager),
new NullKit(manager),
new KitDefenceArcher(manager),
},
new String[]
{
"Horsemen must charge the ruins",
"Horsemen win if they rid the ruins of Undead.",
"",
"Undead must defend the ruins",
"Undead win when all Horsemen are dead.",
"",
"Teams swap after game is over"
});
new String[]
{
"Horsemen must charge the ruins",
"Horsemen win if they rid the ruins of Undead.",
"",
"Undead must defend the ruins",
"Undead win when all Horsemen are dead.",
"",
"Teams swap after game is over"
});
registerChatStats();
}
@Override

View File

@ -42,6 +42,7 @@ import nautilus.game.arcade.game.games.lobbers.trackers.TrackerDirectHit;
import nautilus.game.arcade.game.games.lobbers.trackers.TrackerNoDamage;
import nautilus.game.arcade.game.games.lobbers.trackers.TrackerTNTThrown;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -74,19 +75,23 @@ public class BombLobbers extends TeamGame implements IThrown
@SuppressWarnings("unchecked")
public BombLobbers(ArcadeManager manager)
{
super(manager, GameType.Lobbers, new Kit[]
{
new KitJumper(manager),
new KitArmorer(manager),
new KitPitcher(manager),
new KitWaller(manager)
}, new String[]
{
"Fight against your enemies using",
"the power of explosives!",
"Left click TNT to throw at your enemy.",
"Last team alive wins!"
});
super(manager, GameType.Lobbers,
new Kit[]
{
new KitJumper(manager),
new KitArmorer(manager),
new KitPitcher(manager),
new KitWaller(manager)
},
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 +115,21 @@ 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(
Kills,
Assists,
DamageTaken,
BlankLine,
new ChatStatData("Thrown", "Thrown", true)
);
}
@EventHandler

View File

@ -58,7 +58,14 @@ public class Micro extends TeamGame
this.BlockBreak = true;
this.BlockPlace = true;
registerStatTrackers(new KillsWithinGameStatTracker(this, 8, "Annihilation"));
registerStatTrackers(
new KillsWithinGameStatTracker(this, 8, "Annihilation")
);
registerChatStats(
Kills,
Assists
);
}
@Override

View File

@ -74,29 +74,39 @@ public class MilkCow extends SoloGame
super(manager, GameType.MilkCow,
new Kit[]
{
new KitFarmerJump(manager),
new KitSturdyFarmhand(manager),
new NullKit(manager),
new KitCow(manager),
},
{
new KitFarmerJump(manager),
new KitSturdyFarmhand(manager),
new NullKit(manager),
new KitCow(manager),
},
new String[]
{
"Farmers get 1 point for drinking milk.",
"You lose 5 points for dying!",
"",
"Cows get 1 point for killing farmers.",
"Defend your herd to stop farmers!",
"",
"First player to 15 points wins!"
});
new String[]
{
"Farmers get 1 point for drinking milk.",
"You lose 5 points for dying!",
"",
"Cows get 1 point for killing farmers.",
"Defend your herd to stop farmers!",
"",
"First player to 15 points wins!"
});
this.CompassEnabled = true;
this.DeathOut = false;
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("Milk", "dummy");
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
@Override

View File

@ -104,6 +104,7 @@ import nautilus.game.arcade.game.games.minestrike.items.guns.GunStats;
import nautilus.game.arcade.game.games.minestrike.items.guns.GunType;
import nautilus.game.arcade.game.games.minestrike.kits.KitPlayer;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.KaboomStatTracker;
import nautilus.game.arcade.stats.KillAllOpposingMineStrikeRoundStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
@ -243,57 +244,57 @@ public class MineStrike extends TeamGame
{
super(manager, GameType.MineStrike,
new Kit[]
{
new KitPlayer(manager),
new Kit[]
{
new KitPlayer(manager),
},
new String[]
{
C.cAqua + "SWAT" + C.cWhite + " Defend the Bomb Sites",
C.cAqua + "SWAT" + C.cWhite + " Kill the Bombers",
" ",
C.cRed + "Bombers" + C.cWhite + " Plant the Bomb at Bomb Site",
C.cRed + "Bombers" + C.cWhite + " Kill the SWAT Team",
});
new String[]
{
C.cAqua + "SWAT" + C.cWhite + " Defend the Bomb Sites",
C.cAqua + "SWAT" + C.cWhite + " Kill the Bombers",
" ",
C.cRed + "Bombers" + C.cWhite + " Plant the Bomb at Bomb Site",
C.cRed + "Bombers" + C.cWhite + " Kill the SWAT Team",
});
_shopManager = new ShopManager(this);
this.StrictAntiHack = true;
AnnounceStay = false;
this.HungerSet = 20;
this.ItemDrop = true;
this.DeathTeleport = false;
this.InventoryClick = true;
this.JoinInProgress = true;
this.DontAllowOverfill = true;
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("HP", "dummy");
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
this._help = new String[]
this._help = new String[]
{
//"Tap Crouch when close to an ally to Boost",
"Open Inventory at spawn to buy guns",
"Hold Right-Click to Plant Bomb",
"Look at the Bomb to Defuse it",
"Moving decreases accuracy",
"Sprinting heavily decreases accuracy",
"Jumping massively decreases accuracy",
"Crouching increases accuracy",
"Left-Click to drop Grenades",
"Right-Click to throw Grenades",
"Burst Fire for greater accuracy",
"Sniper Rifles are only accurate while scoped",
"Rifles have 30% recoil reduction while scoped",
"Pick up better weapons from dead players"
//"Tap Crouch when close to an ally to Boost",
"Open Inventory at spawn to buy guns",
"Hold Right-Click to Plant Bomb",
"Look at the Bomb to Defuse it",
"Moving decreases accuracy",
"Sprinting heavily decreases accuracy",
"Jumping massively decreases accuracy",
"Crouching increases accuracy",
"Left-Click to drop Grenades",
"Right-Click to throw Grenades",
"Burst Fire for greater accuracy",
"Sniper Rifles are only accurate while scoped",
"Rifles have 30% recoil reduction while scoped",
"Pick up better weapons from dead players"
};
registerStatTrackers(
@ -304,10 +305,19 @@ public class MineStrike extends TeamGame
new MineStrikeLastAliveKillStatTracker(this),
new KillFastStatTracker(this, 4, 5, "KillingSpree"),
new KillsWithConditionStatTracker(this, "Blindfolded", ConditionType.BLINDNESS, "Flash Bang", 2),
new TeamDeathsStatTracker(this),
new TeamKillsStatTracker(this)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
new ChatStatData("BoomHeadshot", "Headshots", true),
Assists
);
}
@Override

View File

@ -84,6 +84,8 @@ public class MineWare extends SoloGame
Manager.GetCreature().SetDisableCustomDrops(true);
PopulateOrders();
registerChatStats();
}
@Override

View File

@ -31,6 +31,8 @@ public class Moba extends TeamGame
this.DeathSpectateSecs = 8;
this.HungerSet = 20;
registerChatStats();
}
@Override

View File

@ -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

View File

@ -33,6 +33,7 @@ import nautilus.game.arcade.game.games.monstermaze.trackers.PilotTracker;
import nautilus.game.arcade.game.games.monstermaze.trackers.SnowmanHitTracker;
import nautilus.game.arcade.game.games.monstermaze.trackers.SurvivePast10thSafepadTracker;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import org.bukkit.Bukkit;
import org.bukkit.Effect;
@ -101,6 +102,12 @@ public class MonsterMaze extends SoloGame
new SurvivePast10thSafepadTracker(this)
);
//_maze = new SnowmanMaze(this, WorldData.GetDataLocs("GRAY")/*, WorldData.GetCustomLocs("103")*/);
registerChatStats(
DamageTaken,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
public Maze getMaze()

View File

@ -88,6 +88,8 @@ public class OldMineWare extends SoloGame
InventoryClick = true;
PopulateOrders();
registerChatStats();
}
@Override

View File

@ -114,6 +114,16 @@ public class Paintball extends TeamGame
new WinFastStatTracker(this, 30, "Speedrunner"),
new LastStandStatTracker(this)
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
@EventHandler

View File

@ -92,6 +92,16 @@ public class Quiver extends SoloGame
new SharpShooterStatTracker(this),
new WinWithoutBowStatTracker(this, "WhatsABow")
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
@EventHandler(priority = EventPriority.HIGH)

View File

@ -65,6 +65,16 @@ public class QuiverTeams extends TeamGame
this.TeamArmor = true;
this.TeamArmorHotbar = true;
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt
);
}
@EventHandler(priority = EventPriority.HIGH)

View File

@ -32,6 +32,7 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.runner.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.DistanceTraveledStatTracker;
import net.minecraft.server.v1_8_R3.EntityArrow;
@ -66,6 +67,10 @@ public class Runner extends SoloGame implements IThrown
this.PrepareFreeze = false;
registerStatTrackers(new DistanceTraveledStatTracker(this, "MarathonRunner"));
registerChatStats(
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -72,6 +72,11 @@ public class SearchAndDestroy extends TeamGame
DamageSelf = false;
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);
registerChatStats(
Kills,
Assists
);
}
public ArrayList<TeamBomb> getBombs()

View File

@ -53,6 +53,7 @@ import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.sheep.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.SheepDropStatTracker;
import nautilus.game.arcade.stats.SheepThiefStatTracker;
import nautilus.game.arcade.stats.WinWithSheepStatTracker;
@ -155,6 +156,14 @@ public class SheepGame extends TeamGame
new SheepDropStatTracker(this),
new WinWithSheepStatTracker(this)
);
registerChatStats(
new ChatStatData("AnimalRescue", "Captures", true),
new ChatStatData("Thief", "Stolen", true),
BlankLine,
Kills,
Deaths
);
}
@Override

View File

@ -46,6 +46,7 @@ import nautilus.game.arcade.game.games.skywars.kits.KitDestructor;
import nautilus.game.arcade.game.games.skywars.kits.KitMiner;
import nautilus.game.arcade.game.games.skywars.kits.KitMadScientist;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.ore.OreHider;
import nautilus.game.arcade.stats.DeathBomberStatTracker;
import nautilus.game.arcade.stats.SkywarsKillZombieStatTracker;
@ -204,6 +205,18 @@ public abstract class Skywars extends Game
new WinWithoutOpeningChestStatTracker(this),
new WinWithoutWearingArmorStatTracker(this));
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("ZombieKills", "Zombies Killed", true)
);
}
public void ParseData()

View File

@ -16,6 +16,7 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.managers.chat.ChatStatData;
public class SoloSuperSmash extends SuperSmash
{
@ -32,6 +33,18 @@ public class SoloSuperSmash extends SuperSmash
});
this.DamageTeamSelf = true;
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -24,7 +24,8 @@ import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.common.Domination;
import nautilus.game.arcade.game.games.smash.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
public class SuperSmashDominate extends Domination
{
public SuperSmashDominate(ArcadeManager manager)
@ -55,6 +56,18 @@ public class SuperSmashDominate extends Domination
new KitMagmaCube(manager),
});
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler(priority = EventPriority.LOWEST)

View File

@ -15,6 +15,7 @@ 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.managers.chat.ChatStatData;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -53,6 +54,18 @@ public class TeamSuperSmash extends SuperSmash
this.TeamArmorHotbar = true;
this.DontAllowOverfill = true;
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
Assists,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -56,6 +56,7 @@ import nautilus.game.arcade.game.games.snake.kits.KitInvulnerable;
import nautilus.game.arcade.game.games.snake.kits.KitReverser;
import nautilus.game.arcade.game.games.snake.kits.KitSpeed;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.ChooChooStatTracker;
import nautilus.game.arcade.stats.KillsWithinGameStatTracker;
import nautilus.game.arcade.stats.SlimySheepStatTracker;
@ -157,6 +158,10 @@ public class Snake extends SoloGame
new ChooChooStatTracker(this),
new SlimySheepStatTracker(this)
);
registerChatStats(
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -92,6 +92,14 @@ public class SneakyAssassins extends SoloGame
new RevealStatTracker(this, "ISeeYou"),
_killEntityStatTracker
);
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt
);
}
@Override

View File

@ -104,6 +104,12 @@ public class SnowFight extends TeamGame
this.TeamArmor = true;
this.TeamArmorHotbar = true;
registerChatStats(
Kills,
Deaths,
KDRatio
);
// this.WorldWeatherEnabled = true;
// this.WorldTimeSet = 4000;

View File

@ -32,6 +32,7 @@ import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.SpleefBlockDestroyStatTracker;
import net.minecraft.server.v1_8_R3.EntityArrow;
@ -62,6 +63,15 @@ public class Spleef extends SoloGame
this.PrepareFreeze = false;
registerStatTrackers(new SpleefBlockDestroyStatTracker(this));
registerChatStats(
Kills,
Assists,
BlankLine,
new ChatStatData("BlocksBroken", "Blocks Broken", true),
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -30,6 +30,7 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.spleef.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import net.minecraft.server.v1_8_R3.EntityArrow;
@ -59,6 +60,15 @@ public class SpleefTeams extends TeamGame
this.TeamArmor = true;
this.TeamArmorHotbar = true;
registerChatStats(
Kills,
Assists,
BlankLine,
new ChatStatData("BlocksBroken", "Blocks Broken", true),
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@EventHandler

View File

@ -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)

View File

@ -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

View File

@ -14,6 +14,7 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.managers.chat.ChatStatData;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
@ -39,6 +40,16 @@ public class SoloSurvivalGames extends SurvivalGames
});
this.DamageTeamSelf = true;
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("SupplyDropsOpened", "Chests opened", true)
);
}

View File

@ -50,6 +50,7 @@ import nautilus.game.arcade.game.games.survivalgames.kit.KitHorseman;
import nautilus.game.arcade.game.games.survivalgames.kit.KitKnight;
import nautilus.game.arcade.game.games.survivalgames.kit.KitLooter;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -255,6 +256,16 @@ public class SurvivalGamesTeams extends TeamGame
//Tournament
if (Manager.IsTournamentServer())
QuitOut = false;
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("SupplyDropsOpened", "Chests opened", true)
);
}
@Override

View File

@ -17,6 +17,7 @@ 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.managers.chat.ChatStatData;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -59,6 +60,16 @@ public class TeamSurvivalGames extends SurvivalGames
this.DamageTeamSelf = false;
this.DontAllowOverfill = true;
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("SupplyDropsOpened", "Chests opened", true)
);
}

View File

@ -75,6 +75,8 @@ public class Tug extends TeamGame
this.DeathOut = false;
this.DeathSpectateSecs = 20;
registerChatStats();
}
@Override

View File

@ -59,7 +59,9 @@ import nautilus.game.arcade.game.games.turfforts.kits.KitInfiltrator;
import nautilus.game.arcade.game.games.turfforts.kits.KitMarksman;
import nautilus.game.arcade.game.games.turfforts.kits.KitShredder;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.BehindEnemyLinesStatTracker;
import nautilus.game.arcade.stats.BlockPlaceStatTracker;
import nautilus.game.arcade.stats.BlockShreadStatTracker;
import nautilus.game.arcade.stats.TheComebackStatTracker;
import net.minecraft.server.v1_8_R3.EntityArrow;
@ -149,7 +151,16 @@ public class TurfForts extends TeamGame
registerStatTrackers(
new BlockShreadStatTracker(this),
new BehindEnemyLinesStatTracker(this),
new TheComebackStatTracker(this)
new TheComebackStatTracker(this),
new BlockPlaceStatTracker(this, new Material[]{})
);
registerChatStats(
Kills,
Deaths,
KDRatio,
BlankLine,
new ChatStatData("BlocksPlaced", "Blocks Placed", true)
);
}

View File

@ -66,6 +66,8 @@ import nautilus.game.arcade.game.games.typewars.tutorial.TutorialTypeWars;
import nautilus.game.arcade.gametutorial.events.GameTutorialEndEvent;
import nautilus.game.arcade.gametutorial.events.GameTutorialStartEvent;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.TimeInGameStatTracker;
import nautilus.game.arcade.world.WorldData;
public class TypeWars extends TeamGame
@ -167,6 +169,10 @@ public class TypeWars extends TeamGame
new KillsStatTracker(this),
new TimeInGameTracker(this)
);
registerChatStats(
new ChatStatData("MinionKills", "Kills", true)
);
manager.GetCreature().SetDisableCustomDrops(true);
manager.GetChat().setThreeSecondDelay(false);

View File

@ -207,6 +207,14 @@ public class UHC extends TeamGame
_createTime = System.currentTimeMillis();
_serverTime = Utility.currentTimeMillis();
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt
);
}
@Override

View File

@ -66,6 +66,7 @@ import nautilus.game.arcade.game.games.wither.kit.KitWitherMinion;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.NullKit;
import nautilus.game.arcade.kit.perks.data.IBlockRestorer;
import nautilus.game.arcade.managers.chat.ChatStatData;
import nautilus.game.arcade.stats.TeamDeathsStatTracker;
import nautilus.game.arcade.stats.TeamKillsStatTracker;
@ -148,6 +149,13 @@ public class WitherGame extends TeamGame implements IBlockRestorer
new TeamDeathsStatTracker(this),
new TeamKillsStatTracker(this)
);
registerChatStats(
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
}
@Override

View File

@ -54,6 +54,7 @@ import net.minecraft.server.v1_8_R3.EntityFireball;
import net.minecraft.server.v1_8_R3.PacketPlayOutSetSlot;
import net.minecraft.server.v1_8_R3.PacketPlayOutWindowItems;
import nautilus.game.arcade.managers.chat.ChatStatData;
import org.apache.commons.lang.IllegalClassException;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -166,6 +167,16 @@ public class Wizards extends SoloGame
SoupEnabled = false;
DamageTeamSelf = true;
registerChatStats(
Kills,
Assists,
BlankLine,
DamageTaken,
DamageDealt,
BlankLine,
new ChatStatData("kit", "Kit", true)
);
Manager.getCosmeticManager().setHideParticles(true);
// Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);

View File

@ -71,6 +71,11 @@ public class ZombieSurvival extends SoloGame
this.HungerSet = 20;
this.CompassEnabled = true;
registerChatStats(
Kills,
Assists
);
}
@Override

View File

@ -0,0 +1,56 @@
package nautilus.game.arcade.managers.chat;
/**
* Created by TeddyDev on 10/01/2016.
*/
public class ChatStatData
{
private String _stat;
private String _display;
private boolean _isValue;
public ChatStatData()
{
}
public ChatStatData(String stat, String display, boolean isValue)
{
_stat = stat;
_display = display;
_isValue = isValue;
}
public ChatStatData blankLine()
{
_stat = null;
_display = " ";
_isValue = false;
return this;
}
public ChatStatData plainText(String text)
{
_stat = null;
_display = text;
_isValue = false;
return this;
}
public String getStat()
{
return _stat;
}
public String getDisplay()
{
return _display;
}
public boolean isValue()
{
return _isValue;
}
}

View File

@ -0,0 +1,66 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDamageEvent;
import nautilus.game.arcade.game.Game;
/**
* Created by TeddehDev on 15/01/2016.
*/
public class BlockBreakStatTracker extends StatTracker<Game>
{
private boolean _blockDamage;
/**
* @param blockDamage
* - true = triggers block damage event
* - false = triggers block break event
*/
public BlockBreakStatTracker(Game game, boolean blockDamage)
{
super(game);
_blockDamage = blockDamage;
}
@EventHandler
public void blockBreak(BlockBreakEvent event)
{
if(!getGame().IsLive())
return;
if(event.isCancelled())
return;
if(_blockDamage)
return;
Player player = event.getPlayer();
if(player == null)
return;
addStat(player, "BlocksBroken", 1, false, false);
}
@EventHandler
public void blockBreak(BlockDamageEvent event)
{
if(!getGame().IsLive())
return;
if(event.isCancelled())
return;
if(!_blockDamage)
return;
Player player = event.getPlayer();
if(player == null)
return;
addStat(player, "BlocksBroken", 1, false, false);
}
}

View File

@ -0,0 +1,45 @@
package nautilus.game.arcade.stats;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockPlaceEvent;
import nautilus.game.arcade.game.Game;
/**
* Created by TeddehDev on 15/01/2016.
*/
public class BlockPlaceStatTracker extends StatTracker<Game>
{
private Material[] _ignore;
public BlockPlaceStatTracker(Game game, Material[] ignore)
{
super(game);
_ignore = ignore;
}
@EventHandler
public void blockPlace(BlockPlaceEvent event)
{
if(!getGame().IsLive())
return;
if(event.isCancelled())
return;
Player player = event.getPlayer();
if(player == null)
return;
for(Material material : _ignore)
{
if(event.getBlock().getType() == material)
continue;
addStat(event.getPlayer(), "BlocksPlaced", 1, false, false);
}
}
}