Changes and bug fixes.
This commit is contained in:
parent
da6b1316d3
commit
5e7ddb968e
@ -1,12 +1,113 @@
|
||||
package nautilus.game.arcade;
|
||||
|
||||
import java.awt.Event;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.achievement.AchievementManager;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.blood.Blood;
|
||||
import mineplex.core.bonuses.BonusManager;
|
||||
import mineplex.core.chat.Chat;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.jsonchat.ClickEvent;
|
||||
import mineplex.core.common.jsonchat.JsonMessage;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.creature.Creature;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.elo.EloManager;
|
||||
import mineplex.core.energy.Energy;
|
||||
import mineplex.core.explosion.Explosion;
|
||||
import mineplex.core.explosion.ExplosionEvent;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.movement.Movement;
|
||||
import mineplex.core.notifier.NotificationManager;
|
||||
import mineplex.core.npc.NpcManager;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.packethandler.PacketPlayResourcePackStatus;
|
||||
import mineplex.core.packethandler.PacketPlayResourcePackStatus.EnumResourcePackStatus;
|
||||
import mineplex.core.party.PartyManager;
|
||||
import mineplex.core.pet.PetManager;
|
||||
import mineplex.core.poll.PollManager;
|
||||
import mineplex.core.portal.Portal;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
import mineplex.core.projectile.ProjectileManager;
|
||||
import mineplex.core.resourcepack.ResPackManager;
|
||||
import mineplex.core.resourcepack.ResUnloadCheck;
|
||||
import mineplex.core.resourcepack.redis.RedisUnloadResPack;
|
||||
import mineplex.core.reward.RewardRarity;
|
||||
import mineplex.core.reward.rewards.PetReward;
|
||||
import mineplex.core.stats.StatsManager;
|
||||
import mineplex.core.status.ServerStatusManager;
|
||||
import mineplex.core.task.TaskManager;
|
||||
import mineplex.core.teleport.Teleport;
|
||||
import mineplex.core.timing.TimingManager;
|
||||
import mineplex.core.titangiveaway.TitanGiveawayManager;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.classcombat.Class.ClassManager;
|
||||
import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||
import mineplex.minecraft.game.classcombat.item.event.ItemTriggerEvent;
|
||||
import mineplex.minecraft.game.classcombat.shop.ClassCombatShop;
|
||||
import mineplex.minecraft.game.classcombat.shop.ClassShopManager;
|
||||
import mineplex.minecraft.game.core.IRelation;
|
||||
import mineplex.minecraft.game.core.condition.ConditionManager;
|
||||
import mineplex.minecraft.game.core.damage.DamageManager;
|
||||
import mineplex.minecraft.game.core.fire.Fire;
|
||||
import nautilus.game.arcade.addons.SoupAddon;
|
||||
import nautilus.game.arcade.addons.TeamArmorAddon;
|
||||
import nautilus.game.arcade.addons.compass.CompassAddon;
|
||||
import nautilus.game.arcade.command.DisguiseCommand;
|
||||
import nautilus.game.arcade.command.GameCommand;
|
||||
import nautilus.game.arcade.command.KitUnlockCommand;
|
||||
import nautilus.game.arcade.command.RequiredRankCommand;
|
||||
import nautilus.game.arcade.command.WriteCommand;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameServerConfig;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.event.EventModule;
|
||||
import nautilus.game.arcade.game.games.uhc.UHC;
|
||||
import nautilus.game.arcade.managers.GameAchievementManager;
|
||||
import nautilus.game.arcade.managers.GameChatManager;
|
||||
import nautilus.game.arcade.managers.GameCreationManager;
|
||||
import nautilus.game.arcade.managers.GameFlagManager;
|
||||
import nautilus.game.arcade.managers.GameGemManager;
|
||||
import nautilus.game.arcade.managers.GameHostManager;
|
||||
import nautilus.game.arcade.managers.GameLobbyManager;
|
||||
import nautilus.game.arcade.managers.GameLootManager;
|
||||
import nautilus.game.arcade.managers.GameManager;
|
||||
import nautilus.game.arcade.managers.GamePlayerManager;
|
||||
import nautilus.game.arcade.managers.GameSpectatorManager;
|
||||
import nautilus.game.arcade.managers.GameStatManager;
|
||||
import nautilus.game.arcade.managers.GameTournamentManager;
|
||||
import nautilus.game.arcade.managers.GameWorldManager;
|
||||
import nautilus.game.arcade.managers.HolidayManager;
|
||||
import nautilus.game.arcade.managers.IdleManager;
|
||||
import nautilus.game.arcade.managers.MiscManager;
|
||||
import nautilus.game.arcade.shop.ArcadeShop;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
@ -37,111 +138,6 @@ import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.achievement.AchievementManager;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.blood.Blood;
|
||||
import mineplex.core.bonuses.BonusManager;
|
||||
import mineplex.core.chat.Chat;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.jsonchat.ClickEvent;
|
||||
import mineplex.core.common.jsonchat.JsonMessage;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.creature.Creature;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.elo.EloManager;
|
||||
import mineplex.core.energy.Energy;
|
||||
import mineplex.core.explosion.Explosion;
|
||||
import mineplex.core.explosion.ExplosionEvent;
|
||||
import mineplex.core.gadget.gadgets.OutfitTeam;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.movement.Movement;
|
||||
import mineplex.core.notifier.NotificationManager;
|
||||
import mineplex.core.npc.NpcManager;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.packethandler.PacketPlayResourcePackStatus;
|
||||
import mineplex.core.packethandler.PacketPlayResourcePackStatus.EnumResourcePackStatus;
|
||||
import mineplex.core.party.PartyManager;
|
||||
import mineplex.core.pet.PetManager;
|
||||
import mineplex.core.poll.PollManager;
|
||||
import mineplex.core.portal.Portal;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
import mineplex.core.projectile.ProjectileManager;
|
||||
import mineplex.core.resourcepack.ResUnloadCheck;
|
||||
import mineplex.core.resourcepack.ResPackManager;
|
||||
import mineplex.core.resourcepack.redis.RedisUnloadResPack;
|
||||
import mineplex.core.reward.RewardRarity;
|
||||
import mineplex.core.reward.rewards.PetReward;
|
||||
import mineplex.core.stats.StatsManager;
|
||||
import mineplex.core.status.ServerStatusManager;
|
||||
import mineplex.core.task.TaskManager;
|
||||
import mineplex.core.teleport.Teleport;
|
||||
import mineplex.core.timing.TimingManager;
|
||||
import mineplex.core.titangiveaway.TitanGiveawayManager;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.classcombat.Class.ClassManager;
|
||||
import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
import mineplex.minecraft.game.classcombat.item.ItemFactory;
|
||||
import mineplex.minecraft.game.classcombat.item.event.ItemTriggerEvent;
|
||||
import mineplex.minecraft.game.classcombat.shop.ClassCombatShop;
|
||||
import mineplex.minecraft.game.classcombat.shop.ClassShopManager;
|
||||
import mineplex.minecraft.game.core.IRelation;
|
||||
import mineplex.minecraft.game.core.condition.ConditionManager;
|
||||
import mineplex.minecraft.game.core.damage.DamageManager;
|
||||
import mineplex.minecraft.game.core.fire.Fire;
|
||||
import nautilus.game.arcade.addons.SoupAddon;
|
||||
import nautilus.game.arcade.addons.TeamArmorAddon;
|
||||
import nautilus.game.arcade.addons.compass.CompassAddon;
|
||||
import nautilus.game.arcade.command.DisguiseCommand;
|
||||
import nautilus.game.arcade.command.GameCommand;
|
||||
import nautilus.game.arcade.command.RequiredRankCommand;
|
||||
import nautilus.game.arcade.command.WriteCommand;
|
||||
import nautilus.game.arcade.command.KitUnlockCommand;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameServerConfig;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.event.EventModule;
|
||||
import nautilus.game.arcade.game.games.uhc.UHC;
|
||||
import nautilus.game.arcade.managers.GameAchievementManager;
|
||||
import nautilus.game.arcade.managers.GameChatManager;
|
||||
import nautilus.game.arcade.managers.GameCreationManager;
|
||||
import nautilus.game.arcade.managers.GameFlagManager;
|
||||
import nautilus.game.arcade.managers.GameGemManager;
|
||||
import nautilus.game.arcade.managers.GameHostManager;
|
||||
import nautilus.game.arcade.managers.GameLobbyManager;
|
||||
import nautilus.game.arcade.managers.GameLootManager;
|
||||
import nautilus.game.arcade.managers.GameManager;
|
||||
import nautilus.game.arcade.managers.GamePlayerManager;
|
||||
import nautilus.game.arcade.managers.GameSpectatorManager;
|
||||
import nautilus.game.arcade.managers.GameStatManager;
|
||||
import nautilus.game.arcade.managers.GameTournamentManager;
|
||||
import nautilus.game.arcade.managers.GameWorldManager;
|
||||
import nautilus.game.arcade.managers.HolidayManager;
|
||||
import nautilus.game.arcade.managers.IdleManager;
|
||||
import nautilus.game.arcade.managers.MiscManager;
|
||||
import nautilus.game.arcade.shop.ArcadeShop;
|
||||
|
||||
public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
{
|
||||
@ -945,6 +941,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
player.setExp(0f);
|
||||
|
||||
((CraftPlayer) player).getHandle().spectating = false;
|
||||
((CraftPlayer) player).getHandle().ghost = false;
|
||||
((CraftPlayer) player).getHandle().k = true;
|
||||
|
||||
// Arrows go bye bye.
|
||||
@ -1390,6 +1387,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
player.setFlying(true);
|
||||
player.setFlySpeed(0.1f);
|
||||
((CraftPlayer) player).getHandle().spectating = true;
|
||||
((CraftPlayer) player).getHandle().ghost = true;
|
||||
((CraftPlayer) player).getHandle().k = false;
|
||||
|
||||
GetCondition().Factory().Cloak("Spectator", player, player, 7777, true, true);
|
||||
|
@ -38,7 +38,7 @@ public class KitThor extends AbbreviatedKit
|
||||
new Perk[]
|
||||
{
|
||||
new PerkKnockbackAttack(2),
|
||||
new PerkFletcher(2, 2, true),
|
||||
new PerkFletcher(2, 2, true, 9),
|
||||
new PerkSeismicHammer(),
|
||||
new PerkHammerThrow(),
|
||||
},
|
||||
|
@ -96,6 +96,12 @@ public class PerkFlameSlam extends Perk
|
||||
|
||||
for (Player player : copy.keySet())
|
||||
{
|
||||
if (!Manager.IsAlive(player) || UtilPlayer.isSpectator(player))
|
||||
{
|
||||
_live.remove(player);
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector vel = player.getLocation().getDirection();
|
||||
vel.setY(0);
|
||||
UtilAlg.Normalize(vel);
|
||||
|
@ -3,7 +3,18 @@ package nautilus.game.arcade.kit.perks;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftArrow;
|
||||
@ -18,18 +29,6 @@ import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
public class PerkFletcher extends Perk
|
||||
{
|
||||
private HashSet<Entity> _fletchArrows = new HashSet<Entity>();
|
||||
@ -37,8 +36,14 @@ public class PerkFletcher extends Perk
|
||||
private int _max = 0;
|
||||
private int _time = 0;
|
||||
private boolean _remove;
|
||||
private int _slot;
|
||||
|
||||
public PerkFletcher(int time, int max, boolean remove)
|
||||
{
|
||||
this(time, max, remove, -1);
|
||||
}
|
||||
|
||||
public PerkFletcher(int time, int max, boolean remove, int slot)
|
||||
{
|
||||
super("Fletcher", new String[]
|
||||
{
|
||||
@ -48,6 +53,7 @@ public class PerkFletcher extends Perk
|
||||
_time = time;
|
||||
_max = max;
|
||||
_remove = remove;
|
||||
_slot = slot;
|
||||
}
|
||||
|
||||
public boolean isFletchedArrow(ItemStack stack)
|
||||
@ -126,7 +132,14 @@ public class PerkFletcher extends Perk
|
||||
continue;
|
||||
|
||||
//Add
|
||||
cur.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Fletched Arrow")));
|
||||
if (_slot == -1)
|
||||
{
|
||||
cur.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Fletched Arrow")));
|
||||
}
|
||||
else
|
||||
{
|
||||
cur.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Fletched Arrow")));
|
||||
}
|
||||
|
||||
cur.playSound(cur.getLocation(), Sound.ITEM_PICKUP, 2f, 1f);
|
||||
}
|
||||
|
@ -3,6 +3,24 @@ package nautilus.game.arcade.kit.perks;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
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.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
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.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
@ -12,28 +30,12 @@ import org.bukkit.entity.Item;
|
||||
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.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
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.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
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 PerkHammerThrow extends Perk implements IThrown
|
||||
{
|
||||
private HashMap<Item, Player> _thrown = new HashMap<Item, Player>();
|
||||
@ -51,19 +53,16 @@ public class PerkHammerThrow extends Perk implements IThrown
|
||||
{
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
||||
|
||||
if (!UtilEvent.isAction(event, ActionType.R))
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (event.getPlayer().getItemInHand() == null)
|
||||
if (!UtilInv.IsItem(event.getItem(), Material.DIAMOND_AXE, (byte) -1))
|
||||
return;
|
||||
|
||||
if (!event.getPlayer().getItemInHand().getType().toString().contains("DIAMOND_AXE"))
|
||||
return;
|
||||
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (!Kit.HasKit(player))
|
||||
@ -96,7 +95,7 @@ public class PerkHammerThrow extends Perk implements IThrown
|
||||
|
||||
Player player = _thrown.remove(event.getItem());
|
||||
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)0, 1, "Thor Hammer"));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)0, 1, F.item("Thor Hammer")));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -111,9 +110,9 @@ public class PerkHammerThrow extends Perk implements IThrown
|
||||
{
|
||||
Item item = itemIterator.next();
|
||||
|
||||
if (item.getTicksLived() > 200)
|
||||
if (item.getTicksLived() > 200 || !item.isValid())
|
||||
{
|
||||
_thrown.get(item).getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)0, 1, "Thor Hammer"));
|
||||
_thrown.get(item).getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)0, 1, F.item("Thor Hammer")));
|
||||
item.remove();
|
||||
itemIterator.remove();
|
||||
}
|
||||
|
@ -196,6 +196,13 @@ public class PerkHorsePet extends Perk
|
||||
|
||||
if (!_horseMap.containsValue(event.getRightClicked()))
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
event.getPlayer().teleport(event.getPlayer().getLocation());
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = event.getPlayer();
|
||||
Horse horse = (Horse)event.getRightClicked();
|
||||
@ -206,11 +213,5 @@ public class PerkHorsePet extends Perk
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -732,6 +732,7 @@ public class GameFlagManager implements Listener
|
||||
player.setAllowFlight(true);
|
||||
player.setFlying(true);
|
||||
((CraftPlayer)player).getHandle().spectating = true;
|
||||
((CraftPlayer) player).getHandle().ghost = true;
|
||||
((CraftPlayer)player).getHandle().k = false;
|
||||
|
||||
for (int i=0 ; i<9 ; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user