Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-04-19 20:54:04 -07:00
commit 458f5741d7
21 changed files with 216 additions and 43 deletions

View File

@ -110,7 +110,7 @@ public class Explosion extends MiniPlugin
if (!_regenerateGround) if (!_regenerateGround)
{ {
if (cur.getTypeId() != 98 || cur.getData() != 0) if (cur.getTypeId() != 98 || (cur.getData() != 0 && cur.getData() != 3))
cur.setTypeId(0); cur.setTypeId(0);
} }
@ -136,7 +136,7 @@ public class Explosion extends MiniPlugin
for (Block cur : blocks.keySet()) for (Block cur : blocks.keySet())
{ {
if (blocks.get(cur).getKey() == 98) if (blocks.get(cur).getKey() == 98)
if (blocks.get(cur).getValue() == 0) if (blocks.get(cur).getValue() == 0 || blocks.get(cur).getValue() == 3)
continue; continue;
//TNT //TNT
@ -184,7 +184,7 @@ public class Explosion extends MiniPlugin
//Crack //Crack
for (Block cur : UtilBlock.getInRadius(fLoc, 4d).keySet()) for (Block cur : UtilBlock.getInRadius(fLoc, 4d).keySet())
if (cur.getTypeId() == 98) if (cur.getTypeId() == 98)
if (cur.getData() == 0) if (cur.getData() == 0 || cur.getData() == 3)
cur.setTypeIdAndData(98, (byte)2, true); cur.setTypeIdAndData(98, (byte)2, true);
} }
}, 1); }, 1);
@ -310,7 +310,7 @@ public class Explosion extends MiniPlugin
for (Block cur : blocks.keySet()) for (Block cur : blocks.keySet())
{ {
if (blocks.get(cur).getKey() == 98) if (blocks.get(cur).getKey() == 98)
if (blocks.get(cur).getValue() == 0) if (blocks.get(cur).getValue() == 0 || blocks.get(cur).getValue() == 3)
continue; continue;
double chance = 0.2 + (double)_explosionBlocks.size()/(double)120; double chance = 0.2 + (double)_explosionBlocks.size()/(double)120;

View File

@ -53,7 +53,7 @@ public class CripplingBlow extends Skill
if (level == 0) return; if (level == 0) return;
//Stun //Stun
Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, level, false, true, true, true); Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * level, level, false, true, false, true);
//Damage //Damage
event.AddMod(damager.getName(), GetName(), 0, true); event.AddMod(damager.getName(), GetName(), 0, true);

View File

@ -0,0 +1,42 @@
package mineplex.minecraft.game.classcombat.Skill.Global;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import mineplex.core.recharge.RechargeEvent;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.minecraft.game.classcombat.Skill.Skill;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
public class Cooldown extends Skill
{
public Cooldown(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
{
super(skills, name, classType, skillType, cost, levels);
SetDesc(new String[]
{
"You quickly recover from using skills;",
"Skill cooldowns are reduced by #0#12 %.",
});
}
@EventHandler
public void Resist(RechargeEvent event)
{
int level = getLevel(event.GetPlayer());
if (level <= 0)
return;
double reduction = 0.12f * level;
event.SetRecharge((long) (event.GetRecharge() * (1 - reduction)));
}
@Override
public void Reset(Player player)
{
}
}

View File

@ -34,7 +34,7 @@ public class Fortitude extends Skill
"up to #0#1 of the health you lost.", "up to #0#1 of the health you lost.",
"", "",
"You restore health at a rate of", "You restore health at a rate of",
"1 health per #3.5#-0.5 seconds.", "1 health per #4.5#-0.5 seconds.",
"", "",
"This does not stack, and is reset if", "This does not stack, and is reset if",
"you are hit again." "you are hit again."
@ -91,7 +91,7 @@ public class Fortitude extends Skill
int level = getLevel(cur); int level = getLevel(cur);
if (level == 0) continue; if (level == 0) continue;
if (UtilTime.elapsed(_last.get(cur), 3500 - (500 * level))) if (UtilTime.elapsed(_last.get(cur), 4500 - (500 * level)))
{ {
_health.put(cur, _health.get(cur) - 1); _health.put(cur, _health.get(cur) - 1);
_last.put(cur, System.currentTimeMillis()); _last.put(cur, System.currentTimeMillis());

View File

@ -146,7 +146,7 @@ public class HiltSmash extends SkillActive
if (event.IsCancelled()) if (event.IsCancelled())
return; return;
if (event.GetCause() != DamageCause.ENTITY_ATTACK) if (event.GetCause() != DamageCause.CUSTOM)
return; return;
Player damager = event.GetDamagerPlayer(false); Player damager = event.GetDamagerPlayer(false);

View File

@ -11,7 +11,9 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.Item; import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action; import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockFadeEvent;
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
@ -155,7 +157,13 @@ public class IcePrison extends SkillActive implements IThrown
Factory.BlockRestore().Add(freeze, 79, (byte)0, time); Factory.BlockRestore().Add(freeze, 79, (byte)0, time);
freeze.getWorld().playEffect(freeze.getLocation(), Effect.STEP_SOUND, 79); freeze.getWorld().playEffect(freeze.getLocation(), Effect.STEP_SOUND, 79);
} }
@EventHandler
public void BlockFade(BlockFadeEvent event)
{
if (event.getBlock().getType() == Material.ICE)
event.setCancelled(true);
}
@Override @Override
public void Reset(Player player) public void Reset(Player player)

View File

@ -45,7 +45,7 @@ public class LightningOrb extends SkillActive implements IThrown
{ {
"Launch a lightning orb. Upon a direct", "Launch a lightning orb. Upon a direct",
"hit with player, or #5#-0.4 seconds, it will", "hit with player, or #5#-0.4 seconds, it will",
"strike all enemies with #3#0.5 Blocks ", "strike all enemies within #3#0.5 Blocks ",
"with lightning, giving them Slow 3", "with lightning, giving them Slow 3",
"for #2#1 seconds." "for #2#1 seconds."
}); });

