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

36 lines
1012 B
Java
Raw Normal View History

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.fupgrades.FUpgradesGUI;
import com.massivecraft.factions.zcore.util.TL;
public class CmdUpgrades extends FCommand {
public CmdUpgrades() {
super();
this.aliases.add("upgrades");
this.aliases.add("upgrade");
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;
}
new FUpgradesGUI().openMainMenu(context.fPlayer);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_UPGRADES_DESCRIPTION;
}
}