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

This commit is contained in:
Jonathan Williams 2014-10-13 21:07:10 -05:00
commit 1dd51bcac5
42 changed files with 1514 additions and 472 deletions

View File

@ -3,475 +3,568 @@ package mineplex.core.achievement;
public enum Achievement
{
GLOBAL_GEM_HUNTER("Gem Hunter", 10000,
new String[] {"Global.GemsEarned"},
new String[] {"+1 for every Gem earned in any game."},
new int[] {10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000},
new String[]{"Global.GemsEarned"},
new String[]{"+1 for every Gem earned in any game."},
new int[]{10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000},
AchievementCategory.GLOBAL),
//Bridges
BRIDGES_WINS("Bridge Champion", 600,
new String[] {"The Bridges.Wins"},
new String[] {"Win 50 games of The Bridges"},
new int[] {50},
new String[]{"The Bridges.Wins"},
new String[]{"Win 50 games of The Bridges"},
new int[]{50},
AchievementCategory.BRIDGES),
BRIDGES_FOOD("Food for the Masses", 600,
new String[] {"The Bridges.FoodForTheMasses"},
new String[] {"Get 20 kills with Apples"},
new int[] {20},
new String[]{"The Bridges.FoodForTheMasses"},
new String[]{"Get 20 kills with Apples"},
new int[]{20},
AchievementCategory.BRIDGES),
BRIDGES_SNIPER("Sniper", 600,
new String[] {"The Bridges.Sniper"},
new String[] {"Kill an enemy with Archery before Bridges fall"},
new int[] {1},
new String[]{"The Bridges.Sniper"},
new String[]{"Kill an enemy with Archery before Bridges fall"},
new int[]{1},
AchievementCategory.BRIDGES),
BRIDGES_FORTUNE_BOMBER("Fortune Bomber", 600,
new String[] {"The Bridges.FortuneBomber"},
new String[] {"Mine 30 Diamond Ore using TNT"},
new int[] {30},
new String[]{"The Bridges.FortuneBomber"},
new String[]{"Mine 30 Diamond Ore using TNT"},
new int[]{30},
AchievementCategory.BRIDGES),
BRIDGES_RAMPAGE("Rampage", 1200,
new String[] {"The Bridges.Rampage"},
new String[] {"Get 4 kills in a row, with no more than", "10 seconds between each kill"},
new int[] {1},
new String[]{"The Bridges.Rampage"},
new String[]{"Get 4 kills in a row, with no more than", "10 seconds between each kill"},
new int[]{1},
AchievementCategory.BRIDGES),
BRIDGES_DEATH_BOMBER("Death Bomber", 1000,
new String[] {"The Bridges.DeathBomber"},
new String[] {"Get 5 Kills in a single game with TNT"},
new int[] {1},
new String[]{"The Bridges.DeathBomber"},
new String[]{"Get 5 Kills in a single game with TNT"},
new int[]{1},
AchievementCategory.BRIDGES),
//Survival Games
SURVIVAL_GAMES_WINS("Katniss Everdeen", 600,
new String[] {"Survival Games.Wins"},
new String[] {"Win 50 games of Survival Games"},
new int[] {50},
new String[]{"Survival Games.Wins"},
new String[]{"Win 50 games of Survival Games"},
new int[]{50},
AchievementCategory.SURVIVAL_GAMES),
SURVIVAL_GAMES_LIGHT_WEIGHT("Light Weight", 1000,
new String[] {"Survival Games.NoArmor"},
new String[] {"Win a game without wearing any armor"},
new int[] {1},
new String[]{"Survival Games.NoArmor"},
new String[]{"Win a game without wearing any armor"},
new int[]{1},
AchievementCategory.SURVIVAL_GAMES),
SURVIVAL_GAMES_BLOODLUST("Bloodlust", 1200,
new String[] {"Survival Games.Bloodlust"},
new String[] {"Kill 3 other players in the first minute"},
new int[] {1},
new String[]{"Survival Games.Bloodlust"},
new String[]{"Kill 3 other players in the first minute"},
new int[]{1},
AchievementCategory.SURVIVAL_GAMES),
SURVIVAL_GAMES_LOOT("Loot Hoarder", 600,
new String[] {"Survival Games.SupplyDropsOpened"},
new String[] {"Be the first to open 50 Supply Drops"},
new int[] {50},
new String[]{"Survival Games.SupplyDropsOpened"},
new String[]{"Be the first to open 50 Supply Drops"},
new int[]{50},
AchievementCategory.SURVIVAL_GAMES),
SURVIVAL_GAMES_SKELETONS("Skeletal Army", 1000,
new String[] {"Survival Games.Skeletons"},
new String[] {"Have 5 Necromanced Skeletons alive"},
new int[] {1},
new String[]{"Survival Games.Skeletons"},
new String[]{"Have 5 Necromanced Skeletons alive"},
new int[]{1},
AchievementCategory.SURVIVAL_GAMES),
//Survival Games
UHC_WINS("Ultimate Winner", 600,
new String[] {"Ultra Hardcore.Wins"},
new String[] {"Win 20 games of Ultra Hardcore"},
new int[] {20},
new String[]{"Ultra Hardcore.Wins"},
new String[]{"Win 20 games of Ultra Hardcore"},
new int[]{20},
AchievementCategory.UHC),
//Smash Mobs
SMASH_MOBS_WINS("SO SUPER!", 600,
new String[] {"Super Smash Mobs.Wins"},
new String[] {"Win 100 games of Super Smash Mobs"},
new int[] {100},
new String[]{"Super Smash Mobs.Wins"},
new String[]{"Win 100 games of Super Smash Mobs"},
new int[]{100},
AchievementCategory.SMASH_MOBS),
SMASH_MOBS_MLG_PRO("MLG Pro", 1200,
new String[] {"Super Smash Mobs.MLGPro"},
new String[] {"Win a game without dying"},
new int[] {1},
new String[]{"Super Smash Mobs.MLGPro"},
new String[]{"Win a game without dying"},
new int[]{1},
AchievementCategory.SMASH_MOBS),
SMASH_MOBS_FREE_KITS("Free Kits Forever", 800,
new String[] {"Super Smash Mobs.FreeKitsForever"},
new String[] {"Win 100 games using only Free Kits"},
new int[] {100},
new String[]{"Super Smash Mobs.FreeKitsForever"},
new String[]{"Win 100 games using only Free Kits"},
new int[]{100},
AchievementCategory.SMASH_MOBS),
SMASH_MOBS_1V3("1v3", 2000,
new String[] {"Super Smash Mobs.1v3"},
new String[] {"Get 10 kills in a game with 4 players"},
new int[] {1},
new String[]{"Super Smash Mobs.1v3"},
new String[]{"Get 10 kills in a game with 4 players"},
new int[]{1},
AchievementCategory.SMASH_MOBS),
SMASH_MOBS_TRIPLE_KILL("Triple Kill", 1200,
new String[] {"Super Smash Mobs.TripleKill"},
new String[] {"Get 3 kills in a row, with no more than", "10 seconds between each kill"},
new int[] {1},
new String[]{"Super Smash Mobs.TripleKill"},
new String[]{"Get 3 kills in a row, with no more than", "10 seconds between each kill"},
new int[]{1},
AchievementCategory.SMASH_MOBS),
SMASH_MOBS_RECOVERY_MASTER("Recovery Master", 800,
new String[] {"Super Smash Mobs.RecoveryMaster"},
new String[] {"Take 200 damage in a single life"},
new int[] {1},
new String[]{"Super Smash Mobs.RecoveryMaster"},
new String[]{"Take 200 damage in a single life"},
new int[]{1},
AchievementCategory.SMASH_MOBS),
//Block Hunt
BLOCK_HUNT_WINS("The Blockiest Block", 600,
new String[] {"Block Hunt.Wins"},
new String[] {"Win 50 games of Block Hunt"},
new int[] {50},
new String[]{"Block Hunt.Wins"},
new String[]{"Win 50 games of Block Hunt"},
new int[]{50},
AchievementCategory.BLOCK_HUNT),
BLOCK_HUNT_HUNTER_KILLER("Hunter Killer", 1200,
new String[] {"Block Hunt.HunterKiller"},
new String[] {"Kill 10 Hunters in a single game"},
new int[] {1},
new String[]{"Block Hunt.HunterKiller"},
new String[]{"Kill 10 Hunters in a single game"},
new int[]{1},
AchievementCategory.BLOCK_HUNT),
BLOCK_HUNT_MEOW("Meow Meow Meow Meow", 800,
new String[] {"Block Hunt.Meow"},
new String[] {"Meow 50 times in a single game"},
new int[] {1},
new String[]{"Block Hunt.Meow"},
new String[]{"Meow 50 times in a single game"},
new int[]{1},
AchievementCategory.BLOCK_HUNT),
BLOCK_HUNT_HUNTER_OF_THE_YEAR("Hunter of the Year", 1200,
new String[] {"Block Hunt.HunterOfTheYear"},
new String[] {"Kill 7 Hiders in a single game"},
new int[] {1},
new String[]{"Block Hunt.HunterOfTheYear"},
new String[]{"Kill 7 Hiders in a single game"},
new int[]{1},
AchievementCategory.BLOCK_HUNT),
BLOCK_HUNT_BAD_HIDER("Bad Hider", 1000,
new String[] {"Block Hunt.BadHider"},
new String[] {"Win as Hider without disguising"},
new int[] {1},
new String[]{"Block Hunt.BadHider"},
new String[]{"Win as Hider without disguising"},
new int[]{1},
AchievementCategory.BLOCK_HUNT),
//Draw My Thing
DRAW_MY_THING_WINS("Art Hipster", 600,
new String[] {"Draw My Thing.Wins"},
new String[] {"Win 50 games of Draw My Thing"},
new int[] {50},
new String[]{"Draw My Thing.Wins"},
new String[]{"Win 50 games of Draw My Thing"},
new int[]{50},
AchievementCategory.DRAW_MY_THING),
DRAW_MY_THING_MR_SQUIGGLE("Mr. Squiggle", 800,
new String[] {"Draw My Thing.MrSquiggle"},
new String[] {"Both your drawings are guessed", "within the first 15 seconds."},
new int[] {1},
new String[]{"Draw My Thing.MrSquiggle"},
new String[]{"Both your drawings are guessed", "within the first 15 seconds."},
new int[]{1},
AchievementCategory.DRAW_MY_THING),
DRAW_MY_THING_KEEN_EYE("Keen Eye", 1200,
new String[] {"Draw My Thing.KeenEye"},
new String[] {"Guess every single drawing in a game"},
new int[] {1},
new String[]{"Draw My Thing.KeenEye"},
new String[]{"Guess every single drawing in a game"},
new int[]{1},
AchievementCategory.DRAW_MY_THING),
DRAW_MY_THING_PURE_LUCK("Pure Luck", 800,
new String[] {"Draw My Thing.PureLuck"},
new String[] {"Guess a word in the first 5 seconds"},
new int[] {1},
new String[]{"Draw My Thing.PureLuck"},
new String[]{"Guess a word in the first 5 seconds"},
new int[]{1},
AchievementCategory.DRAW_MY_THING),
//Castle Siege
CASTLE_SIEGE_WINS("FOR THE KING!", 600,
new String[] {"Castle Siege.ForTheKing"},
new String[] {"Win as Defenders 50 times"},
new int[] {50},
new String[]{"Castle Siege.ForTheKing"},
new String[]{"Win as Defenders 50 times"},
new int[]{50},
AchievementCategory.CASTLE_SIEGE),
CASTLE_SIEGE_KINGSLAYER("Kingslayer", 800,
new String[] {"Castle Siege.KingSlayer"},
new String[] {"Get the killing blow on the King"},
new int[] {1},
new String[]{"Castle Siege.KingSlayer"},
new String[]{"Get the killing blow on the King"},
new int[]{1},
AchievementCategory.CASTLE_SIEGE),
CASTLE_SIEGE_BLOOD_THIRSTY("Blood Thirsty", 1200,
new String[] {"Castle Siege.BloodThirsty"},
new String[] {"Kill 50 Undead in a single game"},
new int[] {1},
new String[]{"Castle Siege.BloodThirsty"},
new String[]{"Kill 50 Undead in a single game"},
new int[]{1},
AchievementCategory.CASTLE_SIEGE),
CASTLE_SIEGE_ASSASSIN("Assassin", 1000,
new String[] {"Castle Siege.Assassin"},
new String[] {"Do 50% or more of the damage to the king"},
new int[] {1},
new String[]{"Castle Siege.Assassin"},
new String[]{"Do 50% or more of the damage to the king"},
new int[]{1},
AchievementCategory.CASTLE_SIEGE),
//Champions
CHAMPIONS_WINS("Champion", 600,
new String[] {"Champions Domination.Wins", "Champions TDM.Wins"},
new String[] {"Win 80 games of Dominate or TDM"},
new int[] {80},
new String[]{"Champions Domination.Wins", "Champions TDM.Wins"},
new String[]{"Win 80 games of Dominate or TDM"},
new int[]{80},
AchievementCategory.CHAMPIONS),
CHAMPIONS_FLAWLESS_VICTORY("Flawless Victory", 800,
new String[] {"Champions TDM.FlawlessVictory"},
new String[] {"Win TDM without losing a player"},
new int[] {1},
new String[]{"Champions TDM.FlawlessVictory"},
new String[]{"Win TDM without losing a player"},
new int[]{1},
AchievementCategory.CHAMPIONS),
CHAMPIONS_ACE("Ace", 2000,
new String[] {"Champions TDM.Ace"},
new String[] {"Kill all enemies in a game of TDM"},
new int[] {1},
new String[]{"Champions TDM.Ace"},
new String[]{"Kill all enemies in a game of TDM"},
new int[]{1},
AchievementCategory.CHAMPIONS),
CHAMPIONS_ASSASSINATION("Assassination", 1000,
new String[] {"Champions Domination.Assassination", "Champions TDM.Assassination"},
new String[] {"Kill 40 players with Backstab without", "taking any damage from them"},
new int[] {40},
new String[]{"Champions Domination.Assassination", "Champions TDM.Assassination"},
new String[]{"Kill 40 players with Backstab without", "taking any damage from them"},
new int[]{40},
AchievementCategory.CHAMPIONS),
CHAMPIONS_MASS_ELECTROCUTION("Mass Electrocution", 1200,
new String[] {"Champions Domination.MassElectrocution", "Champions TDM.MassElectrocution"},
new String[] {"Hit 4 enemies with a Lightning Orb"},
new int[] {1},
new String[]{"Champions Domination.MassElectrocution", "Champions TDM.MassElectrocution"},
new String[]{"Hit 4 enemies with a Lightning Orb"},
new int[]{1},
AchievementCategory.CHAMPIONS),
CHAMPIONS_THE_LONGEST_SHOT("The Longest Shot", 1200,
new String[] {"Champions Domination.TheLongestShot", "Champions TDM.TheLongestShot"},
new String[] {"Kill someone using Longshot who", "is over 64 Blocks away from you"},
new int[] {1},
new String[]{"Champions Domination.TheLongestShot", "Champions TDM.TheLongestShot"},
new String[]{"Kill someone using Longshot who", "is over 64 Blocks away from you"},
new int[]{1},
AchievementCategory.CHAMPIONS),
CHAMPIONS_EARTHQUAKE("Earthquake", 1200,
new String[] {"Champions Domination.Earthquake", "Champions TDM.Earthquake"},
new String[] {"Launch 5 enemies using Seismic Slam"},
new int[] {1},
new String[]{"Champions Domination.Earthquake", "Champions TDM.Earthquake"},
new String[]{"Launch 5 enemies using Seismic Slam"},
new int[]{1},
AchievementCategory.CHAMPIONS),
//Paintball
SUPER_PAINTBALL_WINS("Paintball King", 600,
new String[] {"Super Paintball.Wins"},
new String[] {"Win 50 games of Paintball"},
new int[] {50},
AchievementCategory.SUPER_PAINTBALL),
new String[]{"Super Paintball.Wins"},
new String[]{"Win 50 games of Paintball"},
new int[]{50},
AchievementCategory.SUPER_PAINTBALL),
SUPER_PAINTBALL_KILLING_SPREE("Killing Spree", 1200,
new String[] {"Super Paintball.KillingSpree"},
new String[] {"Get 4 kills in a row, with no more than", "5 seconds between each kill"},
new int[] {1},
new String[]{"Super Paintball.KillingSpree"},
new String[]{"Get 4 kills in a row, with no more than", "5 seconds between each kill"},
new int[]{1},
AchievementCategory.SUPER_PAINTBALL),
SUPER_PAINTBALL_FLAWLESS_VICTORY("Flawless Victory", 1000,
new String[] {"Super Paintball.Wins"},
new String[] {"Win a team with your entire team alive"},
new int[] {1},
new String[]{"Super Paintball.Wins"},
new String[]{"Win a team with your entire team alive"},
new int[]{1},
AchievementCategory.SUPER_PAINTBALL),
SUPER_PAINTBALL_MEDIC("Medic!", 800,
new String[] {"Super Paintball.Medic"},
new String[] {"Revive 200 team members"},
new int[] {200},
new String[]{"Super Paintball.Medic"},
new String[]{"Revive 200 team members"},
new int[]{200},
AchievementCategory.SUPER_PAINTBALL),
SUPER_PAINTBALL_SPEEDRUNNER("Speedrunner", 1000,
new String[] {"Super Paintball.Speedrunner"},
new String[] {"Win a game in 20 seconds"},
new int[] {1},
new String[]{"Super Paintball.Speedrunner"},
new String[]{"Win a game in 20 seconds"},
new int[]{1},
AchievementCategory.SUPER_PAINTBALL),
SUPER_PAINTBALL_LAST_STAND("Last Stand", 1200,
new String[] {"Super Paintball.LastStand"},
new String[] {"Be the last alive on your team", "and kill 3 enemy players"},
new int[] {1},
new String[]{"Super Paintball.LastStand"},
new String[]{"Be the last alive on your team", "and kill 3 enemy players"},
new int[]{1},
AchievementCategory.SUPER_PAINTBALL),
//Sheep Quest
SHEEP_QUEST_WINS("Hungry Hungry Hippo", 600,
new String[] {"Sheep Quest.Wins"},
new String[] {"Win 50 games of Sheep Quest"},
new int[] {50},
AchievementCategory.SHEEP_QUEST),
new String[]{"Sheep Quest.Wins"},
new String[]{"Win 50 games of Sheep Quest"},
new int[]{50},
AchievementCategory.SHEEP_QUEST),
SHEEP_QUEST_THIEF("Thief", 800,
new String[] {"Sheep Quest.Thief"},
new String[] {"Steal 300 Sheep from enemy pens"},
new int[] {300},
AchievementCategory.SHEEP_QUEST),
new String[]{"Sheep Quest.Thief"},
new String[]{"Steal 300 Sheep from enemy pens"},
new int[]{300},
AchievementCategory.SHEEP_QUEST),
SHEEP_QUEST_ANIMAL_RESCUE("Animal Rescue", 800,
new String[] {"Sheep Quest.AnimalRescue"},
new String[] {"Make 300 enemies drop their Sheep"},
new int[] {300},
AchievementCategory.SHEEP_QUEST),
new String[]{"Sheep Quest.AnimalRescue"},
new String[]{"Make 300 enemies drop their Sheep"},
new int[]{300},
AchievementCategory.SHEEP_QUEST),
SHEEP_QUEST_SELFISH("Selfish", 1200,
new String[] {"Sheep Quest.Selfish"},
new String[] {"Win with more than 12 Sheep"},
new int[] {1},
AchievementCategory.SHEEP_QUEST),
new String[]{"Sheep Quest.Selfish"},
new String[]{"Win with more than 12 Sheep"},
new int[]{1},
AchievementCategory.SHEEP_QUEST),
//Snake
SNAKE_WINS("Nokia 3310", 600,
new String[] {"Snake.Wins"},
new String[] {"Win 50 games of Snake"},
new int[] {50},
AchievementCategory.SNAKE),
new String[]{"Snake.Wins"},
new String[]{"Win 50 games of Snake"},
new int[]{50},
AchievementCategory.SNAKE),
SNAKE_CANNIBAL("Cannibal", 1600,
new String[] {"Snake.Cannibal"},
new String[] {"Kill 8 players in a single game"},
new int[] {1},
AchievementCategory.SNAKE),
new String[]{"Snake.Cannibal"},
new String[]{"Kill 8 players in a single game"},
new int[]{1},
AchievementCategory.SNAKE),
SNAKE_CHOO_CHOO("Choo Choo", 1000,
new String[] {"Snake.ChooChoo"},
new String[] {"Grow to be 60 Sheep or longer"},
new int[] {1},
AchievementCategory.SNAKE),
new String[]{"Snake.ChooChoo"},
new String[]{"Grow to be 60 Sheep or longer"},
new int[]{1},
AchievementCategory.SNAKE),
SNAKE_SLIMY_SHEEP("Slimy Sheep", 800,
new String[] {"Snake.SlimySheep"},
new String[] {"Eat 20 slimes in a single game"},
new int[] {1},
AchievementCategory.SNAKE),
new String[]{"Snake.SlimySheep"},
new String[]{"Eat 20 slimes in a single game"},
new int[]{1},
AchievementCategory.SNAKE),
//Dragons
DRAGONS_WINS("Dragon Tamer", 600,
new String[] {"Dragons.Wins"},
new String[] {"Win 50 games of Dragons"},
new int[] {50},
AchievementCategory.DRAGONS),
new String[]{"Dragons.Wins"},
new String[]{"Win 50 games of Dragons"},
new int[]{50},
AchievementCategory.DRAGONS),
DRAGONS_SPARKLEZ("Sparklez", 400,
new String[] {"Dragons.Sparklez"},
new String[] {"Throw 100 Sparklers"},
new int[] {100},
AchievementCategory.DRAGONS),
new String[]{"Dragons.Sparklez"},
new String[]{"Throw 100 Sparklers"},
new int[]{100},
AchievementCategory.DRAGONS),
//Turf Wars
TURF_WARS_WINS("Turf Master 3000", 600,
new String[] {"Turf Wars.Wins"},
new String[] {"Win 50 games of Turf Wars"},
new int[] {50},
AchievementCategory.TURF_WARS),
TURF_WARS_SHREDDINATOR("The Shreddinator", 800,
new String[] {"Turf Wars.TheShreddinator"},
new String[] {"Destroy 2000 blocks as Shredder"},
new int[] {2000},
AchievementCategory.TURF_WARS),
TURF_WARS_BEHIND_ENEMY_LINES("Behind Enemy Lines", 1000,
new String[] {"Turf Wars.BehindEnemyLines"},
new String[] {"Stay on enemy turf for 15 seconds"},
new int[] {1},
AchievementCategory.TURF_WARS),
TURF_WARS_COMEBACK("The Comeback", 2000,
new String[] {"Turf Wars.TheComeback"},
new String[] {"Win a game after having 5 or less turf"},
new int[] {1},
new String[]{"Turf Wars.Wins"},
new String[]{"Win 50 games of Turf Wars"},
new int[]{50},
AchievementCategory.TURF_WARS),
TURF_WARS_SHREDDINATOR("The Shreddinator", 800,
new String[]{"Turf Wars.TheShreddinator"},
new String[]{"Destroy 2000 blocks as Shredder"},
new int[]{2000},
AchievementCategory.TURF_WARS),
TURF_WARS_BEHIND_ENEMY_LINES("Behind Enemy Lines", 1000,
new String[]{"Turf Wars.BehindEnemyLines"},
new String[]{"Stay on enemy turf for 15 seconds"},
new int[]{1},
AchievementCategory.TURF_WARS),
TURF_WARS_COMEBACK("The Comeback", 2000,
new String[]{"Turf Wars.TheComeback"},
new String[]{"Win a game after having 5 or less turf"},
new int[]{1},
AchievementCategory.TURF_WARS),
//Death Tag
DEATH_TAG_WINS("Death Proof", 600,
new String[] {"Death Tag.Wins"},
new String[] {"Win 50 games of Death Tag"},
new int[] {50},
AchievementCategory.DEATH_TAG),
DEATH_TAG_COME_AT_ME_BRO("Come At Me Bro!", 1200,
new String[] {"Death Tag.ComeAtMeBro"},
new String[] {"Kill 2 Undead Chasers in a single game"},
new int[] {1},
new String[]{"Death Tag.Wins"},
new String[]{"Win 50 games of Death Tag"},
new int[]{50},
AchievementCategory.DEATH_TAG),
DEATH_TAG_COME_AT_ME_BRO("Come At Me Bro!", 1200,
new String[]{"Death Tag.ComeAtMeBro"},
new String[]{"Kill 2 Undead Chasers in a single game"},
new int[]{1},
AchievementCategory.DEATH_TAG),
//Runner
RUNNER_WINS("Hot Feet", 600,
new String[] {"Runner.Wins"},
new String[] {"Win 50 games of Runner"},
new int[] {50},
AchievementCategory.RUNNER),
new String[]{"Runner.Wins"},
new String[]{"Win 50 games of Runner"},
new int[]{50},
AchievementCategory.RUNNER),
RUNNER_MARATHON_RUNNER("Marathon Runner", 1000,
new String[]{"Runner.MarathonRunner"},
new String[]{"Run over 20,000 blocks"},
new int[]{20000},
AchievementCategory.RUNNER),
//Dragon Escape
DRAGON_ESCAPE_WINS("Douglas Defeater", 600,
new String[] {"Dragon Escape.Wins"},
new String[] {"Win 50 games of Dragon Escape"},
new int[] {50},
AchievementCategory.DRAGON_ESCAPE),
new String[]{"Dragon Escape.Wins"},
new String[]{"Win 50 games of Dragon Escape"},
new int[]{50},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_PARALYMPICS("Paralympics", 1200,
new String[] {"Dragon Escape.Wins"},
new String[] {"Win a game without using Leap"},
new int[] {1},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_SKYLANDS("Skylands Master", 1000,
new String[] {"Dragon Escape.Win.Skylands"},
new String[] {"Win by finishing Skylands 5 times"},
new int[] {5},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_THROUGH_HELL("To Hell and Back", 1000,
new String[] {"Dragon Escape.Win.Through Hell"},
new String[] {"Win by finishing Through Hell 5 times"},
new int[] {5},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_PIRATE_BAY("Plundered", 1000,
new String[] {"Dragon Escape.Win.Pirate Bay"},
new String[] {"Win by finishing Pirate Bay 5 times"},
new int[] {5},
new String[]{"Dragon Escape.Wins"},
new String[]{"Win a game without using Leap"},
new int[]{1},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_SKYLANDS("Skylands Master", 1000,
new String[]{"Dragon Escape.Win.Skylands"},
new String[]{"Win by finishing Skylands 5 times"},
new int[]{5},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_THROUGH_HELL("To Hell and Back", 1000,
new String[]{"Dragon Escape.Win.Through Hell"},
new String[]{"Win by finishing Through Hell 5 times"},
new int[]{5},
AchievementCategory.DRAGON_ESCAPE),
DRAGON_ESCAPE_PIRATE_BAY("Plundered", 1000,
new String[]{"Dragon Escape.Win.Pirate Bay"},
new String[]{"Win by finishing Pirate Bay 5 times"},
new int[]{5},
AchievementCategory.DRAGON_ESCAPE),
//OITQ
OITQ_WINS("One of a Kind", 600,
new String[] {"One in the Quiver.Wins"},
new String[] {"Win 50 games of One in the Quiver"},
new int[] {50},
AchievementCategory.ONE_IN_THE_QUIVER),
new String[]{"One in the Quiver.Wins"},
new String[]{"Win 50 games of One in the Quiver"},
new int[]{50},
AchievementCategory.ONE_IN_THE_QUIVER),
OITQ_PERFECTIONIST("The Perfect Game", 3000,
new String[] {"One in the Quiver.Perfectionist"},
new String[] {"Win without dying"},
new int[] {1},
AchievementCategory.ONE_IN_THE_QUIVER),
new String[]{"One in the Quiver.Perfectionist"},
new String[]{"Win without dying"},
new int[]{1},
AchievementCategory.ONE_IN_THE_QUIVER),
OITQ_SHARPSHOOTER("SharpShooter", 1200,
new String[] {"One in the Quiver.Sharpshooter"},
new String[] {"Hit with 8 Arrows in a row"},
new int[] {1},
AchievementCategory.ONE_IN_THE_QUIVER),
new String[]{"One in the Quiver.Sharpshooter"},
new String[]{"Hit with 8 Arrows in a row"},
new int[]{1},
AchievementCategory.ONE_IN_THE_QUIVER),
OITQ_WHATS_A_BOW("What's A Bow?", 1200,
new String[]{"One in the Quiver.WhatsABow"},
new String[]{"Win a game without using a bow"},
new int[]{1},
AchievementCategory.ONE_IN_THE_QUIVER),
//Super Spleef
SPLEEF_WINS("Spleef King (or Queen)", 600,
new String[] {"Super Spleef.Wins"},
new String[] {"Win 50 games of Super Spleef"},
new int[] {50},
AchievementCategory.SPLEEF),
new String[]{"Super Spleef.Wins"},
new String[]{"Win 50 games of Super Spleef"},
new int[]{50},
AchievementCategory.SPLEEF),
SPLEEF_DEMOLITIONIST("Demolitionist", 1000,
new String[]{"Super Spleef.SpleefBlocks"},
new String[]{"Destroy 20,000 blocks."},
new int[]{20000},
AchievementCategory.SPLEEF),
//Bacon Brawl
BACON_BRAWL_WINS("King of Bacon", 600,
new String[] {"Bacon Brawl.Wins"},
new String[] {"Win 50 games of Bacon Brawl"},
new int[] {50},
AchievementCategory.BACON_BRAWL),
new String[]{"Bacon Brawl.Wins"},
new String[]{"Win 50 games of Bacon Brawl"},
new int[]{50},
AchievementCategory.BACON_BRAWL),
//Sneaky Assassins
SNEAKY_ASSASSINS_WINS("So So Sneaky", 600,
new String[] {"Sneaky Assassins.Wins"},
new String[] {"Win 50 games of Sneaky Assassins"},
new int[] {50},
AchievementCategory.SNEAKY_ASSASSINS),
new String[]{"Sneaky Assassins.Wins"},
new String[]{"Win 50 games of Sneaky Assassins"},
new int[]{50},
AchievementCategory.SNEAKY_ASSASSINS),
SNEAK_ASSASSINS_MASTER_ASSASSIN("Master Assassin", 600,
new String[]{"Sneaky Assassins.MasterAssassin"},
new String[]{"Get Master Assassin 10 times"},
new int[]{10},
AchievementCategory.SNEAKY_ASSASSINS),
SNEAK_ASSASSINS_THE_MASTERS_MASTER("The Master's Master", 700,
new String[]{"Sneaky Assassins.TheMastersMaster"},
new String[]{"Kill a Master Assassin without having a single power-up."},
new int[]{1},
AchievementCategory.SNEAKY_ASSASSINS),
SNEAK_ASSASSINS_INCOMPETENCE("Incompetence", 600,
new String[]{"Sneaky Assassins.Incompetence"},
new String[]{"Kill 500 NPCs."},
new int[]{500},
AchievementCategory.SNEAKY_ASSASSINS),
SNEAK_ASSASSINS_I_SEE_YOU("I See You", 800,
new String[]{"Sneaky Assassins.ISeeYou"},
new String[]{"Reveal 250 players."},
new int[]{250},
AchievementCategory.SNEAKY_ASSASSINS),
//Micro Battle
MICRO_BATTLE_WINS("Micro Champion", 600,
new String[] {"Micro Battle.Wins"},
new String[] {"Win 100 games of Micro Battle"},
new int[] {100},
AchievementCategory.MICRO_BATTLE),
;
new String[]{"Micro Battle.Wins"},
new String[]{"Win 100 games of Micro Battle"},
new int[]{100},
AchievementCategory.MICRO_BATTLE),
MICRO_BATTLE_ANNIHILATION("Annihilation", 1200,
new String[]{"Micro Battle.Annihilation"},
new String[]{"Kill 12 players in one game"},
new int[]{1},
AchievementCategory.MICRO_BATTLE),
//MineStrike
MINE_STRIKE_WINS("Striker", 0,
new String[]{"MineStrike.Wins"},
new String[]{"Win 50 games of MineStrike"},
new int[]{50},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_BOOM_HEADSHOT("BOOM! HEADSHOT!", 0,
new String[]{"MineStrike.BoomHeadshot"},
new String[]{"Win 500 people with headshots"},
new int[]{500},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_ACE("Ace", 0,
new String[]{"MineStrike.Ace"},
new String[]{"Get the kill on all enemies in a single round"},
new int[]{1},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_KABOOM("Kaboom!", 0,
new String[]{"MineStrike.Kaboom"},
new String[]{"Kill two people with a single High Explosive Grenade"},
new int[]{1},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_ASSASSINATION("Assassination", 0,
new String[]{"MineStrike.Assassination"},
new String[]{"Get 20 backstab kills with the knife"},
new int[]{20},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_CLUTCH_OR_KICK("Clutch or Kick", 0,
new String[]{"MineStrike.ClutchOrKick"},
new String[]{"Be the last one alive, and kill 3+ enemies to achieve victory"},
new int[]{1},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_KILLING_SPREE("Killing Spree", 0,
new String[]{"MineStrike.KillingSpree"},
new String[]{"Kill 4 enemies in a row with no more than 5 seconds between each kill"},
new int[]{1},
AchievementCategory.MINE_STRIKE),
MINE_STRIKE_BLINDFOLDED("Blindfolded", 0,
new String[]{"MineStrike.Blindfolded"},
new String[]{"Kill 2 enemies while blinded from a single flashbang"},
new int[]{1},
AchievementCategory.MINE_STRIKE),
;
private String _name;
private String[] _desc;
private String[] _stats;
@ -488,32 +581,32 @@ public enum Achievement
_levels = levels;
_category = category;
}
public String getName()
{
return _name;
}
public String[] getDesc()
{
return _desc;
}
public String[] getStats()
{
return _stats;
}
public int[] getLevels()
{
return _levels;
}
public int getMaxLevel()
{
return _levels.length;
}
public boolean isOngoing()
{
return _levels[0] > 1;
@ -528,23 +621,23 @@ public enum Achievement
{
return _category;
}
public AchievementData getLevelData(int exp)
{
for (int i=0 ; i<_levels.length ; i++)
for (int i = 0; i < _levels.length; i++)
{
int req = _levels[i];
//Has Experience, Level Up!
if (exp >= req)
{
exp -= req;
continue;
}
return new AchievementData(i, exp, req);
}
return new AchievementData(getMaxLevel(), -1, -1);
}

View File

@ -130,7 +130,12 @@ public enum AchievementCategory
MICRO_BATTLE("Micro Battle", null,
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
new String[] {"Wins", "Losses", "Kills", "Deaths", "Gems Earned"},
Material.LAVA, 0, GameCategory.ARCADE);
Material.LAVA, 0, GameCategory.ARCADE),
MINE_STRIKE("MineStrike", null,
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
new String[] {"Wins", "Losses", "Kills", "Deaths", "Gems Earned"},
Material.IRON_AXE, 0, GameCategory.ARCADE);
private String _name;

View File

@ -348,7 +348,7 @@ public class AntiHack extends MiniPlugin
}
else
{
UtilPlayer.message(player, C.cGold + C.Bold + "----------------------------------------------------");
UtilPlayer.message(player, C.cGold + C.Strike + "---------------------------------------------");
UtilPlayer.message(player, "");
UtilPlayer.message(player, C.cGold + "Mineplex Anti-Cheat");
UtilPlayer.message(player, "");
@ -356,7 +356,7 @@ public class AntiHack extends MiniPlugin
UtilPlayer.message(player, "Cheating may result in a " + C.cRed + "Permanent Ban" + C.cWhite + ".");
UtilPlayer.message(player, "If you were not cheating, you will not be banned.");
UtilPlayer.message(player, "");
UtilPlayer.message(player, C.cGold + C.Bold + "----------------------------------------------------");
UtilPlayer.message(player, C.cGold + C.Strike + "---------------------------------------------");
Portal.SendPlayerToServer(player, "Lobby");
}

View File

@ -154,8 +154,6 @@ public class MorphBlock extends MorphGadget
@EventHandler
public void itemSpawnCancel(ItemSpawnEvent event)
{
System.out.println("B");
Iterator<FallingBlock> blockIterator = _blocks.iterator();
while (blockIterator.hasNext())

View File

@ -589,7 +589,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
return;
//Dont Let Chat Near Spawn!
if (UtilMath.offset2d(GetSpawn(), event.getPlayer().getLocation()) == 0)
if (UtilMath.offset2d(GetSpawn(), event.getPlayer().getLocation()) == 0 && !_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.HELPER))
{
UtilPlayer.message(event.getPlayer(), F.main("Chat", "You must leave spawn before you can chat!"));
event.setCancelled(true);

View File

@ -14,6 +14,7 @@
<orderEntry type="library" name="craftbukkit" level="project" />
<orderEntry type="library" name="jooq" level="project" />
<orderEntry type="module" module-name="Mineplex.Database" />
<orderEntry type="module" module-name="Mineplex.ServerData" />
</component>
</module>

View File

@ -41,10 +41,8 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
@ -67,7 +65,7 @@ import nautilus.game.arcade.ore.OreHider;
import nautilus.game.arcade.ore.OreObsfucation;
import nautilus.game.arcade.stats.BridgesSniperStatTracker;
import nautilus.game.arcade.stats.DeathBomberStatTracker;
import nautilus.game.arcade.stats.FastKillsStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
import nautilus.game.arcade.stats.FoodForTheMassesStatTracker;
import nautilus.game.arcade.stats.TntMinerStatTracker;
@ -199,7 +197,7 @@ public class Bridge extends TeamGame implements OreObsfucation
new FoodForTheMassesStatTracker(this),
new BridgesSniperStatTracker(this),
new TntMinerStatTracker(this),
new FastKillsStatTracker(this, 4, 10, "Rampage"),
new KillFastStatTracker(this, 4, 10, "Rampage"),
new DeathBomberStatTracker(this)
);
}

View File

@ -13,7 +13,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.stats.BackstabKillStatTracker;
import nautilus.game.arcade.stats.KillReasonStatTracker;
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
import nautilus.game.arcade.stats.SeismicSlamStatTracker;
import nautilus.game.arcade.stats.TheLongestShotStatTracker;
@ -61,7 +61,7 @@ public class ChampionsDominate extends Domination
EloStart = 1000;
registerStatTrackers(
new BackstabKillStatTracker(this),
new KillReasonStatTracker(this, "Backstab", "Assassination"),
new ElectrocutionStatTracker(this),
new TheLongestShotStatTracker(this),
new SeismicSlamStatTracker(this)

View File

@ -17,7 +17,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.stats.BackstabKillStatTracker;
import nautilus.game.arcade.stats.KillReasonStatTracker;
import nautilus.game.arcade.stats.ElectrocutionStatTracker;
import nautilus.game.arcade.stats.KillAllOpposingStatTracker;
import nautilus.game.arcade.stats.SeismicSlamStatTracker;
@ -61,7 +61,7 @@ public class ChampionsTDM extends TeamDeathmatch
registerStatTrackers(
new WinWithoutLosingTeammateStatTracker(this, "FlawlessVictory"),
new KillAllOpposingStatTracker(this),
new BackstabKillStatTracker(this),
new KillReasonStatTracker(this, "Backstab", "Assassination"),
new ElectrocutionStatTracker(this),
new TheLongestShotStatTracker(this),
new SeismicSlamStatTracker(this)

View File

@ -24,6 +24,7 @@ import nautilus.game.arcade.GameType;
import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.micro.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.KillsWithinGameStatTracker;
public class Micro extends TeamGame
{
@ -58,6 +59,8 @@ public class Micro extends TeamGame
this.BlockBreak = true;
this.BlockPlace = true;
registerStatTrackers(new KillsWithinGameStatTracker(this, 12, "Annihilation"));
}
@Override

View File

@ -25,8 +25,10 @@ import org.bukkit.entity.Painting;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.Snowball;
import org.bukkit.event.Event;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityRegainHealthEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.event.entity.ItemDespawnEvent;
@ -37,6 +39,7 @@ import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.painting.PaintingBreakEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
@ -101,10 +104,75 @@ 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.stats.KaboomStatTracker;
import nautilus.game.arcade.stats.KillAllOpposingMineStrikeRoundStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
import nautilus.game.arcade.stats.KillReasonStatTracker;
import nautilus.game.arcade.stats.KillsWithConditionStatTracker;
import nautilus.game.arcade.stats.MineStrikeLastAliveKillStatTracker;
import net.minecraft.server.v1_7_R4.EntityArrow;
public class MineStrike extends TeamGame
{
public static class PlayerHeadshotEvent extends PlayerEvent
{
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList()
{
return handlers;
}
@Override
public HandlerList getHandlers()
{
return getHandlerList();
}
private final Player _shooter;
public PlayerHeadshotEvent(Player who, Player shooter)
{
super(who);
_shooter = shooter;
}
public Player getShooter()
{
return _shooter;
}
}
public static class RoundOverEvent extends Event
{
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList()
{
return handlers;
}
@Override
public HandlerList getHandlers()
{
return getHandlerList();
}
private final Game _game;
public RoundOverEvent(Game game)
{
_game = game;
}
public Game getGame()
{
return _game;
}
}
//Managers
private ShopManager _shopManager;
@ -214,6 +282,16 @@ public class MineStrike extends TeamGame
"Rifles have 30% recoil reduction while scoped",
"Pick up better weapons from dead players"
};
registerStatTrackers(
new KillReasonStatTracker(this, "Headshot", "BoomHeadshot"),
new KillAllOpposingMineStrikeRoundStatTracker(this),
new KaboomStatTracker(this),
new KillReasonStatTracker(this, "Backstab", "Assassination"),
new MineStrikeLastAliveKillStatTracker(this),
new KillFastStatTracker(this, 4, 5, "KillingSpree"),
new KillsWithConditionStatTracker(this, "Blindfolded", ConditionType.BLINDNESS, "Flash Bang", 2)
);
}
@Override
@ -1125,7 +1203,7 @@ public class MineStrike extends TeamGame
if (check.subtract(from).length() < 0.8)
{
//Damage
event.AddMod(damager.getName(), "Knife", 40 - event.GetDamage(), false);
event.AddMod(damager.getName(), "Knife (Backstab)", 40 - event.GetDamage(), false);
//Effect
damagee.getWorld().playSound(damagee.getLocation(), Sound.IRONGOLEM_DEATH, 1f, 1f);
@ -1195,6 +1273,8 @@ public class MineStrike extends TeamGame
//Headshot
if (hitArea == 1)
{
Bukkit.getPluginManager().callEvent(new PlayerHeadshotEvent(bullet.Shooter, event.GetDamageePlayer()));
event.AddMod(bullet.Shooter.getName(), "Headshot", damage*2, true);
//Wearing Helmet
@ -1774,6 +1854,8 @@ public class MineStrike extends TeamGame
if (_roundOver)
return;
Bukkit.getPluginManager().callEvent(new RoundOverEvent(this));
_roundOver = true;
String winnerLine = C.Bold + "The round was a draw!";

View File

@ -1,6 +1,7 @@
package nautilus.game.arcade.game.games.minestrike.items.grenades;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -8,6 +9,8 @@ import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
@ -21,6 +24,48 @@ import nautilus.game.arcade.game.games.minestrike.items.StrikeItemType;
public abstract class Grenade extends StrikeItem
{
public static class GrenadeExplodeEvent extends Event
{
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList()
{
return handlers;
}
@Override
public HandlerList getHandlers()
{
return getHandlerList();
}
private final Grenade _grenade;
private final Player _thrower;
private final List<Player> _damagedPlayers;
public GrenadeExplodeEvent(Grenade grenade, Player thrower, List<Player> damagedPlayers)
{
_grenade = grenade;
_thrower = thrower;
_damagedPlayers = damagedPlayers;
}
public Grenade getGrenade()
{
return _grenade;
}
public List<Player> getDamagedPlayers()
{
return _damagedPlayers;
}
public Player getThrower()
{
return _thrower;
}
}
protected Player _thrower = null;
protected Vector _vel;

View File

@ -1,6 +1,8 @@
package nautilus.game.arcade.game.games.minestrike.items.grenades;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
@ -9,6 +11,7 @@ import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.minestrike.MineStrike;
import nautilus.game.arcade.game.games.minestrike.Radio;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Sound;
@ -38,6 +41,7 @@ public class HighExplosive extends Grenade
Sound.EXPLODE, 3f, 0.8f);
HashMap<Player, Double> players = UtilPlayer.getInRadius(ent.getLocation(), 10);
List<Player> damagedPlayers = new ArrayList<>();
for (Player player : players.keySet())
{
if (!game.IsAlive(player))
@ -47,8 +51,12 @@ public class HighExplosive extends Grenade
game.Manager.GetDamage().NewDamageEvent(player, _thrower, null,
DamageCause.CUSTOM, 1 + (players.get(player) * 18),
true, true, false, _thrower.getName(), getName());
damagedPlayers.add(player);
}
Bukkit.getPluginManager().callEvent(new GrenadeExplodeEvent(this, _thrower, damagedPlayers));
return true;
}

View File

@ -27,7 +27,6 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityRegainHealthEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
@ -56,7 +55,7 @@ import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.game.games.paintball.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.FastKillsStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
import nautilus.game.arcade.stats.LastStandStatTracker;
import nautilus.game.arcade.stats.MedicStatTracker;
import nautilus.game.arcade.stats.WinFastStatTracker;
@ -118,7 +117,7 @@ public class Paintball extends TeamGame
this.HungerSet = 20;
registerStatTrackers(
new FastKillsStatTracker(this, 4, 5, "KillingSpree"),
new KillFastStatTracker(this, 4, 5, "KillingSpree"),
new WinWithoutLosingTeammateStatTracker(this, "FlawlessVictory"),
new MedicStatTracker(this),
new WinFastStatTracker(this, 20, "Speedrunner"),

View File

@ -33,6 +33,7 @@ import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.quiver.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.SharpShooterStatTracker;
import nautilus.game.arcade.stats.WinWithoutBowStatTracker;
import nautilus.game.arcade.stats.WinWithoutDyingStatTracker;
public class Quiver extends SoloGame
@ -63,7 +64,6 @@ public class Quiver extends SoloGame
"First player to 20 kills wins."
});
this.StrictAntiHack = true;
this.HungerSet = 20;
this.DeathOut = false;
this.DamageSelf = false;
@ -78,7 +78,8 @@ public class Quiver extends SoloGame
registerStatTrackers(
new WinWithoutDyingStatTracker(this, "Perfectionist"),
new SharpShooterStatTracker(this)
new SharpShooterStatTracker(this),
new WinWithoutBowStatTracker(this, "WhatsABow")
);
}

View File

@ -20,16 +20,16 @@ public class KitLeaper extends Kit
{
public KitLeaper(ArcadeManager manager)
{
super(manager, "Leaper", KitAvailability.Free,
super(manager, "Jumper", KitAvailability.Free,
new String[]
{
"Evade and kill using your leap!"
"Evade and kill using your double jump!"
},
new Perk[]
{
new PerkLeap("Leap", 1.2, 1, 3000)
new PerkDoubleJump("Double Jump", 0.9, 0.9, true)
},
EntityType.ZOMBIE,
new ItemStack(Material.IRON_AXE));

View File

@ -32,6 +32,8 @@ 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.stats.DistanceTraveledStatTracker;
import net.minecraft.server.v1_7_R4.EntityArrow;
public class Runner extends SoloGame implements IThrown
@ -62,6 +64,8 @@ public class Runner extends SoloGame implements IThrown
this.WorldWaterDamage = 4;
this.PrepareFreeze = false;
registerStatTrackers(new DistanceTraveledStatTracker(this, "MarathonRunner"));
}
@EventHandler

View File

@ -32,7 +32,7 @@ import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.game.games.smash.kits.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.FastKillsStatTracker;
import nautilus.game.arcade.stats.KillFastStatTracker;
import nautilus.game.arcade.stats.FreeKitWinStatTracker;
import nautilus.game.arcade.stats.OneVThreeStatTracker;
import nautilus.game.arcade.stats.RecoveryMasterStatTracker;
@ -95,7 +95,7 @@ public class SuperSmash extends SoloGame
new WinWithoutDyingStatTracker(this, "MLGPro"),
new FreeKitWinStatTracker(this),
new OneVThreeStatTracker(this),
new FastKillsStatTracker(this, 3, 10, "TripleKill"),
new KillFastStatTracker(this, 3, 10, "TripleKill"),
new RecoveryMasterStatTracker(this)
);
}

View File

@ -50,8 +50,8 @@ public class KitChicken extends SmashKit
new String[]
{
ChatColor.RESET + "Unleash a barrage of your precious eggs.",
ChatColor.RESET + "They won't deal any knockback, but if",
ChatColor.RESET + "they they can deal some serious damage.",
ChatColor.RESET + "They won't deal any knockback, but they",
ChatColor.RESET + "can deal some serious damage.",
}));
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1,

View File

@ -13,11 +13,15 @@ import nautilus.game.arcade.game.games.sneakyassassins.kits.*;
import nautilus.game.arcade.game.games.sneakyassassins.npc.*;
import nautilus.game.arcade.game.games.sneakyassassins.powerups.*;
import nautilus.game.arcade.kit.*;
import nautilus.game.arcade.stats.KillEntityStatTracker;
import nautilus.game.arcade.stats.MasterAssassinStatTracker;
import nautilus.game.arcade.stats.RevealStatTracker;
import nautilus.game.arcade.stats.TheMastersMasterStatTracker;
import org.bukkit.*;
import org.bukkit.entity.*;
import org.bukkit.event.*;
import org.bukkit.event.entity.*;
import org.bukkit.event.hanging.*;
import org.bukkit.event.player.*;
import org.bukkit.potion.*;
@ -40,6 +44,7 @@ public class SneakyAssassins extends SoloGame
private PowerUpManager _powerUpManager;
private EntityType _disguiseType = EntityType.VILLAGER;
private int _revealCountdown = 60;
private KillEntityStatTracker _killEntityStatTracker;
public SneakyAssassins(ArcadeManager manager)
{
@ -74,6 +79,15 @@ public class SneakyAssassins extends SoloGame
this.CompassGiveItem = false;
Manager.getCosmeticManager().setHideParticles(true);
_killEntityStatTracker = new KillEntityStatTracker(this, "Incompetence", _npcManager.getDisguiseType());
registerStatTrackers(
new MasterAssassinStatTracker(this),
new TheMastersMasterStatTracker(this),
new RevealStatTracker(this, "ISeeYou"),
_killEntityStatTracker
);
}
@Override
@ -88,6 +102,7 @@ public class SneakyAssassins extends SoloGame
_disguiseType = EntityType.valueOf(disguiseTypeName.toUpperCase());
_npcManager.setDisguiseType(_disguiseType);
_killEntityStatTracker.setEntityType(_disguiseType);
for (Kit kit : GetKits())
kit.setEntityType(_disguiseType);

View File

@ -0,0 +1,41 @@
package nautilus.game.arcade.game.games.sneakyassassins.event;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
public class PlayerMasterAssassinEvent extends PlayerEvent implements Cancellable
{
private static final HandlerList _handlers = new HandlerList();
public static HandlerList getHandlerList()
{
return _handlers;
}
@Override
public HandlerList getHandlers()
{
return getHandlerList();
}
private boolean _cancelled = false;
@Override
public boolean isCancelled()
{
return _cancelled;
}
@Override
public void setCancelled(boolean cancelled)
{
_cancelled = cancelled;
}
public PlayerMasterAssassinEvent(Player who)
{
super(who);
}
}

View File

@ -7,6 +7,8 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.events.*;
import nautilus.game.arcade.game.*;
import nautilus.game.arcade.game.Game.*;
import nautilus.game.arcade.game.games.sneakyassassins.event.PlayerMasterAssassinEvent;
import org.bukkit.*;
import org.bukkit.entity.*;
import org.bukkit.event.*;
@ -190,14 +192,23 @@ public class PowerUpManager implements Listener
//Master
if (count == 4)
{
PowerUpType.COMPASS.powerUpPlayer(closestPlayer, getRandom());
PlayerMasterAssassinEvent pmae = new PlayerMasterAssassinEvent(closestPlayer);
UtilPlayer.message(closestPlayer, F.main("Game", "You now have a " + F.item("Compass") + " for tracking players"));
Bukkit.getPluginManager().callEvent(pmae);
getGame().Announce(F.main("Game", F.name(C.Bold + closestPlayer.getName()) + " has become a " + F.skill(C.Bold + "Master Assassin")));
if (!pmae.isCancelled())
{
PowerUpType.COMPASS.powerUpPlayer(closestPlayer, getRandom());
for (Player player : UtilServer.getPlayers())
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1f, 1f);
UtilPlayer.message(closestPlayer, F.main("Game", "You now have a " + F.item("Compass") + " for tracking players"));
getGame().Announce(F.main("Game", F.name(C.Bold + closestPlayer.getName()) + " has become a " + F.skill(C.Bold + "Master Assassin")));
for (Player player : UtilServer.getPlayers())
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1f, 1f);
incrementPowerUpCount(closestPlayer);
}
}
//Armor + Weapon
else
@ -208,9 +219,9 @@ public class PowerUpManager implements Listener
UtilPlayer.message(closestPlayer, F.main("Game", "Your " + F.item("Sword") + " and " + F.item("Armor") + " have been upgraded!"));
getGame().Announce(F.main("Game", F.name(closestPlayer.getName()) + " collected a " + F.skill("Powerup") + "."));
}
incrementPowerUpCount(closestPlayer);
incrementPowerUpCount(closestPlayer);
}
}
schedulePowerUpSpawn(10);

