Saber-Factions/src/main/java/com/massivecraft/factions/cmd/CmdUpgrades.java

39 lines
1.0 KiB
Java
Raw Normal View History

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.struct.Permission;
2020-01-04 18:23:10 +01:00
import com.massivecraft.factions.zcore.fupgrades.FUpgradeFrame;
import com.massivecraft.factions.zcore.util.TL;
public class CmdUpgrades extends FCommand {
2019-12-02 19:55:38 +01:00
/**
* @author Illyria Team
*/
public CmdUpgrades() {
super();
this.aliases.addAll(Aliases.upgrades);
this.requirements = new CommandRequirements.Builder(Permission.UPGRADES)
.playerOnly()
.memberOnly()
.build();
}
@Override
public void perform(CommandContext context) {
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fupgrades.Enabled")) {
2019-11-29 10:58:59 +01:00
context.fPlayer.msg(TL.COMMAND_UPGRADES_DISABLED);
return;
}
2020-01-04 18:23:10 +01:00
new FUpgradeFrame(context.faction).buildGUI(context.fPlayer);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_UPGRADES_DESCRIPTION;
}
}