2015-05-05 21:33:42 +02:00
|
|
|
package mineplex.game.clans.items.commands;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
2015-05-25 20:22:06 +02:00
|
|
|
import java.util.List;
|
2015-05-05 21:33:42 +02:00
|
|
|
|
|
|
|
import org.bukkit.Chunk;
|
2015-05-25 20:22:06 +02:00
|
|
|
import org.bukkit.Material;
|
2015-05-05 21:33:42 +02:00
|
|
|
import org.bukkit.entity.Player;
|
2015-05-25 20:22:06 +02:00
|
|
|
import org.bukkit.inventory.ItemStack;
|
|
|
|
import org.bukkit.inventory.meta.ItemMeta;
|
2015-06-01 18:25:20 +02:00
|
|
|
import org.bukkit.util.Vector;
|
2015-05-05 21:33:42 +02:00
|
|
|
|
|
|
|
import mineplex.core.command.CommandBase;
|
|
|
|
import mineplex.core.common.Rank;
|
|
|
|
import mineplex.core.common.util.C;
|
|
|
|
import mineplex.core.common.util.F;
|
|
|
|
import mineplex.core.common.util.UtilInput;
|
|
|
|
import mineplex.core.common.util.UtilMath;
|
|
|
|
import mineplex.core.common.util.UtilPlayer;
|
|
|
|
import mineplex.core.common.util.UtilServer;
|
|
|
|
import mineplex.core.common.util.UtilTime;
|
|
|
|
import mineplex.core.common.util.UtilTime.TimeUnit;
|
|
|
|
import mineplex.core.common.util.UtilWorld;
|
|
|
|
import mineplex.core.recharge.Recharge;
|
|
|
|
import mineplex.game.clans.clans.ClanInfo;
|
|
|
|
import mineplex.game.clans.clans.ClanRole;
|
|
|
|
import mineplex.game.clans.clans.ClansManager;
|
|
|
|
import mineplex.game.clans.clans.ClansUtility.ClanRelation;
|
|
|
|
import mineplex.game.clans.clans.ClientClan;
|
2015-05-25 20:22:06 +02:00
|
|
|
import mineplex.game.clans.items.CustomItem;
|
2015-05-05 21:33:42 +02:00
|
|
|
import mineplex.game.clans.items.GearManager;
|
2015-05-25 20:22:06 +02:00
|
|
|
import mineplex.game.clans.items.attributes.weapon.FlamingAttribute;
|
|
|
|
import mineplex.game.clans.items.attributes.weapon.FrostedAttribute;
|
|
|
|
import mineplex.game.clans.items.attributes.weapon.SharpAttribute;
|
|
|
|
import mineplex.game.clans.items.legendaries.LegendaryItem;
|
|
|
|
import mineplex.game.clans.items.legendaries.WindBlade;
|
2015-05-05 21:33:42 +02:00
|
|
|
|
|
|
|
public class GearCommand extends CommandBase<GearManager>
|
|
|
|
{
|
2015-06-01 18:25:20 +02:00
|
|
|
|
|
|
|
private GearManager _gearManager;
|
|
|
|
|
2015-05-05 21:33:42 +02:00
|
|
|
public GearCommand(GearManager plugin)
|
|
|
|
{
|
2015-07-14 02:11:17 +02:00
|
|
|
super(plugin, Rank.ADMIN, "gear", "custom-gear");
|
2015-06-01 18:25:20 +02:00
|
|
|
_gearManager = plugin;
|
2015-05-05 21:33:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void Execute(Player caller, String[] args)
|
|
|
|
{
|
2015-06-22 22:20:20 +02:00
|
|
|
UtilPlayer.message(caller, F.main("Gear", "Spawning a random piece of custom gear!"));
|
2015-05-05 21:33:42 +02:00
|
|
|
|
2015-06-01 18:25:20 +02:00
|
|
|
if (args == null || args.length == 0)
|
2015-05-25 20:22:06 +02:00
|
|
|
{
|
2015-06-01 18:25:20 +02:00
|
|
|
Vector direction = caller.getLocation().getDirection().normalize();
|
|
|
|
_gearManager.spawnItem(caller.getEyeLocation().add(direction));
|
2015-05-25 20:22:06 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-06-01 18:25:20 +02:00
|
|
|
Vector direction = caller.getLocation().getDirection().normalize();
|
|
|
|
_gearManager.spawnItem(caller.getEyeLocation().add(direction));
|
2015-05-25 20:22:06 +02:00
|
|
|
}
|
2015-05-05 21:33:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|