View File

@ -3,34 +3,28 @@ package nautilus.game.arcade.game.games.survivalgames;
import java.util.*;
import java.util.Map.Entry;
import mineplex.core.achievement.*;
import org.bukkit.*;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Chest;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Firework;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
import org.bukkit.entity.Snowball;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockBurnEvent;
import org.bukkit.event.block.BlockFadeEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.block.BlockSpreadEvent;
import org.bukkit.event.block.LeavesDecayEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.hanging.HangingBreakEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerInteractEvent;
@ -71,10 +65,8 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.games.survivalgames.kit.*;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.FastKillsStatTracker;
import nautilus.game.arcade.stats.FirstSupplyDropOpenStatTracker;
import nautilus.game.arcade.stats.KillsWithinTimeLimitStatTracker;
import nautilus.game.arcade.stats.SimultaneousSkeletonStatTracker;

View File

@ -1109,8 +1109,9 @@ public class UHC extends TeamGame
teamsAlive.add(team);
//Offline Player Team
for (GameTeam team : RejoinTeam.values())
teamsAlive.add(team);
if (!QuitOut)
for (GameTeam team : RejoinTeam.values())
teamsAlive.add(team);
if (teamsAlive.size() <= 1)
{

View File

@ -19,6 +19,36 @@ import java.util.*;
public class PerkRevealer extends Perk implements IThrown
{
public static class PlayerRevealEvent extends PlayerEvent
{
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlerList()
{
return handlers;
}
@Override
public HandlerList getHandlers()
{
return getHandlerList();
}
private final LivingEntity _revealer;
public PlayerRevealEvent(Player who, LivingEntity revealer)
{
super(who);
_revealer = revealer;
}
public LivingEntity getRevealer()
{
return _revealer;
}
}
private static final FireworkEffect REVEALER_FIREWORK_EFFECT = FireworkEffect
.builder()
.flicker(false)
@ -132,6 +162,8 @@ public class PerkRevealer extends Perk implements IThrown
if (info == null)
{
Bukkit.getPluginManager().callEvent(new PlayerRevealEvent(player, data.GetThrower()));
info = new RevealedPlayerInfo(Manager.GetDisguise().getDisguise(player));
getRevealedPlayers().put(player, info);

View File

@ -1,81 +0,0 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
public class BackstabKillStatTracker extends StatTracker<Game>
{
private final Map<UUID, Set<UUID>> _hasDamaged = new HashMap<>();
public BackstabKillStatTracker(Game game)
{
super(game);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null)
return;
if (event.GetLog().GetPlayer() == null)
return;
if (!event.GetLog().GetPlayer().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
if (player == null)
return;
if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().contains("Backstab"))
{
Set<UUID> hasDamaged = _hasDamaged.get(player.getUniqueId());
if (hasDamaged == null || !hasDamaged.contains(killer.getUniqueId()))
addStat(killer, "Assassination", 1, false, false);
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCustomDamage(CustomDamageEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetDamageePlayer() != null && event.GetDamagerPlayer(true) != null)
{
Set<UUID> hasDamaged = _hasDamaged.get(event.GetDamagerPlayer(true).getUniqueId());
if (hasDamaged == null)
{
hasDamaged = new HashSet<>();
_hasDamaged.put(event.GetDamagerPlayer(true).getUniqueId(), hasDamaged);
}
hasDamaged.add(event.GetDamageePlayer().getUniqueId());
}
}
}

View File

@ -0,0 +1,84 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerTeleportEvent;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
public class DistanceTraveledStatTracker extends StatTracker<Game>
{
private final Map<Player, Location> _lastLocation = new HashMap<>();
private final Map<Player, Double> _distanceTraveled = new HashMap<>();
private final String _statName;
public DistanceTraveledStatTracker(Game game, String statName)
{
super(game);
_statName = statName;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onGameStateChange(GameStateChangeEvent event)
{
if (event.GetState() == Game.GameState.Live)
{
for (Player player : getGame().GetPlayers(true))
_lastLocation.put(player, player.getLocation());
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onUpdate(UpdateEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.getType() == UpdateType.SEC)
{
for (Player player : getGame().GetPlayers(true))
{
Location lastLocation = _lastLocation.put(player, player.getLocation());
if (lastLocation != null && lastLocation.getWorld() == player.getLocation().getWorld())
{
Double distance = _distanceTraveled.get(player);
if (distance == null)
distance = 0.0;
_distanceTraveled.put(player, distance + lastLocation.distance(player.getLocation()));
}
}
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onPlayerTeleport(PlayerTeleportEvent event)
{
_lastLocation.remove(event.getPlayer());
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onGameEnd(GameStateChangeEvent event)
{
if (event.GetState() == Game.GameState.End)
{
for (Map.Entry<Player, Double> entry : _distanceTraveled.entrySet())
getGame().AddStat(entry.getKey(), getStatName(), (int) Math.round(entry.getValue()), false, false);
}
}
public String getStatName()
{
return _statName;
}
}

View File

@ -20,7 +20,7 @@ public class GamesPlayedStatTracker extends StatTracker<Game>
if (event.GetState() == Game.GameState.Live)
{
for (Player player : getGame().GetPlayers(true))
getGame().AddStat(player, "GamesPlayed", 1, false, true);
addStat(player, "GamesPlayed", 1, false, true);
}
}
}

View File

@ -0,0 +1,30 @@
package nautilus.game.arcade.stats;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.games.minestrike.MineStrike;
public class HeadShotStatTracker extends StatTracker<Game>
{
private final String _statName;
public HeadShotStatTracker(Game game, String statName)
{
super(game);
_statName = statName;
}
public String getStatName()
{
return _statName;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onPlayerHeadshot(MineStrike.PlayerHeadshotEvent event)
{
addStat(event.getShooter(), "Headshot", 1, false, false);
}
}

View File

@ -0,0 +1,35 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import nautilus.game.arcade.game.games.minestrike.MineStrike;
import nautilus.game.arcade.game.games.minestrike.items.grenades.Grenade;
import nautilus.game.arcade.game.games.minestrike.items.grenades.HighExplosive;
public class KaboomStatTracker extends StatTracker<MineStrike>
{
public KaboomStatTracker(MineStrike game)
{
super(game);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onGrenadeExplode(Grenade.GrenadeExplodeEvent event)
{
if (event.getGrenade() instanceof HighExplosive)
{
if (event.getDamagedPlayers().size() >= 2)
{
for (Player player : event.getDamagedPlayers())
{
if (!player.isDead())
return;
}
addStat(event.getThrower(), "Kaboom", 1, true, false);
}
}
}
}

View File

@ -0,0 +1,101 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.minestrike.MineStrike;
public class KillAllOpposingMineStrikeRoundStatTracker extends StatTracker<MineStrike>
{
private final Map<UUID, Set<UUID>> _kills = new HashMap<>();
public KillAllOpposingMineStrikeRoundStatTracker(MineStrike game)
{
super(game);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null)
return;
if (event.GetLog().GetPlayer() == null)
return;
if (!event.GetLog().GetPlayer().IsPlayer())
return;
Player killed = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
if (killed == null)
return;
Set<UUID> kills = _kills.get(killer.getUniqueId());
if (kills == null)
{
kills = new HashSet<>();
_kills.put(killer.getUniqueId(), kills);
}
kills.add(killed.getUniqueId());
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onRoundOver(MineStrike.RoundOverEvent event)
{
for (GameTeam team : getGame().GetTeamList())
{
for (Player player : team.GetPlayers(false))
{
Set<UUID> kills = _kills.get(player.getUniqueId());
if (kills == null)
continue;
for (GameTeam otherTeam : getGame().GetTeamList())
{
if (otherTeam == team)
continue;
boolean killedAll = true;
for (Player otherPlayer : otherTeam.GetPlayers(true))
{
if (!kills.contains(otherPlayer.getUniqueId()))
{
killedAll = false;
break;
}
}
if (killedAll)
addStat(player, "Ace", 1, true, false);
}
}
}
_kills.clear();
}
}

View File

@ -0,0 +1,60 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import nautilus.game.arcade.game.Game;
public class KillEntityStatTracker extends StatTracker<Game>
{
private final String _statName;
private EntityType _entityType;
public KillEntityStatTracker(Game game, String statName, EntityType entityType)
{
super(game);
_statName = statName;
setEntityType(entityType);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onEntityDeath(EntityDeathEvent event)
{
if (event.getEntity().getType() != getEntityType())
return;
if (!(event.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent))
return;
EntityDamageByEntityEvent edbee = (EntityDamageByEntityEvent) event.getEntity();
Player damager = null;
if (edbee.getDamager() instanceof Player)
damager = (Player) edbee.getDamager();
else if (edbee.getDamager() instanceof Projectile && ((Projectile) edbee.getDamager()).getShooter() instanceof Player)
damager = (Player) ((Projectile) edbee.getDamager()).getShooter();
if (damager != null)
addStat(damager, getStatName(), 1, false, false);
}
public String getStatName()
{
return _statName;
}
public EntityType getEntityType()
{
return _entityType;
}
public void setEntityType(EntityType entityType)
{
_entityType = entityType;
}
}

View File

@ -12,7 +12,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.game.Game;
public class FastKillsStatTracker extends StatTracker<Game>
public class KillFastStatTracker extends StatTracker<Game>
{
private final Map<UUID, Integer> _killCount = new HashMap<>();
private final Map<UUID, Long> _lastKillTime = new HashMap<>();
@ -21,7 +21,7 @@ public class FastKillsStatTracker extends StatTracker<Game>
private final String _stat;
private final int _timeBetweenKills;
public FastKillsStatTracker(Game game, int requiredKillCount, int timeBetweenKills, String stat)
public KillFastStatTracker(Game game, int requiredKillCount, int timeBetweenKills, String stat)
{
super(game);

View File

@ -0,0 +1,63 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.game.Game;
public class KillReasonStatTracker extends StatTracker<Game>
{
private final String _reason;
private final String _statName;
public KillReasonStatTracker(Game game, String reason, String statName)
{
super(game);
_reason = reason;
_statName = statName;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null)
return;
if (event.GetLog().GetPlayer() == null)
return;
if (!event.GetLog().GetPlayer().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
if (player == null)
return;
if (event.GetLog().GetLastDamager() != null && event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().contains(getReason()))
addStat(killer, getStatName(), 1, false, false);
}
public String getStatName()
{
return _statName;
}
public String getReason()
{
return _reason;
}
}

View File

@ -0,0 +1,94 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.condition.Condition;
import mineplex.minecraft.game.core.condition.events.ConditionApplyEvent;
import nautilus.game.arcade.game.Game;
public class KillsWithConditionStatTracker extends StatTracker<Game>
{
private final String _statName;
private final Condition.ConditionType _conditionType;
private final String _conditionReason;
private final int _necessaryKillCount;
private final Map<UUID, Integer> _kills = new HashMap<>();
public KillsWithConditionStatTracker(Game game, String statName, Condition.ConditionType conditionType, String conditionReason, int necessaryKillCount)
{
super(game);
_statName = statName;
_conditionType = conditionType;
_conditionReason = conditionReason;
_necessaryKillCount = necessaryKillCount;
}
public String getStatName()
{
return _statName;
}
public int getNecessaryKillCount()
{
return _necessaryKillCount;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onConditionApply(ConditionApplyEvent event)
{
if (event.GetCondition().GetEnt() instanceof Player)
{
if (event.GetCondition().GetReason() != null && event.GetCondition().GetReason().contains(getConditionReason()))
_kills.remove(event.GetCondition().GetEnt().getUniqueId());
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (player == null)
return;
Condition condition = getGame().Manager.GetCondition().GetActiveCondition(player, getConditionType());
if (condition != null && condition.GetType() == getConditionType() && condition.GetReason() != null && condition.GetReason().contains("Flash Bang"))
{
Integer kills = _kills.get(player.getUniqueId());
kills = (kills == null ? 0 : kills) + 1;
_kills.put(player.getUniqueId(), kills);
if (kills == getNecessaryKillCount())
addStat(player, getStatName(), 1, true, false);
}
else
_kills.remove(player.getUniqueId());
}
public Condition.ConditionType getConditionType()
{
return _conditionType;
}
public String getConditionReason()
{
return _conditionReason;
}
}

View File

@ -0,0 +1,62 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.game.Game;
public class KillsWithinGameStatTracker extends StatTracker<Game>
{
private final int _necessarykillCount;
private final String _statName;
private final Map<UUID, Integer> _kills = new HashMap<>();
public KillsWithinGameStatTracker(Game game, int necessarykillCount, String statName)
{
super(game);
_necessarykillCount = necessarykillCount;
_statName = statName;
}
public String getStatName()
{
return _statName;
}
public int getNecessarykillCount()
{
return _necessarykillCount;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (player == null)
return;
Integer killCount = _kills.get(player.getUniqueId());
killCount = (killCount == null ? 0 : killCount) + 1;
_kills.put(player.getUniqueId(), killCount);
if (killCount == 12)
addStat(player, getStatName(), 1, true, false);
}
}

View File

@ -0,0 +1,21 @@
package nautilus.game.arcade.stats;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.games.sneakyassassins.event.PlayerMasterAssassinEvent;
public class MasterAssassinStatTracker extends StatTracker<Game>
{
public MasterAssassinStatTracker(Game game)
{
super(game);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onPlayerMasterAssassin(PlayerMasterAssassinEvent event)
{
addStat(event.getPlayer(), "MasterAssassin", 1, false, false);
}
}

View File

@ -0,0 +1,66 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.minestrike.MineStrike;
public class MineStrikeLastAliveKillStatTracker extends StatTracker<MineStrike>
{
private final Map<UUID, Integer> _killCount = new HashMap<>();
public MineStrikeLastAliveKillStatTracker(MineStrike game)
{
super(game);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (player == null)
return;
Integer killCount = _killCount.get(player.getUniqueId());
_killCount.put(player.getUniqueId(), (killCount == null ? 0 : killCount) + 1);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onRoundOver(MineStrike.RoundOverEvent event)
{
for (GameTeam team : getGame().GetTeamList())
{
List<Player> players = team.GetPlayers(true);
if (players.size() == 1)
{
Player player = players.get(0);
Integer killCount = _killCount.get(player.getUniqueId());
if (killCount != null && killCount >= 3)
addStat(player, "ClutchOrKick", 1, true, false);
}
}
_killCount.clear();
}
}

View File

@ -0,0 +1,33 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.games.sneakyassassins.SneakyAssassins;
import nautilus.game.arcade.kit.perks.PerkRevealer;
public class RevealStatTracker extends StatTracker<Game>
{
private final String _statName;
public RevealStatTracker(Game game, String statName)
{
super(game);
_statName = statName;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onPlayerReveal(PerkRevealer.PlayerRevealEvent event)
{
if (event.getRevealer() instanceof Player)
addStat((Player) event.getRevealer(), getStatName(), 1, false, false);
}
public String getStatName()
{
return _statName;
}
}

View File

@ -0,0 +1,48 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.util.UtilPlayer;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.games.sneakyassassins.SneakyAssassins;
public class TheMastersMasterStatTracker extends StatTracker<SneakyAssassins>
{
public TheMastersMasterStatTracker(SneakyAssassins game)
{
super(game);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onCombatDeath(CombatDeathEvent event)
{
if (getGame().GetState() != Game.GameState.Live)
return;
if (event.GetLog().GetKiller() == null)
return;
if (!event.GetLog().GetKiller().IsPlayer())
return;
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null)
return;
if (event.GetLog().GetPlayer() == null)
return;
if (!event.GetLog().GetPlayer().IsPlayer())
return;
Player player = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
if (player == null)
return;
if (getGame().getPowerUpManager().getPowerUpCount(killer) == 0 && getGame().getPowerUpManager().getPowerUpCount(player) >= 4)
addStat(killer, "TheMastersMaster", 1, true, false);
}
}

View File

@ -0,0 +1,39 @@
package nautilus.game.arcade.stats;
import java.util.HashMap;
import java.util.UUID;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import nautilus.game.arcade.game.Game;
public class TimeInGameStatTracker extends StatTracker<Game>
{
private final HashMap<UUID, Long> _joinTimes = new HashMap<>();
public TimeInGameStatTracker(Game game)
{
super(game);
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(PlayerJoinEvent event)
{
_joinTimes.put(event.getPlayer().getUniqueId(), System.currentTimeMillis());
}
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event)
{
Long joinTime = _joinTimes.remove(event.getPlayer().getUniqueId());
if (joinTime != null)
{
int timeInGame = (int) ((System.currentTimeMillis() - joinTime) / 1000);
addStat(event.getPlayer(), "TimeInGame", timeInGame, false, true);
}
}
}

View File

@ -0,0 +1,58 @@
package nautilus.game.arcade.stats;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityShootBowEvent;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
public class WinWithoutBowStatTracker extends StatTracker<Game>
{
private final String _statName;
private final Set<UUID> _hasUsedBow = new HashSet<>();
public WinWithoutBowStatTracker(Game game, String statName)
{
super(game);
_statName = statName;
}
public String getStatName()
{
return _statName;
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onEntityShootBow(EntityShootBowEvent event)
{
if (event.getEntity() instanceof Player)
_hasUsedBow.add(event.getEntity().getUniqueId());
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onGameStateChange(GameStateChangeEvent event)
{
if (event.GetState() == Game.GameState.End)
{
List<Player> winners = getGame().getWinners();
if (winners != null)
{
for (Player winner : winners)
{
if (!_hasUsedBow.contains(winner.getUniqueId()))
addStat(winner, getStatName(), 1, true, false);
}
}
}
}
}