Mineplex2018-withcommit/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/commands/GearCommand.java

68 lines
2.1 KiB
Java
Raw Normal View History

package mineplex.game.clans.items.commands;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.util.Vector;
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;
import mineplex.game.clans.items.CustomItem;
import mineplex.game.clans.items.GearManager;
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;
public class GearCommand extends CommandBase<GearManager>
{
private GearManager _gearManager;
public GearCommand(GearManager plugin)
{
super(plugin, Rank.ADMIN, "gear", "custom-gear");
_gearManager = plugin;
}
@Override
public void Execute(Player caller, String[] args)
{
UtilPlayer.message(caller, F.main("Gear", "Spawning a random piece of custom gear!"));
if (args == null || args.length == 0)
{
Vector direction = caller.getLocation().getDirection().normalize();
_gearManager.spawnItem(caller.getEyeLocation().add(direction));
}
else
{
caller.updateInventory();
//caller.setFoodLevel(10);
//return;
}
}
}