View File

@ -151,13 +151,14 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
//Passive C //Passive C
AddSkill(new BreakFall(this, "Break Fall", ClassType.Global, SkillType.GlobalPassive, 1, 3)); AddSkill(new BreakFall(this, "Break Fall", ClassType.Global, SkillType.GlobalPassive, 1, 3));
AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 1, 3)); AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 1, 3));
AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 1, 2)); AddSkill(new Cooldown(this, "Quick Recovery", ClassType.Global, SkillType.GlobalPassive, 1, 3));
//AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 1, 2));
AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 1, 3)); AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 1, 3));
AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 1, 3)); AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 1, 3));
AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 1, 3)); AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 1, 3));
AddSkill(new Recharge(this, "Quick Recovery", ClassType.Assassin, SkillType.GlobalPassive, 1, 3)); AddSkill(new Recharge(this, "Rest", ClassType.Assassin, SkillType.GlobalPassive, 1, 3));
//AddSkill(new Stamina(this, "Stamina", ClassType.Global, SkillType.GlobalPassive, 1, 1)); //AddSkill(new Stamina(this, "Stamina", ClassType.Global, SkillType.GlobalPassive, 1, 1));
@ -371,7 +372,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new FireBlast(this, "Fire Blast", ClassType.Mage, SkillType.Axe, AddSkill(new FireBlast(this, "Fire Blast", ClassType.Mage, SkillType.Axe,
1, 5, 1, 5,
60, -3, 60, -3,
10000, -1000, true, 11000, -1000, true,
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
@ -385,7 +386,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new LightningOrb(this, "Lightning Orb", ClassType.Mage, SkillType.Axe, AddSkill(new LightningOrb(this, "Lightning Orb", ClassType.Mage, SkillType.Axe,
1, 5, 1, 5,
60, -2, 60, -2,
10000, -1000, true, 11000, -1000, true,
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
@ -393,7 +394,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe, AddSkill(new Fissure(this, "Fissure", ClassType.Mage, SkillType.Axe,
1, 5, 1, 5,
60, -3, 60, -3,
10000, -1000, true, 11000, -1000, true,
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE}, new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK})); new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));

View File

@ -457,6 +457,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
public void HubClock(Player player) public void HubClock(Player player)
{ {
if (_game != null && !_game.GiveClock)
return;
player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte)0, 1, (short)0, C.cGreen + "Return to Hub", player.getInventory().setItem(8, ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte)0, 1, (short)0, C.cGreen + "Return to Hub",
new String[] {"", ChatColor.RESET + "Click while holding this", ChatColor.RESET + "to return to the Hub."})); new String[] {"", ChatColor.RESET + "Click while holding this", ChatColor.RESET + "to return to the Hub."}));
} }

View File

