Introduced Brigadier Command System. More Formatting Coming in next commit.

This commit is contained in:
Driftay
2019-09-14 15:13:01 -04:00
parent b06e6e0f04
commit 3c9b606bb9
207 changed files with 4465 additions and 4017 deletions

View File

@@ -1,6 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.P;
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;
@@ -11,26 +11,20 @@ public class CmdUpgrades extends FCommand {
this.aliases.add("upgrades");
this.aliases.add("upgrade");
//this.requiredArgs.add("");
this.optionalArgs.put("mobs/crops/exp/power", "");
this.permission = Permission.UPGRADES.node;
this.disableOnLock = true;
senderMustBePlayer = true;
senderMustBeMember = true;
senderMustBeModerator = false;
senderMustBeAdmin = false;
this.requirements = new CommandRequirements.Builder(Permission.UPGRADES)
.playerOnly()
.memberOnly()
.build();
}
@Override
public void perform() {
if (!P.p.getConfig().getBoolean("fupgrades.Enabled")) {
fme.sendMessage("This command is disabled!");
public void perform(CommandContext context) {
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fupgrades.Enabled")) {
context.fPlayer.sendMessage("This command is disabled!");
return;
}
new FUpgradesGUI().openMainMenu(fme);
new FUpgradesGUI().openMainMenu(context.fPlayer);
}
@Override