LOTS of tweaks :D

This commit is contained in:
Mysticate 2015-07-20 14:27:10 -04:00
parent 63df369700
commit 6addf00037
23 changed files with 154 additions and 116 deletions

View File

@ -15,7 +15,7 @@ public enum Rank
SNR_MODERATOR("Sr.Mod", ChatColor.GOLD),
MODERATOR("Mod", ChatColor.GOLD),
JNR_DEV("Jr.Dev", ChatColor.RED),
HELPER("Trainee", ChatColor.DARK_AQUA),
TRAINEE("Trainee", ChatColor.DARK_AQUA),
MAPLEAD("MapLead", ChatColor.DARK_PURPLE),
MAPDEV("Builder", ChatColor.BLUE),

View File

@ -52,7 +52,7 @@ public class UpdateRank extends CommandBase<CoreClientManager>
final Rank rank = tempRank;
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR)
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.TRAINEE || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR)
{
if (rank == Rank.ADMIN && !Plugin.hasRank(caller, Rank.LT))
{

View File

@ -16,7 +16,7 @@ public enum AchievementCategory
{
GLOBAL("Global", null,
new StatDisplay[] { StatDisplay.GEMS_EARNED, null, new StatDisplay("Games Played", "GamesPlayed"), StatDisplay.TIME_IN_GAME },
Material.EMERALD, 0, GameCategory.GLOBAL, null),
Material.EMERALD, 0, GameCategory.GLOBAL, "None"),
BRIDGES("The Bridges", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
@ -32,11 +32,11 @@ public enum AchievementCategory
UHC("Ultra Hardcore", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.GOLDEN_APPLE, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
Material.GOLDEN_APPLE, 0, GameCategory.SURVIVAL, "None"),
WIZARDS("Wizards", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.BLAZE_ROD, 0, GameCategory.SURVIVAL, "Extra Class Skills"),
Material.BLAZE_ROD, 0, GameCategory.SURVIVAL, "Witch Doctor Kit"),
CASTLE_SIEGE("Castle Siege", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, new StatDisplay("Kills as Defenders"), new StatDisplay("Deaths as Defenders"),
@ -45,7 +45,7 @@ public enum AchievementCategory
BLOCK_HUNT("Block Hunt", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.GRASS, 0, GameCategory.CLASSICS, null),
Material.GRASS, 0, GameCategory.CLASSICS, "Infestor Kit"),
SMASH_MOBS("Super Smash Mobs", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
@ -53,11 +53,11 @@ public enum AchievementCategory
MINE_STRIKE("MineStrike", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.TNT, 0, GameCategory.CLASSICS, null),
Material.TNT, 0, GameCategory.CLASSICS, "None"),
DRAW_MY_THING("Draw My Thing", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
Material.BOOK_AND_QUILL, 0, GameCategory.CLASSICS, null),
Material.BOOK_AND_QUILL, 0, GameCategory.CLASSICS, "Extra Tools Kit"),
CHAMPIONS("Champions", new String[] {"Champions Domination", "Champions TDM"},
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
@ -65,7 +65,7 @@ public enum AchievementCategory
MASTER_BUILDERS("Master Builders", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
Material.WOOD, 0, GameCategory.CLASSICS, null),
Material.WOOD, 0, GameCategory.CLASSICS, "None"),
//Arcade
DRAGONS("Dragons", null,
@ -74,7 +74,7 @@ public enum AchievementCategory
DRAGON_ESCAPE("Dragon Escape", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.GEMS_EARNED },
Material.DRAGON_EGG, 0, GameCategory.ARCADE, null),
Material.DRAGON_EGG, 0, GameCategory.ARCADE, "Digger Kit"),
SHEEP_QUEST("Sheep Quest", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
@ -82,11 +82,11 @@ public enum AchievementCategory
SNEAKY_ASSASSINS("Sneaky Assassins", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.INK_SACK, 0, GameCategory.ARCADE, null),
Material.INK_SACK, 0, GameCategory.ARCADE, "Briber Kit"),
ONE_IN_THE_QUIVER("One in the Quiver", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.BOW, 0, GameCategory.ARCADE, null),
Material.BOW, 0, GameCategory.ARCADE, "Slam Shooter Kit"),
SUPER_PAINTBALL("Super Paintball", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
@ -97,11 +97,11 @@ public enum AchievementCategory
Material.HARD_CLAY, 14, GameCategory.ARCADE, null),
RUNNER("Runner", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.LEATHER_BOOTS, 0, GameCategory.ARCADE, null),
SPLEEF("Super Spleef", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.IRON_SPADE, 0, GameCategory.ARCADE, null),
DEATH_TAG("Death Tag", null,
@ -110,7 +110,7 @@ public enum AchievementCategory
SNAKE("Snake", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
Material.WOOL, 4, GameCategory.ARCADE, null),
Material.WOOL, 4, GameCategory.ARCADE, "Reversal Snake Kit"),
BACON_BRAWL("Bacon Brawl", null,
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },

View File

@ -323,7 +323,7 @@ public class Chat extends MiniPlugin
UtilPlayer.message(sender, F.main("Chat", "You are sending messages too fast."));
event.setCancelled(true);
}
else if (!_clientManager.Get(sender).GetRank().Has(Rank.HELPER) &&
else if (!_clientManager.Get(sender).GetRank().Has(Rank.TRAINEE) &&
msgContainsHack(event.getMessage()))
{
UtilPlayer.message(sender, F.main("Chat",
@ -337,7 +337,7 @@ public class Chat extends MiniPlugin
MessageData lastMessage = _playerLastMessage.get(sender.getUniqueId());
long chatSlowTime = 1000L * _chatSlow;
long timeDiff = System.currentTimeMillis() - lastMessage.getTimeSent();
if (timeDiff < chatSlowTime && !_clientManager.Get(sender).GetRank().Has(Rank.HELPER))
if (timeDiff < chatSlowTime && !_clientManager.Get(sender).GetRank().Has(Rank.TRAINEE))
{
UtilPlayer.message(sender, F.main("Chat", "Chat slow enabled. Please wait " + F.time(UtilTime.convertString(chatSlowTime - timeDiff, 1, UtilTime.TimeUnit.FIT))));
event.setCancelled(true);

View File

@ -251,7 +251,7 @@ public class FriendManager extends MiniDbClientPlugin<FriendData>
public void showFriends(Player caller)
{
boolean isStaff = ClientManager.Get(caller).GetRank().Has(Rank.HELPER);
boolean isStaff = ClientManager.Get(caller).GetRank().Has(Rank.TRAINEE);
boolean gotAFriend = false;
List<FriendStatus> friendStatuses = Get(caller).getFriends();
Collections.sort(friendStatuses, _friendSorter);

View File

@ -88,7 +88,7 @@ public class IgnoreManager extends MiniDbClientPlugin<IgnoreData>
@EventHandler
public void onChat(AsyncPlayerChatEvent event)
{
if (ClientManager.Get(event.getPlayer()).GetRank().Has(Rank.HELPER))
if (ClientManager.Get(event.getPlayer()).GetRank().Has(Rank.TRAINEE))
return;
Iterator<Player> itel = event.getRecipients().iterator();

View File

@ -191,7 +191,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
// My attempt at trying to mitigate some of the spam bots - Phinary
// Triggers if they are whispering a new player
if (!GetClientManager().Get(from).GetRank().Has(Rank.HELPER) && Get(from).LastTo != null
if (!GetClientManager().Get(from).GetRank().Has(Rank.TRAINEE) && Get(from).LastTo != null
&& !Get(from).LastTo.equalsIgnoreCase(to.getName()))
{
long delta = System.currentTimeMillis() - Get(from).LastToTime;
@ -247,7 +247,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
if (!to.equals(staff) && !from.equals(staff))
{
if (_clientManager.Get(staff).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(staff).GetRank().Has(Rank.TRAINEE))
{
UtilPlayer.message(staff, F.rank(_clientManager.Get(from).GetRank()) + " " + from.getName() + C.cPurple
+ " -> " + F.rank(_clientManager.Get(to).GetRank()) + " " + to.getName() + " " + C.cPurple + message);
@ -364,7 +364,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
if (!to.equals(staff))
{
if (_clientManager.Get(staff).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(staff).GetRank().Has(Rank.TRAINEE))
{
UtilPlayer.message(staff,
@ -442,7 +442,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
if (!target.equals(staff))
{
if (_clientManager.Get(staff).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(staff).GetRank().Has(Rank.TRAINEE))
{
UtilPlayer.message(staff,

View File

@ -48,7 +48,7 @@ public class AdminCommand extends CommandBase<MessageManager>
boolean staff = false;
for (Player to : UtilServer.getPlayers())
{
if (Plugin.GetClientManager().Get(to).GetRank().Has(Rank.HELPER))
if (Plugin.GetClientManager().Get(to).GetRank().Has(Rank.TRAINEE))
{
if (!to.equals(caller))
UtilPlayer.message(to, F.rank(Plugin.GetClientManager().Get(caller).GetRank()) + " " + caller.getName() + " " + C.cPurple + message);

View File

@ -24,7 +24,7 @@ public class MessageAdminCommand extends CommandBase<MessageManager>
}
else
{
if (!Plugin.GetClientManager().Get(caller).GetRank().Has(caller, Rank.HELPER, true))
if (!Plugin.GetClientManager().Get(caller).GetRank().Has(caller, Rank.TRAINEE, true))
return;
if (args.length == 0)

View File

@ -24,7 +24,7 @@ public class ResendAdminCommand extends CommandBase<MessageManager>
}
else
{
if (!Plugin.GetClientManager().Get(caller).GetRank().Has(caller, Rank.HELPER, true))
if (!Plugin.GetClientManager().Get(caller).GetRank().Has(caller, Rank.TRAINEE, true))
return;
String lastTo = Plugin.Get(caller).LastAdminTo;

View File

@ -72,7 +72,7 @@ public class ServerCommand extends CommandBase<Portal>
}
else if (servUp.contains("STAFF"))
{
if (playerRank.Has(Rank.HELPER))
if (playerRank.Has(Rank.TRAINEE))
Plugin.sendPlayerToServer(player, args[0]);
else
deniedAccess = true;

View File

@ -19,7 +19,7 @@ public class PunishCommand extends CommandBase<Punish>
{
public PunishCommand(Punish plugin)
{
super(plugin, Rank.HELPER, "punish", "p");
super(plugin, Rank.TRAINEE, "punish", "p");
}
@Override

View File

@ -214,7 +214,7 @@ public class Punish extends MiniPlugin
{
for (Player player : UtilServer.getPlayers())
{
if (_clientManager.Get(player).GetRank().Has(Rank.HELPER) || player.getName().equals(punishee))
if (_clientManager.Get(player).GetRank().Has(Rank.TRAINEE) || player.getName().equals(punishee))
{
player.sendMessage(msg);
}

View File

@ -56,7 +56,7 @@ public class ServerConfiguration extends MiniPlugin
@EventHandler
public void onPlayerLogin(PlayerLoginEvent event)
{
if (_serverGroup.getStaffOnly() && !_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.HELPER, false))
if (_serverGroup.getStaffOnly() && !_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.TRAINEE, false))
event.disallow(Result.KICK_OTHER, "This is a staff only server.");
}

View File

@ -318,7 +318,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
+ "§r\n"
+ "§lHow do I apply for Trainee?\n"
+ "\n"
+ "§rYou may only apply for Helper if you have §bUltra§0, §5Hero§0, or §aLegend§0.\n"
+ "§rYou may only apply for Trainee if you have §bUltra§0, §5Hero§0, or §aLegend§0.\n"
+ "Apply at:\n"
+ "§omineplex.com/application\n");
@ -620,7 +620,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
public void playerPrivateMessage(PrivateMessageEvent event)
{
//Dont Let PM Near Spawn!
if (UtilMath.offset2d(GetSpawn(), event.getSender().getLocation()) == 0 && !_clientManager.Get(event.getSender()).GetRank().Has(Rank.HELPER))
if (UtilMath.offset2d(GetSpawn(), event.getSender().getLocation()) == 0 && !_clientManager.Get(event.getSender()).GetRank().Has(Rank.TRAINEE))
{
UtilPlayer.message(event.getSender(), F.main("Chat", "You must leave spawn before you can Private Message!"));
event.setCancelled(true);
@ -634,7 +634,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
return;
//Dont Let Chat Near Spawn!
if (UtilMath.offset2d(GetSpawn(), event.getPlayer().getLocation()) == 0 && !_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.HELPER))
if (UtilMath.offset2d(GetSpawn(), event.getPlayer().getLocation()) == 0 && !_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.TRAINEE))
{
UtilPlayer.message(event.getPlayer(), F.main("Chat", "You must leave spawn before you can chat!"));
event.setCancelled(true);

View File

@ -130,7 +130,7 @@ public class BlockToss extends SkillCharge implements IThrown
}
//Block to Item
FallingBlock block = player.getWorld().spawnFallingBlock(player.getEyeLocation(), event.getClickedBlock().getType(), (byte)0);
FallingBlock block = player.getWorld().spawnFallingBlock(player.getEyeLocation(), event.getClickedBlock().getType(), event.getClickedBlock().getData());
//Action
player.eject();
@ -235,7 +235,7 @@ public class BlockToss extends SkillCharge implements IThrown
{
FallingBlock thrown = (FallingBlock) data.GetThrown();
FallingBlock newThrown = data.GetThrown().getWorld().spawnFallingBlock(data.GetThrown().getLocation(), thrown.getMaterial(), (byte)0);
FallingBlock newThrown = data.GetThrown().getWorld().spawnFallingBlock(data.GetThrown().getLocation(), thrown.getMaterial(), thrown.getBlockData());
//Remove Old
_falling.remove(thrown);

View File

@ -48,7 +48,7 @@ public class ClassShopManager extends MiniPlugin
public boolean hasAchievements(Player player)
{
if (_clientManager.Get(player).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(player).GetRank().Has(Rank.TRAINEE))
return true;
return _achievementManager.hasCategory(player, new Achievement[]

View File

@ -797,7 +797,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers())
{
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.HELPER, false))
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.TRAINEE, false))
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);

View File

@ -4,33 +4,6 @@ import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import net.minecraft.server.v1_7_R4.EntityArrow;
import net.minecraft.server.v1_7_R4.Item;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
@ -57,6 +30,32 @@ import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.BehindEnemyLinesStatTracker;
import nautilus.game.arcade.stats.BlockShreadStatTracker;
import nautilus.game.arcade.stats.TheComebackStatTracker;
import net.minecraft.server.v1_7_R4.EntityArrow;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
public class TurfForts extends TeamGame
{
@ -328,6 +327,16 @@ public class TurfForts extends TeamGame
}
}
@EventHandler(priority = EventPriority.HIGH)
public void BlockBreak(BlockBreakEvent event)
{
if (!IsAlive(event.getPlayer()))
{
event.setCancelled(true);
return;
}
}
@EventHandler
public void BlockDamage(ProjectileHitEvent event)

View File

@ -6,24 +6,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.EntityEffect;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
@ -43,14 +25,32 @@ 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.GameTeam.PlayerState;
import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.paintball.PlayerCopy;
import nautilus.game.arcade.game.games.wither.kit.*;
import nautilus.game.arcade.game.games.wither.kit.KitHumanArcher;
import nautilus.game.arcade.game.games.wither.kit.KitWitherMinion;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.NullKit;
import nautilus.game.arcade.kit.perks.data.IBlockRestorer;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.EntityEffect;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
public class WitherGame extends TeamGame implements IBlockRestorer
{
private GameTeam _runners;
@ -110,13 +110,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer
this.KitRegisterState = GameState.Prepare;
this.TeamArmor = true;
this.TeamArmorHotbar = false;
_help = new String[]
{
C.cRed + C.Bold + "This game is still under development!",
};
this.TeamArmorHotbar = false;
}
@Override

View File

@ -2,6 +2,19 @@ package nautilus.game.arcade.kit.perks;
import java.util.HashMap;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.kit.Perk;
import org.bukkit.Effect;
import org.bukkit.Sound;
import org.bukkit.block.Block;
@ -11,23 +24,10 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.kit.Perk;
public class PerkSeismicSlam extends Perk
{
private HashMap<LivingEntity, Long> _live = new HashMap<LivingEntity, Long>();
@ -39,6 +39,21 @@ public class PerkSeismicSlam extends Perk
C.cYellow + "Right-Click" + C.cGray + " with Spade to " + C.cGreen + "Seismic Slam"
});
}
@EventHandler
public void deactivateDeath(PlayerDeathEvent event)
{
if (!Manager.GetGame().IsLive())
return;
if (!Kit.HasKit(event.getEntity()))
return;
if (_live.containsKey(event.getEntity()))
{
_live.remove(event.getEntity());
}
}
@EventHandler
public void Leap(PlayerInteractEvent event)
@ -109,6 +124,9 @@ public class PerkSeismicSlam extends Perk
if (cur.equals(player))
continue;
if (cur instanceof Player && !Manager.IsAlive((Player) cur))
continue;
//Damage Event
Manager.GetDamage().NewDamageEvent(cur, player, null,
DamageCause.CUSTOM, damage * targets.get(cur) + 0.5, true, true, false,

View File

@ -3,17 +3,6 @@ package nautilus.game.arcade.kit.perks;
import java.util.HashMap;
import java.util.Iterator;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
@ -30,6 +19,18 @@ import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.kit.SmashPerk;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.util.Vector;
public class PerkZombieBile extends SmashPerk implements IThrown
{
private HashMap<Player, Long> _active = new HashMap<Player, Long>();
@ -70,6 +71,21 @@ public class PerkZombieBile extends SmashPerk implements IThrown
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));
}
@EventHandler
public void deactivateDeath(PlayerDeathEvent event)
{
if (!Manager.GetGame().IsLive())
return;
if (!Kit.HasKit(event.getEntity()))
return;
if (_active.containsKey(event.getEntity()))
{
_active.remove(event.getEntity());
}
}
@EventHandler
public void update(UpdateEvent event)
{

View File

@ -308,6 +308,7 @@ public class GameHostManager implements Listener
if (!event.getMessage().toLowerCase().startsWith("/menu"))
return;
event.setCancelled(true);
openMenu(event.getPlayer());
}