@ -176,6 +176,8 @@ public abstract class Game implements Listener
//Addons //Addons
public boolean CompassEnabled = false; public boolean CompassEnabled = false;
public boolean SoupEnabled = true; public boolean SoupEnabled = true;
public boolean GiveClock = true;
public double GemMultiplier = 1; public double GemMultiplier = 1;
@ -1028,6 +1030,4 @@ public abstract class Game implements Listener
{ {
return _prepareCountdown; return _prepareCountdown;
} }
} }

View File

@ -56,7 +56,7 @@ public abstract class TeamGame extends Game
GetLocationStore().put(player.getName(), player.getLocation()); GetLocationStore().put(player.getName(), player.getLocation());
//Announcement //Announcement
Announce(team.GetColor() + C.Bold + player.getName() + " has disconnected! 3 minutes to reconnect."); Announce(team.GetColor() + C.Bold + player.getName() + " has disconnected! 3 minutes to rejoin.");
} }
} }

View File

@ -176,8 +176,6 @@ public class CastleSiege extends TeamGame
Entity ent = GetKits()[5+i].SpawnEntity(WorldData.GetDataLocs("PINK").get(i)); Entity ent = GetKits()[5+i].SpawnEntity(WorldData.GetDataLocs("PINK").get(i));
this.CreatureAllowOverride = false; this.CreatureAllowOverride = false;
Manager.GetCondition().Factory().Invulnerable("Kit", (LivingEntity)ent, (LivingEntity)ent, 999999, false, false);
Manager.GetLobby().AddKitLocation(ent, GetKits()[5+i], WorldData.GetDataLocs("PINK").get(i)); Manager.GetLobby().AddKitLocation(ent, GetKits()[5+i], WorldData.GetDataLocs("PINK").get(i));
} }
} }

View File

