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.struct;
import com.massivecraft.factions.P;
import com.massivecraft.factions.FactionsPlugin;
import org.bukkit.command.CommandSender;
public enum Permission {
@@ -35,6 +35,7 @@ public enum Permission {
DISBAND_ANY("disband.any"),
FLY("fly"),
FOCUS("focus"),
GLOBALCHAT("globalchat"),
GRACE("grace"),
HELP("help"),
HOME("home"),
@@ -66,6 +67,7 @@ public enum Permission {
MONEY_F2P("money.f2p"),
MONEY_P2F("money.p2f"),
MONITOR_LOGINS("monitorlogins"),
NEAR("near"),
NO_BOOM("noboom"),
OPEN("open"),
OWNER("owner"),
@@ -77,6 +79,7 @@ public enum Permission {
PAYPAL("paypal"),
PAYPALSET("setpaypal"),
PERMISSIONS("permissions"),
POINTS("points"),
POWERBOOST("powerboost"),
POWER("power"),
POWER_ANY("power.any"),
@@ -103,6 +106,7 @@ public enum Permission {
SCOREBOARD("scoreboard"),
SEECHUNK("seechunk"),
SETWARP("setwarp"),
SHOP("shop"),
TOP("top"),
VIEWCHEST("viewchest"),
ADDPOINTS("addpoints"),
@@ -131,7 +135,7 @@ public enum Permission {
}
public boolean has(CommandSender sender, boolean informSenderIfNot) {
return P.p.perm.has(sender, this.node, informSenderIfNot);
return FactionsPlugin.getInstance().perm.has(sender, this.node, informSenderIfNot);
}
public boolean has(CommandSender sender) {

View File

@@ -1,7 +1,7 @@
package com.massivecraft.factions.struct;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.P;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.util.XMaterial;
import com.massivecraft.factions.zcore.fperms.Permissable;
import com.massivecraft.factions.zcore.util.TL;
@@ -199,7 +199,7 @@ public enum Relation implements Permissable {
// Utility method to build items for F Perm GUI
@Override
public ItemStack buildItem() {
final ConfigurationSection RELATION_CONFIG = P.p.getConfig().getConfigurationSection("fperm-gui.relation");
final ConfigurationSection RELATION_CONFIG = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.relation");
String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", ""));
List<String> lore = new ArrayList<>();

View File

@@ -1,7 +1,7 @@
package com.massivecraft.factions.struct;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.P;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.util.XMaterial;
import com.massivecraft.factions.zcore.fperms.Permissable;
import com.massivecraft.factions.zcore.util.TL;
@@ -113,7 +113,7 @@ public enum Role implements Permissable {
// Utility method to build items for F Perm GUI
@Override
public ItemStack buildItem() {
final ConfigurationSection RELATION_CONFIG = P.p.getConfig().getConfigurationSection("fperm-gui.relation");
final ConfigurationSection RELATION_CONFIG = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.relation");
String displayName = replacePlaceholders(RELATION_CONFIG.getString("placeholder-item.name", ""));
List<String> lore = new ArrayList<>();
@@ -132,7 +132,7 @@ public enum Role implements Permissable {
itemMeta.setDisplayName(displayName);
itemMeta.setLore(lore);
if (!P.p.mc17) {
if (!FactionsPlugin.getInstance().mc17) {
itemMeta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
}