2018-03-27 01:42:26 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2019-06-29 03:49:46 +02:00
|
|
|
import com.massivecraft.factions.SaberFactions;
|
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-03-03 04:51:21 +01:00
|
|
|
public CmdUpgrades() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("upgrades");
|
|
|
|
this.aliases.add("upgrade");
|
|
|
|
|
|
|
|
//this.requiredArgs.add("");
|
2019-05-14 15:27:57 +02:00
|
|
|
this.optionalArgs.put("mobs/crops/exp/power", "");
|
2019-03-03 04:51:21 +01:00
|
|
|
|
|
|
|
this.permission = Permission.UPGRADES.node;
|
|
|
|
this.disableOnLock = true;
|
|
|
|
|
|
|
|
senderMustBePlayer = true;
|
|
|
|
senderMustBeMember = true;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeAdmin = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform() {
|
2019-06-29 03:49:46 +02:00
|
|
|
if (!SaberFactions.plugin.getConfig().getBoolean("fupgrades.Enabled")) {
|
2019-03-03 04:51:21 +01:00
|
|
|
fme.sendMessage("This command is disabled!");
|
|
|
|
return;
|
|
|
|
}
|
2019-05-25 01:36:03 +02:00
|
|
|
new FUpgradesGUI().openMainMenu(fme);
|
2019-03-03 04:51:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_UPGRADES_DESCRIPTION;
|
|
|
|
}
|
2018-03-27 01:42:26 +02:00
|
|
|
|
|
|
|
}
|