@ -17,11 +17,11 @@ import org.bukkit.entity.Player;
public class ChampionsDominate extends Domination public class ChampionsDominate extends Domination
{ {
public ChampionsDominate(ArcadeManager manager) public ChampionsDominate(ArcadeManager manager)
{ {
super(manager, GameType.ChampionsDominate, super(manager, GameType.ChampionsDominate,
new Kit[] new Kit[]
{ {
new KitBrute(manager), new KitBrute(manager),
new KitRanger(manager), new KitRanger(manager),
new KitKnight(manager), new KitKnight(manager),
@ -33,7 +33,7 @@ public class ChampionsDominate extends Domination
{ {
"Capture Beacons faster with more people!", "Capture Beacons faster with more people!",
"Make sure you use all of your Skill/Item Tokens", "Make sure you use all of your Skill/Item Tokens",
"Collect Emeralds to get 500 Points", "Collect Emeralds to get 300 Points",
"Collect Resupply Chests to restock your inventory", "Collect Resupply Chests to restock your inventory",
"Customize your Class to suit your play style", "Customize your Class to suit your play style",
"Diamond Sword boosts Sword Skill by 1 Level", "Diamond Sword boosts Sword Skill by 1 Level",
@ -41,7 +41,7 @@ public class ChampionsDominate extends Domination
"Gold Weapons deal 7 damage", "Gold Weapons deal 7 damage",
"Iron Weapons deal 6 damage", "Iron Weapons deal 6 damage",
"Diamond Weapons deal 5 damage", "Diamond Weapons deal 5 damage",
}; };
this.Manager.GetDamage().UseSimpleWeaponDamage = false; this.Manager.GetDamage().UseSimpleWeaponDamage = false;

View File

@ -1,26 +1,33 @@
package nautilus.game.arcade.game.games.common; package nautilus.game.arcade.game.games.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.ItemDespawnEvent; import org.bukkit.event.entity.ItemDespawnEvent;
import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.combat.CombatComponent;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType; import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.TeamGame; import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.champions.ChampionsDominate; import nautilus.game.arcade.game.games.champions.ChampionsDominate;
@ -33,6 +40,9 @@ public class Domination extends TeamGame
private ArrayList<CapturePoint> _points = new ArrayList<CapturePoint>(); private ArrayList<CapturePoint> _points = new ArrayList<CapturePoint>();
private ArrayList<Emerald> _emerald = new ArrayList<Emerald>(); private ArrayList<Emerald> _emerald = new ArrayList<Emerald>();
private ArrayList<Resupply> _resupply = new ArrayList<Resupply>(); private ArrayList<Resupply> _resupply = new ArrayList<Resupply>();
//Stats
private HashMap<String, PlayerData> _stats = new HashMap<String, PlayerData>();
//Scoreboard //Scoreboard
private ArrayList<String> _lastScoreboard = new ArrayList<String>(); private ArrayList<String> _lastScoreboard = new ArrayList<String>();
@ -62,6 +72,8 @@ public class Domination extends TeamGame
this.WorldTimeSet = 2000; this.WorldTimeSet = 2000;
this.DeathSpectateSecs = 10; this.DeathSpectateSecs = 10;
//this.QuitOut = false;
} }
@Override @Override
@ -117,7 +129,7 @@ public class Domination extends TeamGame
if (!IsLive()) if (!IsLive())
return; return;
if (event.getType() == UpdateType.FAST) if (event.getType() == UpdateType.FASTER)
for (CapturePoint cur : _points) for (CapturePoint cur : _points)
cur.Update(); cur.Update();
@ -293,4 +305,61 @@ public class Domination extends TeamGame
{ {
return "Domination"; return "Domination";
} }
public PlayerData GetStats(Player player)
{
if (!_stats.containsKey(player.getName()))
_stats.put(player.getName(), new PlayerData(player.getName()));
return _stats.get(player.getName());
}
@EventHandler
public void StatsKillAssistDeath(CombatDeathEvent event)
{
Game game = Manager.GetGame();
if (game == null) return;
if (!(event.GetEvent().getEntity() instanceof Player))
return;
Player killed = (Player)event.GetEvent().getEntity();
GetStats(killed).Deaths++;
if (event.GetLog().GetKiller() != null)
{
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer != null && !killer.equals(killed))
GetStats(killer).Kills++;
}
for (CombatComponent log : event.GetLog().GetAttackers())
{
if (event.GetLog().GetKiller() != null && log.equals(event.GetLog().GetKiller()))
continue;
Player assist = UtilPlayer.searchExact(log.GetName());
//Assist
if (assist != null)
GetStats(assist).Assists++;
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void StatsKillAssistDeath(CustomDamageEvent event)
{
Player damager = event.GetDamagerPlayer(true);
if (damager != null)
{
GetStats(damager).DamageDealt += event.GetDamage();
}
Player damagee = event.GetDamageePlayer();
if (damagee != null)
{
GetStats(damagee).DamageTaken += event.GetDamage();
}
}
} }

View File

@ -107,7 +107,7 @@ public class CapturePoint
if (!_captured) if (!_captured)
return; return;
Host.AddScore(_owner, 8); Host.AddScore(_owner, 2);
} }
private void CaptureUpdate() private void CaptureUpdate()
@ -290,7 +290,9 @@ public class CapturePoint
{ {
for (Player player : capturers) for (Player player : capturers)
{ {
Host.AddGems(player, 3, "Control Point Capture", true); Host.AddGems(player, 3, "Control Point Score", true);
Host.GetStats(player).CaptureScore += 30;
} }
} }
} }
@ -330,7 +332,20 @@ public class CapturePoint
} }
if (_captureAmount != _captureMax) if (_captureAmount != _captureMax)
{
//Reward
if (capturers != null)
{
for (Player player : capturers)
{
Host.AddGems(player, 0.1, "Control Point Score", true);
Host.GetStats(player).CaptureScore += 1;
}
}
Indicate(color); Indicate(color);
}
} }
public void Firework(Location loc, Color color, boolean major) public void Firework(Location loc, Color color, boolean major)

View File

@ -50,24 +50,20 @@ public class Emerald
} }
return; return;
} }
if (!UtilTime.elapsed(_time, 60000)) if (!UtilTime.elapsed(_time, 60000))
return; return;
//Spawn //Spawn
_ent = _loc.getWorld().dropItem(_loc.clone().add(0, 1, 0), new ItemStack(Material.EMERALD)); _ent = _loc.getWorld().dropItem(_loc.clone().add(0, 1, 0), new ItemStack(Material.EMERALD));
_ent.setVelocity(new Vector(0,0,0)); _ent.setVelocity(new Vector(0,1,0));
_ent.teleport(_loc);
//Firework
UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BURST).trail(true).build());
//Block //Block
_loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.EMERALD_BLOCK); _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.EMERALD_BLOCK);
//Firework //Firework
UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BURST).trail(true).build()); UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BURST).trail(true).build());
} }
public void Pickup(Player player, Item item) public void Pickup(Player player, Item item)
@ -94,13 +90,13 @@ public class Emerald
_loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK); _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK);
//Give Points //Give Points
Host.AddScore(team, 500); Host.AddScore(team, 300);
//Inform //Inform
UtilPlayer.message(player, C.cGreen + C.Bold + "You scored 500 Points for your team!"); UtilPlayer.message(player, C.cGreen + C.Bold + "You scored 300 Points for your team!");
//Firework //Firework
UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BALL_LARGE).trail(true).build()); UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.GREEN).with(Type.BALL_LARGE).trail(true).build());
//Gems //Gems
Host.AddGems(player, 3, "Emerald Powerup", true); Host.AddGems(player, 3, "Emerald Powerup", true);

