2018-03-27 01:42:26 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2019-09-14 21:13:01 +02:00
|
|
|
import com.massivecraft.factions.FactionsPlugin;
|
2018-03-27 01:42:26 +02:00
|
|
|
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 {
|
2019-09-15 11:08:00 +02:00
|
|
|
public CmdUpgrades() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("upgrades");
|
|
|
|
this.aliases.add("upgrade");
|
2019-08-24 19:18:50 +02:00
|
|
|
|
2019-09-15 11:08:00 +02:00
|
|
|
this.requirements = new CommandRequirements.Builder(Permission.UPGRADES)
|
|
|
|
.playerOnly()
|
|
|
|
.memberOnly()
|
|
|
|
.build();
|
2019-08-24 19:18:50 +02:00
|
|
|
|
2019-09-15 11:08:00 +02:00
|
|
|
}
|
2019-08-24 19:18:50 +02:00
|
|
|
|
2019-09-15 11:08:00 +02:00
|
|
|
@Override
|
|
|
|
public void perform(CommandContext context) {
|
|
|
|
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fupgrades.Enabled")) {
|
|
|
|
context.fPlayer.sendMessage("This command is disabled!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
new FUpgradesGUI().openMainMenu(context.fPlayer);
|
|
|
|
}
|
2019-08-24 19:18:50 +02:00
|
|
|
|
2019-09-15 11:08:00 +02:00
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_UPGRADES_DESCRIPTION;
|
|
|
|
}
|
2018-03-27 01:42:26 +02:00
|
|
|
|
|
|
|
}
|