Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/Mineplex
This commit is contained in:
commit
eb1d1c1ed2
@ -8,6 +8,8 @@ import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -386,6 +388,14 @@ public class UtilPlayer
|
||||
return name;
|
||||
}
|
||||
|
||||
public static boolean isChargingBow(Player player)
|
||||
{
|
||||
if (!UtilGear.isMat(player.getItemInHand(), Material.BOW))
|
||||
return false;
|
||||
|
||||
return (((CraftEntity)player).getHandle().getDataWatcher().getByte(0) & 1 << 4) != 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public void setListName(Player player, CoreClient client)
|
||||
|
@ -10,6 +10,7 @@ import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.antihack.types.*;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
@ -70,8 +71,8 @@ public class AntiHack extends MiniPlugin
|
||||
Punish = punish;
|
||||
Portal = portal;
|
||||
|
||||
_repository = new AntiHackRepository(plugin.getConfig().getString("serverstatus.name"));
|
||||
_repository.initialize();
|
||||
//_repository = new AntiHackRepository(plugin.getConfig().getString("serverstatus.name"));
|
||||
//_repository.initialize();
|
||||
|
||||
_detectors = new ArrayList<Detector>();
|
||||
|
||||
@ -198,8 +199,8 @@ public class AntiHack extends MiniPlugin
|
||||
_suspicion.get(player).get(type).add(System.currentTimeMillis());
|
||||
|
||||
for (Player admin : UtilServer.getPlayers())
|
||||
if (admin.isOp() && admin.getGameMode() == GameMode.CREATIVE)
|
||||
UtilPlayer.message(admin, C.cGold + C.Bold + player.getName() + " suspected for " + type + ".");
|
||||
if (admin.isOp() && UtilGear.isMat(admin.getItemInHand(), Material.PAPER))
|
||||
UtilPlayer.message(admin, C.cRed + C.Bold + player.getName() + " suspected for " + type + ".");
|
||||
|
||||
// Print (Debug)
|
||||
System.out.println("[Offense] " + player.getName() + " received suspicion for " + type + ".");
|
||||
|
@ -48,7 +48,7 @@ public class Fly extends MiniPlugin implements Detector
|
||||
}
|
||||
|
||||
updateHover(player);
|
||||
updateRise(player);
|
||||
//updateRise(player);
|
||||
updateMomentum(player, event);
|
||||
}
|
||||
|
||||
|
@ -275,9 +275,12 @@ public class ItemStackFactory extends MiniPlugin
|
||||
{
|
||||
try
|
||||
{
|
||||
String name = "";
|
||||
|
||||
//Get Name
|
||||
ItemStack stack = new ItemStack(id, 1, data);
|
||||
String name = CraftItemStack.asNMSCopy(stack).getName();
|
||||
if (CraftItemStack.asNMSCopy(stack) != null && CraftItemStack.asNMSCopy(stack).getName() != null)
|
||||
name = CraftItemStack.asNMSCopy(stack).getName();
|
||||
|
||||
if (id == 140)
|
||||
name = "Flower Pot";
|
||||
@ -286,8 +289,15 @@ public class ItemStackFactory extends MiniPlugin
|
||||
name = Clean(mat.toString());
|
||||
|
||||
//No Duplicates
|
||||
boolean duplicate = false;
|
||||
for (Entry<String, Boolean> cur : variants.values())
|
||||
if (cur.getKey().equals(name))
|
||||
{
|
||||
duplicate = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (duplicate)
|
||||
continue;
|
||||
|
||||
variants.put(data, new AbstractMap.SimpleEntry<String, Boolean>(name, (mat.getMaxStackSize() == 1)));
|
||||
@ -350,16 +360,25 @@ public class ItemStackFactory extends MiniPlugin
|
||||
if (formatted)
|
||||
out = _nameFormat;
|
||||
|
||||
System.out.println("Searching A: " + id + ":" + data);
|
||||
|
||||
if (!_names.containsKey(id))
|
||||
return out + "Unknown";
|
||||
|
||||
if (!_names.get(id).containsKey(data))
|
||||
System.out.println("Searching B");
|
||||
|
||||
if (!_names.get(id).containsKey(data))
|
||||
{
|
||||
if (_names.get(id).containsKey(0))
|
||||
return out + _names.get(id).get(0).getKey();
|
||||
|
||||
else
|
||||
System.out.println("Searching C");
|
||||
for (Entry<String, Boolean> cur : _names.get(id).values())
|
||||
return cur.getKey();
|
||||
System.out.println("Searching D");
|
||||
return out + "Unknown";
|
||||
}
|
||||
|
||||
System.out.println("Searching E");
|
||||
|
||||
return out + _names.get(id).get(data).getKey();
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class Evade extends SkillActive
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
|
@ -122,7 +122,7 @@ public class HiltSmash extends SkillActive
|
||||
if (!(ent instanceof LivingEntity))
|
||||
return;
|
||||
|
||||
if (UtilMath.offset(player, ent) > 2.2)
|
||||
if (UtilMath.offset(player, ent) > 4)
|
||||
{
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You missed " + F.skill(GetName()) + "."));
|
||||
return;
|
||||
|
@ -49,7 +49,7 @@ public class Riposte extends SkillActive
|
||||
"to riposte.",
|
||||
"",
|
||||
"If successful, you gain 1 health",
|
||||
"and deal #0#1 bonus damage.",
|
||||
"and deal #0#0.5 bonus damage.",
|
||||
"",
|
||||
"You must block, parry, then riposte",
|
||||
"all within 1 second of each other."
|
||||
@ -147,13 +147,12 @@ public class Riposte extends SkillActive
|
||||
_prepare.remove(damager);
|
||||
|
||||
//Damage
|
||||
event.AddMod(damager.getName(), GetName(), 2, true);
|
||||
event.AddMod(damager.getName(), GetName(), 0.5 + 0.5 * level, true);
|
||||
|
||||
//Effect
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.ZOMBIE_METAL, 1f, 1.2f);
|
||||
|
||||
//Energy
|
||||
Factory.Energy().ModifyEnergy(damager, 20);
|
||||
UtilPlayer.health(damager, 1);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.HEART, damager.getEyeLocation(), 0, 0.3f, 0, 0, 1);
|
||||
|
@ -6,6 +6,7 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -95,8 +96,11 @@ public abstract class SkillChargeBow extends SkillCharge implements Listener
|
||||
}
|
||||
|
||||
// Client sends a packet when you stop charging a bow and sets this datawatcher value.
|
||||
if ((((CraftEntity)cur).getHandle().getDataWatcher().getByte(0) & 1 << 4) == 0)
|
||||
if (!UtilPlayer.isChargingBow(cur))
|
||||
{
|
||||
_charge.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Flags
|
||||
if (!_canChargeInAir && !UtilEnt.isGrounded(cur))
|
||||
|
@ -296,7 +296,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
AddSkill(new Riposte(this, "Riposte", ClassType.Knight, SkillType.Sword,
|
||||
5, 5,
|
||||
0, 0,
|
||||
15000, -1000, false,
|
||||
10000, -1000, false,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
|
@ -7,7 +7,6 @@ public interface IItem
|
||||
Material GetType();
|
||||
int GetAmount();
|
||||
int GetGemCost();
|
||||
boolean IsFree();
|
||||
int GetSalesPackageId();
|
||||
String GetName();
|
||||
String[] GetDesc();
|
||||
|
@ -77,12 +77,6 @@ public class Item implements IItem, Listener
|
||||
event.SetCancelled("Item Damage Cancel");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean IsFree()
|
||||
{
|
||||
return _free;
|
||||
}
|
||||
|
||||
public void Update(ItemToken itemToken)
|
||||
{
|
||||
_salesPackageId = itemToken.SalesPackage.GameSalesPackageId;
|
||||
|
@ -143,7 +143,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
|
||||
_projectileManager = new ProjectileManager(plugin);
|
||||
|
||||
if (serverConfig.GameList.contains(GameType.Dominate))
|
||||
if (serverConfig.GameList.contains(GameType.ChampionsDominate) || serverConfig.GameList.contains(GameType.ChampionsTDM) || serverConfig.GameList.contains(GameType.ChampionsMOBA))
|
||||
{
|
||||
_skillFactory = new SkillFactory(plugin, damageManager, this, _damageManager.GetCombatManager(), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), teleport, new Energy(plugin), webAddress);
|
||||
_classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress);
|
||||
|
@ -9,7 +9,8 @@ import nautilus.game.arcade.game.games.baconbrawl.BaconBrawl;
|
||||
import nautilus.game.arcade.game.games.barbarians.Barbarians;
|
||||
import nautilus.game.arcade.game.games.bridge.Bridge;
|
||||
import nautilus.game.arcade.game.games.castlesiege.CastleSiege;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.Dominate;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsDominate;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsTDM;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.deathtag.DeathTag;
|
||||
import nautilus.game.arcade.game.games.dragonescape.DragonEscape;
|
||||
@ -27,6 +28,7 @@ import nautilus.game.arcade.game.games.quiver.Quiver;
|
||||
import nautilus.game.arcade.game.games.runner.Runner;
|
||||
import nautilus.game.arcade.game.games.sheep.SheepGame;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmash;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmashDominate;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmashTeam;
|
||||
import nautilus.game.arcade.game.games.snake.Snake;
|
||||
import nautilus.game.arcade.game.games.snowfight.SnowFight;
|
||||
@ -55,7 +57,8 @@ public class GameFactory
|
||||
else if (gameType == GameType.CastleSiege) return new CastleSiege(_manager);
|
||||
else if (gameType == GameType.Christmas) return new Christmas(_manager);
|
||||
else if (gameType == GameType.DeathTag) return new DeathTag(_manager);
|
||||
else if (gameType == GameType.Dominate) return new Dominate(_manager);
|
||||
else if (gameType == GameType.ChampionsDominate) return new ChampionsDominate(_manager);
|
||||
else if (gameType == GameType.ChampionsTDM) return new ChampionsTDM(_manager);
|
||||
else if (gameType == GameType.Dragons) return new Dragons(_manager);
|
||||
else if (gameType == GameType.DragonEscape) return new DragonEscape(_manager);
|
||||
else if (gameType == GameType.DragonRiders) return new DragonRiders(_manager);
|
||||
@ -74,6 +77,7 @@ public class GameFactory
|
||||
else if (gameType == GameType.Sheep) return new SheepGame(_manager);
|
||||
else if (gameType == GameType.Smash) return new SuperSmash(_manager);
|
||||
else if (gameType == GameType.SmashTeams) return new SuperSmashTeam(_manager);
|
||||
else if (gameType == GameType.SmashDomination) return new SuperSmashDominate(_manager);
|
||||
else if (gameType == GameType.Snake) return new Snake(_manager);
|
||||
else if (gameType == GameType.Spleef) return new Spleef(_manager);
|
||||
else if (gameType == GameType.SquidShooter) return new SquidShooter(_manager);
|
||||
|
@ -7,7 +7,9 @@ public enum GameType
|
||||
Barbarians("A Barbarians Life"),
|
||||
Bridge("The Bridges"),
|
||||
CastleSiege("Castle Siege"),
|
||||
Dominate("Domination"),
|
||||
ChampionsTDM("Champions TDM", "Champions"),
|
||||
ChampionsDominate("Champions Domination", "Champions"),
|
||||
ChampionsMOBA("Champions MOBA", "Champions"),
|
||||
Christmas("Christmas Chaos"),
|
||||
DeathTag("Death Tag"),
|
||||
DragonEscape("Dragon Escape"),
|
||||
@ -28,7 +30,8 @@ public enum GameType
|
||||
Runner("Runner"),
|
||||
Sheep("Sheep Quest"),
|
||||
Smash("Super Smash Mobs"),
|
||||
SmashTeams("Super Smash Mobs Teams"),
|
||||
SmashTeams("Super Smash Mobs Teams", "Super Smash Mobs"),
|
||||
SmashDomination("Super Smash Mobs Domination", "Super Smash Mobs"),
|
||||
Snake("Snake"),
|
||||
SnowFight("Snow Fight"),
|
||||
Spleef("Super Spleef"),
|
||||
@ -39,14 +42,27 @@ public enum GameType
|
||||
ZombieSurvival("Zombie Survival");
|
||||
|
||||
String _name;
|
||||
String _lobbyName;
|
||||
|
||||
GameType(String name)
|
||||
{
|
||||
_name = name;
|
||||
_lobbyName = name;
|
||||
}
|
||||
|
||||
GameType(String name, String lobbyName)
|
||||
{
|
||||
_name = name;
|
||||
_lobbyName = lobbyName;
|
||||
}
|
||||
|
||||
public String GetName()
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
public String GetLobbyName()
|
||||
{
|
||||
return _lobbyName;
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import mineplex.core.command.CommandBase;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
|
||||
public class StartCommand extends CommandBase<ArcadeManager>
|
||||
{
|
||||
@ -19,8 +20,14 @@ public class StartCommand extends CommandBase<ArcadeManager>
|
||||
if (Plugin.GetGame() == null)
|
||||
return;
|
||||
|
||||
if (Plugin.GetGame().InProgress())
|
||||
{
|
||||
caller.sendMessage("Game is already in progress...");
|
||||
return;
|
||||
}
|
||||
|
||||
Plugin.GetGameManager().StateCountdown(Plugin.GetGame(), 10, true);
|
||||
|
||||
caller.sendMessage("Force Starting Game!");
|
||||
Plugin.GetGame().Announce(C.cAqua + C.Bold + caller.getName() + " has started the game.");
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import mineplex.core.command.CommandBase;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
|
||||
public class StopCommand extends CommandBase<ArcadeManager>
|
||||
{
|
||||
@ -24,6 +25,6 @@ public class StopCommand extends CommandBase<ArcadeManager>
|
||||
HandlerList.unregisterAll(Plugin.GetGame());
|
||||
Plugin.GetGame().SetState(GameState.End);
|
||||
|
||||
caller.sendMessage("Stopped Game! Please wait for 10s.");
|
||||
Plugin.GetGame().Announce(C.cAqua + C.Bold + caller.getName() + " has stopped the game.");
|
||||
}
|
||||
}
|
||||
|
@ -225,6 +225,11 @@ public abstract class Game implements Listener
|
||||
return _gameType.GetName();
|
||||
}
|
||||
|
||||
public String GetMode()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public GameType GetType()
|
||||
{
|
||||
return _gameType;
|
||||
@ -1023,4 +1028,6 @@ public abstract class Game implements Listener
|
||||
{
|
||||
return _prepareCountdown;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,82 @@
|
||||
package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitKnight;
|
||||
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.game.games.common.dominate_data.CapturePoint;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.Emerald;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.Resupply;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.ItemDespawnEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
|
||||
public class ChampionsDominate extends Domination
|
||||
{
|
||||
public ChampionsDominate(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.ChampionsDominate,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
new KitBrute(manager),
|
||||
new KitRanger(manager),
|
||||
new KitKnight(manager),
|
||||
new KitMage(manager),
|
||||
new KitAssassin(manager),
|
||||
});
|
||||
|
||||
_help = new String[]
|
||||
{
|
||||
"Capture Beacons faster with more people!",
|
||||
"Make sure you use all of your Skill/Item Tokens",
|
||||
"Collect Emeralds to get 500 Points",
|
||||
"Collect Resupply Chests to restock your inventory",
|
||||
"Customize your Class to suit your play style",
|
||||
"Diamond Sword boosts Sword Skill by 1 Level",
|
||||
"Diamond Axe boosts Axe Skill by 1 Level",
|
||||
"Gold Weapons deal 7 damage",
|
||||
"Iron Weapons deal 6 damage",
|
||||
"Diamond Weapons deal 5 damage",
|
||||
|
||||
};
|
||||
|
||||
this.Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void ValidateKit(Player player, GameTeam team)
|
||||
{
|
||||
// NOTHING
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeathMessageType GetDeathMessageType()
|
||||
{
|
||||
return DeathMessageType.Detailed;
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
public class ChampionsMOBA
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package nautilus.game.arcade.game.games.champions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitBrute;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitKnight;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitMage;
|
||||
import nautilus.game.arcade.game.games.champions.kits.KitRanger;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
public class ChampionsTDM extends TeamGame
|
||||
{
|
||||
private ArrayList<String> _lastScoreboard = new ArrayList<String>();
|
||||
private HashMap<Player, Integer> _kills = new HashMap<Player, Integer>();
|
||||
|
||||
public ChampionsTDM(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.ChampionsTDM,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
new KitBrute(manager),
|
||||
new KitRanger(manager),
|
||||
new KitKnight(manager),
|
||||
new KitMage(manager),
|
||||
new KitAssassin(manager),
|
||||
},
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Each player has " + C.cRed + C.Bold + "ONE LIFE",
|
||||
"Kill the other team to win!",
|
||||
|
||||
});
|
||||
|
||||
this.DeathOut = true;
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 2000;
|
||||
this.CompassEnabled = true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void PlayerKillAward(CombatDeathEvent event)
|
||||
{
|
||||
if (!(event.GetEvent().getEntity() instanceof Player))
|
||||
return;
|
||||
|
||||
Player killed = (Player)event.GetEvent().getEntity();
|
||||
SetPlayerState(killed, PlayerState.OUT);
|
||||
|
||||
GameTeam killedTeam = GetTeam(killed);
|
||||
if (killedTeam == null)
|
||||
return;
|
||||
|
||||
if (event.GetLog().GetKiller() != null)
|
||||
{
|
||||
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
|
||||
|
||||
if (killer != null && !killer.equals(killed))
|
||||
{
|
||||
GameTeam killerTeam = GetTeam(killer);
|
||||
if (killerTeam == null)
|
||||
return;
|
||||
|
||||
int kills = 1;
|
||||
if (killedTeam.equals(killerTeam))
|
||||
kills = -1;
|
||||
|
||||
if (_kills.containsKey(killer))
|
||||
kills += _kills.get(killer);
|
||||
|
||||
_kills.put(killer, kills);
|
||||
|
||||
ScoreboardRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventHandler
|
||||
public void ScoreboardUpdate(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
if (!InProgress())
|
||||
return;
|
||||
|
||||
ScoreboardRefresh();
|
||||
}
|
||||
|
||||
public void ScoreboardRefresh()
|
||||
{
|
||||
//Wipe Last
|
||||
for (String string : _lastScoreboard)
|
||||
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
|
||||
_lastScoreboard.clear();
|
||||
|
||||
int pos = 1;
|
||||
String space = " ";
|
||||
|
||||
for (GameTeam team : this.GetTeamList())
|
||||
{
|
||||
for (Player player : team.GetPlayers(false))
|
||||
{
|
||||
int kills = 0;
|
||||
if (_kills.containsKey(player))
|
||||
kills = _kills.get(player);
|
||||
|
||||
String out = kills + " ";
|
||||
|
||||
if (IsAlive(player))
|
||||
out += team.GetColor() + player.getName();
|
||||
else
|
||||
out += C.cGray + player.getName();
|
||||
|
||||
if (out.length() >= 16)
|
||||
out = out.substring(0, 15);
|
||||
|
||||
_lastScoreboard.add(out);
|
||||
|
||||
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(pos++);
|
||||
}
|
||||
|
||||
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(space)).setScore(pos++);
|
||||
|
||||
space += " ";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double GetKillsGems(Player killer, Player killed, boolean assist)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public String GetMode()
|
||||
{
|
||||
return "Team Deathmatch";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ValidateKit(Player player, GameTeam team)
|
||||
{
|
||||
// NOTHING
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.kits;
|
||||
package nautilus.game.arcade.game.games.champions.kits;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.kits;
|
||||
package nautilus.game.arcade.game.games.champions.kits;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.kits;
|
||||
package nautilus.game.arcade.game.games.champions.kits;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.kits;
|
||||
package nautilus.game.arcade.game.games.champions.kits;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.kits;
|
||||
package nautilus.game.arcade.game.games.champions.kits;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate;
|
||||
package nautilus.game.arcade.game.games.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -17,23 +17,17 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.DeathMessageType;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitBrute;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitKnight;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitMage;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitRanger;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.map.*;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsDominate;
|
||||
import nautilus.game.arcade.game.games.common.dominate_data.*;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
|
||||
public class Dominate extends TeamGame
|
||||
public class Domination extends TeamGame
|
||||
{
|
||||
//Map Data
|
||||
private ArrayList<CapturePoint> _points = new ArrayList<CapturePoint>();
|
||||
@ -48,18 +42,9 @@ public class Dominate extends TeamGame
|
||||
private int _redScore = 0;
|
||||
private int _blueScore = 0;
|
||||
|
||||
public Dominate(ArcadeManager manager)
|
||||
public Domination(ArcadeManager manager, GameType type, Kit[] kits)
|
||||
{
|
||||
super(manager, GameType.Dominate,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
new KitBrute(manager),
|
||||
new KitRanger(manager),
|
||||
new KitKnight(manager),
|
||||
new KitMage(manager),
|
||||
new KitAssassin(manager),
|
||||
},
|
||||
super(manager, type, kits,
|
||||
|
||||
new String[]
|
||||
{
|
||||
@ -70,29 +55,13 @@ public class Dominate extends TeamGame
|
||||
|
||||
});
|
||||
|
||||
_help = new String[]
|
||||
{
|
||||
"Capture Beacons faster with more people!",
|
||||
"Make sure you use all of your Skill/Item Tokens",
|
||||
"Collect Emeralds to get 500 Points",
|
||||
"Collect Resupply Chests to restock your inventory",
|
||||
"Customize your Class to suit your play style",
|
||||
"Diamond Sword boosts Sword Skill by 1 Level",
|
||||
"Diamond Axe boosts Axe Skill by 1 Level",
|
||||
"Gold Weapons deal 7 damage",
|
||||
"Iron Weapons deal 6 damage",
|
||||
"Diamond Weapons deal 5 damage",
|
||||
|
||||
};
|
||||
|
||||
this.DeathOut = false;
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze = true;
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 2000;
|
||||
|
||||
this.DeathSpectateSecs = 10;
|
||||
|
||||
this.Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -113,6 +82,9 @@ public class Dominate extends TeamGame
|
||||
_emerald.add(new Emerald(this, loc));
|
||||
}
|
||||
|
||||
//Spawn Kits
|
||||
if (this instanceof ChampionsDominate)
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
|
||||
for (int i = 0; i < GetKits().length && i < WorldData.GetDataLocs("RED").size() && i < WorldData.GetDataLocs("BLUE").size(); i++)
|
||||
@ -126,6 +98,7 @@ public class Dominate extends TeamGame
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void CustomTeamGeneration(GameStateChangeEvent event)
|
||||
@ -306,12 +279,6 @@ public class Dominate extends TeamGame
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ValidateKit(Player player, GameTeam team)
|
||||
{
|
||||
// NOTHING
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void InventoryLock(InventoryClickEvent event)
|
||||
{
|
||||
@ -322,9 +289,8 @@ public class Dominate extends TeamGame
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeathMessageType GetDeathMessageType()
|
||||
public String GetMode()
|
||||
{
|
||||
return DeathMessageType.Detailed;
|
||||
return "Domination";
|
||||
}
|
||||
}
|
@ -1,15 +1,13 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.map;
|
||||
package nautilus.game.arcade.game.games.common.dominate_data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.Dominate;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
@ -24,7 +22,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class CapturePoint
|
||||
{
|
||||
private Dominate Host;
|
||||
private Domination Host;
|
||||
|
||||
private String _name;
|
||||
|
||||
@ -44,7 +42,7 @@ public class CapturePoint
|
||||
|
||||
private int _indicatorTick = 0;
|
||||
|
||||
public CapturePoint(Dominate host, String name, Location loc)
|
||||
public CapturePoint(Domination host, String name, Location loc)
|
||||
{
|
||||
Host = host;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.map;
|
||||
package nautilus.game.arcade.game.games.common.dominate_data;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.Dominate;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect;
|
||||
@ -21,14 +21,14 @@ import org.bukkit.util.Vector;
|
||||
|
||||
public class Emerald
|
||||
{
|
||||
private Dominate Host;
|
||||
private Domination Host;
|
||||
|
||||
private Location _loc;
|
||||
|
||||
private long _time;
|
||||
private Item _ent;
|
||||
|
||||
public Emerald(Dominate host, Location loc)
|
||||
public Emerald(Domination host, Location loc)
|
||||
{
|
||||
Host = host;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package nautilus.game.arcade.game.games.champions_dominate.map;
|
||||
package nautilus.game.arcade.game.games.common.dominate_data;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.champions_dominate.Dominate;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect;
|
||||
@ -21,14 +21,14 @@ import org.bukkit.util.Vector;
|
||||
|
||||
public class Resupply
|
||||
{
|
||||
private Dominate Host;
|
||||
private Domination Host;
|
||||
|
||||
private Location _loc;
|
||||
|
||||
private long _time;
|
||||
private Item _ent;
|
||||
|
||||
public Resupply(Dominate host, Location loc)
|
||||
public Resupply(Domination host, Location loc)
|
||||
{
|
||||
Host = host;
|
||||
|
@ -29,7 +29,6 @@ public class GravityPlayer extends GravityObject
|
||||
public GravityPlayer(Gravity host, Entity ent, double mass, Vector vel)
|
||||
{
|
||||
super(host, ent, mass, 2, vel);
|
||||
|
||||
SetMovingBat(false);
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerPrepareTeleportEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.TeamGame;
|
||||
import nautilus.game.arcade.game.games.hideseek.forms.BlockForm;
|
||||
@ -278,13 +279,10 @@ public class HideSeek extends TeamGame
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void InitialDisguise(GameStateChangeEvent event)
|
||||
public void InitialDisguise(PlayerPrepareTeleportEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.Prepare)
|
||||
return;
|
||||
|
||||
for (Player player : _hiders.GetPlayers(true))
|
||||
_forms.put(player, new BlockForm(this, player, _allowedBlocks.get(UtilMath.r(_allowedBlocks.size()))));
|
||||
if (_hiders.HasPlayer(event.GetPlayer().getName(), true))
|
||||
_forms.put(event.GetPlayer(), new BlockForm(this, event.GetPlayer(), _allowedBlocks.get(UtilMath.r(_allowedBlocks.size()))));
|
||||
}
|
||||
|
||||
|
||||
@ -826,7 +824,7 @@ public class HideSeek extends TeamGame
|
||||
{
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(player, null, null,
|
||||
DamageCause.DROWNING, 1, false, false, false,
|
||||
DamageCause.DROWNING, 2, false, false, false,
|
||||
"Water", "Water Damage");
|
||||
|
||||
player.getWorld().playSound(player.getLocation(),
|
||||
|
@ -41,6 +41,8 @@ public class BlockForm extends Form
|
||||
_mat = mat;
|
||||
_loc = player.getLocation();
|
||||
|
||||
System.out.println("Block Form: " + _mat + " " + _mat.getId());
|
||||
|
||||
Apply();
|
||||
}
|
||||
|
||||
@ -68,7 +70,11 @@ public class BlockForm extends Form
|
||||
FallingBlockCheck();
|
||||
|
||||
//Inform
|
||||
String blockName = F.elem(ItemStackFactory.Instance.GetName(_mat, (byte)0, false));
|
||||
if (!blockName.contains("Block"))
|
||||
UtilPlayer.message(Player, F.main("Game", C.cWhite + "You are now a " + F.elem(ItemStackFactory.Instance.GetName(_mat, (byte)0, false) + " Block") + "!"));
|
||||
else
|
||||
UtilPlayer.message(Player, F.main("Game", C.cWhite + "You are now a " + F.elem(ItemStackFactory.Instance.GetName(_mat, (byte)0, false)) + "!"));
|
||||
|
||||
//Give Item
|
||||
Player.getInventory().setItem(8, new ItemStack(Host.GetItemEquivilent(_mat)));
|
||||
|
@ -383,4 +383,9 @@ public class SuperSmash extends SoloGame
|
||||
int amount = Math.max(1, (int)(event.GetDamage()/2));
|
||||
UtilPlayer.hunger(damager, amount);
|
||||
}
|
||||
|
||||
public String GetMode()
|
||||
{
|
||||
return "Deathmatch";
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,40 @@
|
||||
package nautilus.game.arcade.game.games.smash;
|
||||
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
import nautilus.game.arcade.game.games.smash.kits.*;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
public class SuperSmashDominate extends Domination
|
||||
{
|
||||
public SuperSmashDominate(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.SmashDomination,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
|
||||
new KitSkeleton(manager),
|
||||
new KitGolem(manager),
|
||||
new KitSpider(manager),
|
||||
new KitSlime(manager),
|
||||
|
||||
new KitCreeper(manager),
|
||||
new KitEnderman(manager),
|
||||
new KitSnowman(manager),
|
||||
new KitWolf(manager),
|
||||
|
||||
|
||||
new KitBlaze(manager),
|
||||
new KitWitch(manager),
|
||||
new KitChicken(manager),
|
||||
new KitSkeletalHorse(manager),
|
||||
new KitPig(manager),
|
||||
new KitSkySquid(manager),
|
||||
new KitWitherSkeleton(manager),
|
||||
new KitMagmaCube(manager),
|
||||
|
||||
});
|
||||
}
|
||||
}
|
@ -132,7 +132,7 @@ public class PerkBarrage extends Perk
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void BarrageFireBow(EntityShootBowEvent event)
|
||||
{
|
||||
if (event.isCancelled() || !event.getProjectile().isValid())
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
|
@ -96,7 +96,7 @@ public class PerkSlimeRocket extends Perk implements IThrown
|
||||
if (!Kit.HasKit(player))
|
||||
return;
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), 4000, true, false))
|
||||
if (!Recharge.Instance.use(player, GetName(), 4000, true, true))
|
||||
return;
|
||||
|
||||
//Spawn Slime
|
||||
|
@ -25,7 +25,9 @@ import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -73,7 +75,7 @@ public class PerkWitherSkull extends Perk
|
||||
WitherSkull skull = player.launchProjectile(WitherSkull.class);
|
||||
skull.setDirection(player.getLocation().getDirection());
|
||||
|
||||
_active.put(skull, player.getLocation().getDirection());
|
||||
_active.put(skull, player.getLocation().getDirection().multiply(0.6));
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.WITHER_SHOOT, 1f, 1f);
|
||||
|
@ -259,7 +259,10 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
||||
if (event.GetState() != GameState.Recruit)
|
||||
return;
|
||||
|
||||
if (event.GetGame().GetMode() == null)
|
||||
WriteGameLine(event.GetGame().WorldData.MapName, 1, 159, (byte)4);
|
||||
else
|
||||
WriteGameLine(event.GetGame().WorldData.MapName, 2, 159, (byte)4);
|
||||
|
||||
CreateTeams(event.GetGame());
|
||||
}
|
||||
@ -714,7 +717,7 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
||||
{
|
||||
WriteAdvertiseLine("KEEP CALM", 0, 159, (byte)4);
|
||||
WriteAdvertiseLine("AND", 1, 159, (byte)15);
|
||||
WriteAdvertiseLine("PLAY MINEPLEX", 2, 159, (byte)15);
|
||||
WriteAdvertiseLine("PLAY MINEPLEX", 2, 159, (byte)4);
|
||||
|
||||
WriteAdvertiseLine("www.mineplex.com", 4, 159, (byte)15);
|
||||
}
|
||||
@ -800,8 +803,12 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
||||
|
||||
public void DisplayNext(Game game, HashMap<String, ChatColor> pastTeams)
|
||||
{
|
||||
WriteGameLine(game.GetName(), 0, 159, (byte)14);
|
||||
WriteGameLine(" ", 1, 159, (byte)4);
|
||||
WriteGameLine(game.GetType().GetLobbyName(), 0, 159, (byte)14);
|
||||
|
||||
if (game.GetMode() == null)
|
||||
WriteGameLine(" ", 1, 159, (byte)14);
|
||||
else
|
||||
WriteGameLine(game.GetMode(), 1, 159, (byte)14);
|
||||
|
||||
|
||||
DisplayWaiting();
|
||||
|
Loading…
Reference in New Issue
Block a user