2015-05-05 21:33:42 +02:00
|
|
|
package mineplex.game.clans.items.commands;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
import mineplex.core.command.CommandBase;
|
|
|
|
import mineplex.core.common.Rank;
|
2015-10-26 08:57:00 +01:00
|
|
|
import mineplex.game.clans.items.GearManager;
|
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-10-26 08:57:00 +01: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
|
|
|
}
|
2015-10-24 08:16:13 +02:00
|
|
|
|
2015-05-05 21:33:42 +02:00
|
|
|
@Override
|
|
|
|
public void Execute(Player caller, String[] args)
|
|
|
|
{
|
2015-06-01 18:25:20 +02:00
|
|
|
if (args == null || args.length == 0)
|
2015-05-25 20:22:06 +02:00
|
|
|
{
|
2015-10-24 21:36:53 +02:00
|
|
|
_gearManager.openShop(caller);
|
2015-05-25 20:22:06 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-10-02 20:30:39 +02:00
|
|
|
caller.updateInventory();
|
2015-05-25 20:22:06 +02:00
|
|
|
}
|
2015-05-05 21:33:42 +02:00
|
|
|
}
|
2015-10-24 08:16:13 +02:00
|
|
|
|
2015-05-05 21:33:42 +02:00
|
|
|
}
|