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