View File

@ -0,0 +1,20 @@
package nautilus.game.arcade.game.games.common.dominate_data;
public class PlayerData
{
public String Name;
public int Kills = 0;
public int Deaths = 0;
public int Assists = 0;
public double DamageDealt = 0;
public double DamageTaken = 0;
public int CaptureScore = 0;
public PlayerData(String name)
{
Name = name;
}
}

View File

@ -6,6 +6,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.games.common.Domination; import nautilus.game.arcade.game.games.common.Domination;
import nautilus.game.arcade.kit.Kit;
import org.bukkit.Color; import org.bukkit.Color;
import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect;
@ -57,14 +58,13 @@ public class Resupply
//Spawn //Spawn
_ent = _loc.getWorld().dropItem(_loc.clone().add(0, 1, 0), new ItemStack(Material.CHEST)); _ent = _loc.getWorld().dropItem(_loc.clone().add(0, 1, 0), new ItemStack(Material.CHEST));
_ent.setVelocity(new Vector(0,0,0)); _ent.setVelocity(new Vector(0,1,0));
_ent.teleport(_loc);
//Block //Block
_loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.GOLD_BLOCK); _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.GOLD_BLOCK);
//Firework //Firework
UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BURST).trail(true).build()); UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BURST).trail(true).build());
} }
public void Pickup(Player player, Item item) public void Pickup(Player player, Item item)
@ -90,10 +90,14 @@ public class Resupply
_time = System.currentTimeMillis(); _time = System.currentTimeMillis();
_loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK); _loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK);
Kit kit = Host.GetKit(player);
if (kit != null)
kit.GiveItems(player);
//Inform //Inform
UtilPlayer.message(player, C.cYellow + C.Bold + "Your inventory was restocked!"); UtilPlayer.message(player, C.cYellow + C.Bold + "Your inventory was restocked!");
//Firework //Firework
UtilFirework.playFirework(_loc, FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BALL_LARGE).trail(true).build()); UtilFirework.playFirework(_loc.clone().add(0, 1, 0), FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BALL_LARGE).trail(true).build());
} }
} }

View File

@ -636,7 +636,13 @@ public class GameFlagManager implements Listener
GameTeam team = game.GetTeam(event.getPlayer()); GameTeam team = game.GetTeam(event.getPlayer());
if (team != null) if (team != null)
team.SetPlayerState(event.getPlayer(), PlayerState.OUT); {
if (game.InProgress())
team.SetPlayerState(event.getPlayer(), PlayerState.OUT);
else
team.RemovePlayer(event.getPlayer());
}
} }
@EventHandler @EventHandler

View File

@ -52,6 +52,7 @@ import mineplex.core.packethandler.PacketHandler;
import mineplex.core.packethandler.PacketVerifier; import mineplex.core.packethandler.PacketVerifier;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType; import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.events.GameStateChangeEvent;
@ -645,6 +646,13 @@ public class GameLobbyManager implements IPacketRunnable, Listener
_gemMap.remove(event.getPlayer()); _gemMap.remove(event.getPlayer());
_kitMap.remove(event.getPlayer()); _kitMap.remove(event.getPlayer());
} }
@EventHandler(priority = EventPriority.LOWEST)
public void DamageCancel(CustomDamageEvent event)
{
if (_kits.containsKey(event.GetDamageeEntity()))
event.SetCancelled("Kit Cancel");
}
@EventHandler @EventHandler
public void Update(UpdateEvent event) public void Update(UpdateEvent event)

View File

@ -261,6 +261,9 @@ public class GamePlayerManager implements Listener
@EventHandler @EventHandler
public void KitDamage(CustomDamageEvent event) public void KitDamage(CustomDamageEvent event)
{ {
if (Manager.GetGame() != null && Manager.GetGame().InProgress())
return;
if (event.GetCause() != DamageCause.ENTITY_ATTACK) if (event.GetCause() != DamageCause.ENTITY_ATTACK)
return; return;