package mineplex.game.clans.items.commands; import org.bukkit.entity.Player; import org.bukkit.util.Vector; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.game.clans.items.GearManager; public class GearCommand extends CommandBase { private GearManager _gearManager; public GearCommand(GearManager plugin) { // Rank change is temporary, because I need to be able to test it. super(plugin, Rank.ALL, "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)); // _gearManager.openShop(caller); } else { caller.updateInventory(); // caller.setFoodLevel(10); // return; } } }