Compare commits
26 Commits
2.0.9-BETA
...
2.2.1-BETA
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a22bb348e | ||
|
|
91ca08e66b | ||
|
|
11d9f9230b | ||
|
|
38cf542d8c | ||
|
|
93b485aae8 | ||
|
|
b9996a2250 | ||
|
|
368a605d31 | ||
|
|
fec07b6fac | ||
|
|
58e43b41cc | ||
|
|
d5645f3b0a | ||
|
|
fa10bf7003 | ||
|
|
ca9502a4b6 | ||
|
|
0a60a581f5 | ||
|
|
faf245b870 | ||
|
|
f124877dba | ||
|
|
fc5befd7cc | ||
|
|
d03ca58105 | ||
|
|
f437144fba | ||
|
|
9284707db6 | ||
|
|
7b07e3ed23 | ||
|
|
c0719ec4f5 | ||
|
|
c9fd86ef9e | ||
|
|
939a60c611 | ||
|
|
36f22262c6 | ||
|
|
f5e9ce3d90 | ||
|
|
e244b469aa |
6
pom.xml
6
pom.xml
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>com.massivecraft</groupId>
|
||||
<artifactId>Factions</artifactId>
|
||||
<version>1.6.9.5-U0.2.1-2.0.9-BETA</version>
|
||||
<version>1.6.9.5-U0.2.1-2.2.1-BETA</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>SaberFactions</name>
|
||||
@@ -41,6 +41,10 @@
|
||||
<configuration>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>net.dv8tion</pattern>
|
||||
<shadedPattern>com.massivecraft.factions.shade.net.dv8tion</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>mkremins.fanciful</pattern>
|
||||
<shadedPattern>com.massivecraft.factions.shade.mkremins.fanciful</shadedPattern>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.massivecraft.factions.integration.dynmap.DynmapStyle;
|
||||
import com.massivecraft.factions.util.XMaterial;
|
||||
import com.massivecraft.factions.zcore.fperms.DefaultPermissions;
|
||||
@@ -104,6 +105,22 @@ public class Conf {
|
||||
public static String fromDiscordFactionChatPrefix = "&f[&dDiscord&f] ";
|
||||
public static String avatarUrl = "http://cravatar.eu/helmavatar/%uuid%.png";
|
||||
public static String webhookName = "SaberFactions Hook";
|
||||
public static String mainGuildID = "<Discord Server ID here>";
|
||||
public static String positiveReaction = "<Server emote here>";
|
||||
public static String negativeReaction = "<Server emote here>";
|
||||
public static Boolean restrictActionsWhenNotLinked = false;
|
||||
public static Boolean leaderRoles = false;
|
||||
public static String leaderRole = "<Leader Role ID>";
|
||||
public static Boolean factionDiscordTags = false;
|
||||
public static String factionTag = "(NAME) [FACTION]";
|
||||
public static Boolean factionRoles = false;
|
||||
public static List<Integer> factionRoleColor = new ArrayList<Integer>(){{
|
||||
add(25);
|
||||
add(162);
|
||||
add(203);
|
||||
}};
|
||||
public static String factionRolePrefix = "✦";
|
||||
public static String factionRoleSuffix = "✦";
|
||||
// server logging options
|
||||
public static boolean logFactionCreate = true;
|
||||
public static boolean logFactionDisband = true;
|
||||
@@ -115,6 +132,7 @@ public class Conf {
|
||||
public static boolean logMoneyTransactions = true;
|
||||
public static boolean logPlayerCommands = true;
|
||||
// prevent some potential exploits
|
||||
public static boolean denyFlightIfInNoClaimingWorld = false;
|
||||
public static boolean preventCreeperGlitch = true;
|
||||
public static boolean handleExploitObsidianGenerators = true;
|
||||
public static boolean handleExploitEnderPearlClipping = true;
|
||||
@@ -234,7 +252,6 @@ public class Conf {
|
||||
|
||||
public static Set<Material> territoryCancelAndAllowItemUseMaterial = new HashSet<>();
|
||||
public static Set<Material> territoryDenySwitchMaterials = new HashSet<>();
|
||||
public static Set<Material> territoryBypasssProtectedMaterials = EnumSet.noneOf(Material.class);
|
||||
public static boolean allowCreeperEggingChests = true;
|
||||
|
||||
// Economy settings
|
||||
@@ -535,11 +552,14 @@ public class Conf {
|
||||
safeZoneNerfedCreatureTypes.add(EntityType.ZOMBIE);
|
||||
|
||||
// Is this called lazy load?
|
||||
defaultFactionPermissions.put("LEADER", new DefaultPermissions(true));
|
||||
defaultFactionPermissions.put("COLEADER", new DefaultPermissions(true));
|
||||
defaultFactionPermissions.put("MODERATOR", new DefaultPermissions(true));
|
||||
defaultFactionPermissions.put("NORMAL MEMBER", new DefaultPermissions(false));
|
||||
defaultFactionPermissions.put("RECRUIT", new DefaultPermissions(false));
|
||||
defaultFactionPermissions.put("ALLY", new DefaultPermissions(false));
|
||||
defaultFactionPermissions.put("ENEMY", new DefaultPermissions(false));
|
||||
defaultFactionPermissions.put("TRUCE", new DefaultPermissions(false));
|
||||
defaultFactionPermissions.put("NEUTRAL", new DefaultPermissions(false));
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
|
||||
@@ -70,8 +70,8 @@ public class FLocation implements Serializable {
|
||||
String worldName = string.substring(start, index);
|
||||
start = index + 1;
|
||||
index = string.indexOf(",", start);
|
||||
int x = Integer.valueOf(string.substring(start, index));
|
||||
int y = Integer.valueOf(string.substring(index + 1, string.length() - 1));
|
||||
int x = Integer.parseInt(string.substring(start, index));
|
||||
int y = Integer.parseInt(string.substring(index + 1, string.length() - 1));
|
||||
return new FLocation(worldName, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.WarmUpUtil;
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
import net.dv8tion.jda.core.entities.User;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -30,6 +31,48 @@ public interface FPlayer extends EconomyParticipator {
|
||||
|
||||
boolean hasNotificationsEnabled();
|
||||
|
||||
/**
|
||||
* Get if a player has setup their Discord before
|
||||
* @return if the player setup Discord as a boolean
|
||||
*/
|
||||
boolean discordSetup();
|
||||
|
||||
/**
|
||||
* Get the players Discord user ID
|
||||
* @return players Discord user ID as a String
|
||||
*/
|
||||
String discordUserID();
|
||||
|
||||
/**
|
||||
* Set the players Boolean defining if the player has setup their Discord
|
||||
* @param b Boolean for discordSetup to be defined to
|
||||
*/
|
||||
void setDiscordSetup(Boolean b);
|
||||
|
||||
/**
|
||||
* Set the players Discord user ID
|
||||
* @param s String for their user ID to be set to
|
||||
*/
|
||||
void setDiscordUserID(String s);
|
||||
|
||||
/**
|
||||
* Get the players Discord user (If the player has not setup Discord it will return null!)
|
||||
* @return User from players set Discord User ID
|
||||
*/
|
||||
User discordUser();
|
||||
|
||||
/**
|
||||
* Used to check if this player should be served titles
|
||||
* @return if this FPlayer has titles enabled as a boolean
|
||||
*/
|
||||
boolean hasTitlesEnabled();
|
||||
|
||||
/**
|
||||
* Used to set if player should be served titles
|
||||
* @param b Boolean to titlesEnabled to
|
||||
*/
|
||||
void setTitlesEnabled(Boolean b);
|
||||
|
||||
/**
|
||||
* Used to determine if a player is in their faction's chest
|
||||
* @return if player is in their faction's as a boolean
|
||||
@@ -218,7 +261,7 @@ public interface FPlayer extends EconomyParticipator {
|
||||
|
||||
int getDeaths();
|
||||
|
||||
void takeMoney(int amt);
|
||||
boolean takeMoney(int amt);
|
||||
|
||||
boolean hasMoney(int amt);
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.massivecraft.factions.cmd.FCommand;
|
||||
import com.massivecraft.factions.cmd.check.CheckTask;
|
||||
import com.massivecraft.factions.cmd.check.WeeWooTask;
|
||||
import com.massivecraft.factions.cmd.chest.AntiChestListener;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.discord.DiscordListener;
|
||||
import com.massivecraft.factions.discord.FactionChatHandler;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.integration.Worldguard;
|
||||
import com.massivecraft.factions.integration.dynmap.EngineDynmap;
|
||||
@@ -267,11 +267,8 @@ public class FactionsPlugin extends MPlugin {
|
||||
this.getServer().getScheduler().runTaskTimer(this, CheckTask::cleanupTask, 0L, 1200L);
|
||||
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new WeeWooTask(this), 600L, 600L);
|
||||
}
|
||||
if(Conf.useDiscordSystem && !Conf.discordBotToken.equals("<token here>")) {
|
||||
new FactionChatHandler(this);
|
||||
} else {
|
||||
System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - You are not using Discord integration features, set conf.json option useDiscordSystem to true and put a valid token in before using!\n\n\n");
|
||||
}
|
||||
//Setup Discord Bot
|
||||
new Discord(this);
|
||||
|
||||
ShopConfig.setup();
|
||||
|
||||
@@ -415,7 +412,7 @@ public class FactionsPlugin extends MPlugin {
|
||||
.registerTypeAdapterFactory(EnumTypeAdapter.ENUM_FACTORY);
|
||||
}
|
||||
|
||||
private void divider() {
|
||||
public void divider() {
|
||||
System.out.println(" .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-");
|
||||
System.out.println(" / / \\ \\ / / \\ \\ / / \\ \\ / / \\ \\ / / \\ \\ / / \\ \\ / / \\ \\ / / \\");
|
||||
System.out.println("`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-'");
|
||||
|
||||
@@ -15,6 +15,10 @@ import java.util.Map;
|
||||
|
||||
public class BrigadierManager {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public Commodore commodore;
|
||||
public LiteralArgumentBuilder<Object> brigadier = LiteralArgumentBuilder.literal("factions");
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@ import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||
|
||||
public interface BrigadierProvider {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
ArgumentBuilder<Object, ?> get(ArgumentBuilder<Object, ?> parent);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
|
||||
public class CmdAHome extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdAHome() {
|
||||
super();
|
||||
this.aliases.add("ahome");
|
||||
|
||||
@@ -11,6 +11,10 @@ import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdAdmin extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdAdmin() {
|
||||
super();
|
||||
this.aliases.add("admin");
|
||||
@@ -80,7 +84,9 @@ public class CmdAdmin extends FCommand {
|
||||
|
||||
// Inform all players
|
||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
||||
fplayer.msg(TL.COMMAND_ADMIN_PROMOTED, context.player == null ? TL.GENERIC_SERVERADMIN.toString() : context.fPlayer.describeTo(fplayer, true), fyou.describeTo(fplayer), targetFaction.describeTo(fplayer));
|
||||
fplayer.msg(TL.COMMAND_ADMIN_PROMOTED,
|
||||
context.player == null ? TL.GENERIC_SERVERADMIN.toString() : context.fPlayer.describeTo(fplayer, true),
|
||||
fyou.describeTo(fplayer), targetFaction.describeTo(fplayer));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class CmdAnnounce extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdAnnounce() {
|
||||
super();
|
||||
this.aliases.add("ann");
|
||||
|
||||
@@ -8,6 +8,10 @@ import java.util.ArrayList;
|
||||
|
||||
public class CmdAutoHelp extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdAutoHelp() {
|
||||
this.aliases.add("?");
|
||||
this.aliases.add("h");
|
||||
|
||||
@@ -13,6 +13,10 @@ import java.util.logging.Level;
|
||||
|
||||
public class CmdBan extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdBan() {
|
||||
super();
|
||||
this.aliases.add("ban");
|
||||
|
||||
@@ -13,6 +13,10 @@ import java.util.List;
|
||||
|
||||
public class CmdBanlist extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdBanlist() {
|
||||
super();
|
||||
this.aliases.add("banlist");
|
||||
|
||||
@@ -13,6 +13,11 @@ import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
public class CmdBanner extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdBanner() {
|
||||
this.aliases.add("banner");
|
||||
this.aliases.add("warbanner");
|
||||
@@ -29,12 +34,10 @@ public class CmdBanner extends FCommand {
|
||||
context.msg(TL.COMMAND_BANNER_NOBANNER);
|
||||
return;
|
||||
}
|
||||
if (!context.fPlayer.hasMoney(FactionsPlugin.getInstance().getConfig().getInt("fbanners.Banner-Cost", 5000))) {
|
||||
if (!context.fPlayer.takeMoney(FactionsPlugin.getInstance().getConfig().getInt("fbanners.Banner-Cost", 5000))) {
|
||||
context.msg(TL.COMMAND_BANNER_NOTENOUGHMONEY);
|
||||
return;
|
||||
}
|
||||
this.takeMoney(context.fPlayer, FactionsPlugin.getInstance().getConfig().getInt("fbanners.Banner-Cost", 5000));
|
||||
this.takeMoney(context.fPlayer, FactionsPlugin.getInstance().getConfig().getInt("fbanners.Banner-Cost", 5000));
|
||||
ItemStack warBanner = context.fPlayer.getFaction().getBanner();
|
||||
ItemMeta warmeta = warBanner.getItemMeta();
|
||||
warmeta.setDisplayName(FactionsPlugin.getInstance().color(FactionsPlugin.getInstance().getConfig().getString("fbanners.Item.Name")));
|
||||
@@ -44,7 +47,7 @@ public class CmdBanner extends FCommand {
|
||||
warBanner.setAmount(1);
|
||||
context.player.getInventory().addItem(warBanner);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean hasMoney(FPlayer fme, int amt) {
|
||||
Economy econ = FactionsPlugin.getInstance().getEcon();
|
||||
if (econ.getBalance(fme.getPlayer()) >= amt) {
|
||||
@@ -53,11 +56,10 @@ public class CmdBanner extends FCommand {
|
||||
fme.msg(TL.COMMAND_BANNER_NOTENOUGHMONEY);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void takeMoney(FPlayer fme, int amt) {
|
||||
if (this.hasMoney(fme, amt)) {
|
||||
Economy econ = FactionsPlugin.getInstance().getEcon();
|
||||
econ.withdrawPlayer(fme.getPlayer(), (double) amt);
|
||||
fme.sendMessage(TL.COMMAND_BANNER_MONEYTAKE.toString().replace("{amount}", amt + ""));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdBoom extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdBoom() {
|
||||
super();
|
||||
this.aliases.add("noboom");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdBypass extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdBypass() {
|
||||
super();
|
||||
this.aliases.add("bypass");
|
||||
|
||||
@@ -10,6 +10,10 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
||||
public class CmdChat extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdChat() {
|
||||
super();
|
||||
this.aliases.add("c");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdChatSpy extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdChatSpy() {
|
||||
super();
|
||||
this.aliases.add("chatspy");
|
||||
|
||||
@@ -6,6 +6,11 @@ import com.massivecraft.factions.util.WarmUpUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdCheckpoint extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdCheckpoint() {
|
||||
super();
|
||||
this.aliases.add("checkp");
|
||||
|
||||
@@ -10,6 +10,11 @@ import mkremins.fanciful.FancyMessage;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdColeader extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdColeader() {
|
||||
super();
|
||||
this.aliases.add("co");
|
||||
|
||||
@@ -9,6 +9,10 @@ import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public class CmdConvert extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdConvert() {
|
||||
this.aliases.add("convert");
|
||||
this.requiredArgs.add("[MYSQL|JSON]");
|
||||
|
||||
@@ -7,6 +7,10 @@ import org.bukkit.Location;
|
||||
|
||||
public class CmdCoords extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdCoords() {
|
||||
super();
|
||||
this.aliases.add("coords");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||
import com.massivecraft.factions.event.FactionCreateEvent;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
@@ -8,13 +9,20 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.exceptions.HierarchyException;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class CmdCreate extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdCreate() {
|
||||
super();
|
||||
this.aliases.add("create");
|
||||
@@ -28,6 +36,10 @@ public class CmdCreate extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (Conf.restrictActionsWhenNotLinked && !context.fPlayer.discordSetup()) {
|
||||
context.player.sendMessage(ChatColor.translateAlternateColorCodes('&', TL.DISCORD_LINK_REQUIRED.toString()));
|
||||
return;
|
||||
}
|
||||
String tag = context.argAsString(0);
|
||||
|
||||
if (context.fPlayer.hasFaction()) {
|
||||
@@ -78,7 +90,6 @@ public class CmdCreate extends FCommand {
|
||||
FPlayerJoinEvent joinEvent = new FPlayerJoinEvent(FPlayers.getInstance().getByPlayer(context.player), faction, FPlayerJoinEvent.PlayerJoinReason.CREATE);
|
||||
Bukkit.getServer().getPluginManager().callEvent(joinEvent);
|
||||
// join event cannot be cancelled or you'll have an empty faction
|
||||
|
||||
// finish setting up the FPlayer
|
||||
context.fPlayer.setFaction(faction, false);
|
||||
// We should consider adding the role just AFTER joining the faction.
|
||||
@@ -90,6 +101,22 @@ public class CmdCreate extends FCommand {
|
||||
follower.msg(TL.COMMAND_CREATE_CREATED, context.fPlayer.getName(), faction.getTag(follower));
|
||||
}
|
||||
}
|
||||
//Discord
|
||||
try {
|
||||
if (Discord.useDiscord && context.fPlayer.discordSetup() && Discord.isInMainGuild(context.fPlayer.discordUser()) && Discord.mainGuild != null) {
|
||||
Member m = Discord.mainGuild.getMember(context.fPlayer.discordUser());
|
||||
if (Conf.factionRoles) {
|
||||
Discord.mainGuild.getController().addSingleRoleToMember(m, Discord.createFactionRole(faction.getTag())).queue();
|
||||
}
|
||||
if (Conf.leaderRoles && Discord.leader != null) {
|
||||
Discord.mainGuild.getController().addSingleRoleToMember(m, Discord.leader).queue();
|
||||
}
|
||||
if (Conf.factionDiscordTags) {
|
||||
Discord.mainGuild.getController().setNickname(m, Discord.getNicknameString(context.fPlayer)).queue();
|
||||
}
|
||||
}
|
||||
} catch (HierarchyException e) {System.out.print(e.getMessage());}
|
||||
//End Discord
|
||||
context.msg(TL.COMMAND_CREATE_YOUSHOULD, FactionsPlugin.getInstance().cmdBase.cmdDescription.getUsageTemplate(context));
|
||||
if (Conf.econEnabled) Econ.setBalance(faction.getAccountId(), Conf.econFactionStartingBalance);
|
||||
if (Conf.logFactionCreate)
|
||||
|
||||
66
src/main/java/com/massivecraft/factions/cmd/CmdDebug.java
Normal file
66
src/main/java/com/massivecraft/factions/cmd/CmdDebug.java
Normal file
@@ -0,0 +1,66 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.discord.DiscordSetupAttempt;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdDebug extends FCommand {
|
||||
public CmdDebug() {
|
||||
super();
|
||||
this.aliases.add("debug");
|
||||
this.requirements = new CommandRequirements.Builder(Permission.DEBUG).build();
|
||||
}
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
FactionsPlugin.getInstance().divider();
|
||||
System.out.print("----------Debug Info----------");
|
||||
System.out.print("-------Main-------");
|
||||
System.out.print("Server Version: " + FactionsPlugin.getInstance().getServer().getVersion());
|
||||
System.out.print("Server Bukkit Version: " + FactionsPlugin.getInstance().getServer().getBukkitVersion());
|
||||
System.out.print("SaberFactions Version: " + FactionsPlugin.getInstance().getDescription().getVersion());
|
||||
System.out.print("Is Beta Version: " + (FactionsPlugin.getInstance().getDescription().getFullName().contains("BETA") ? "True" : "False"));
|
||||
System.out.print("Players Online: " + Bukkit.getOnlinePlayers().size());
|
||||
System.out.print("------Command------");
|
||||
System.out.print("Discord Commands: " + FCmdRoot.instance.discordEnabled);
|
||||
System.out.print("Check/WeeWoo Commands: " + FCmdRoot.instance.checkEnabled);
|
||||
System.out.print("Mission Command: " + FCmdRoot.instance.missionsEnabled);
|
||||
System.out.print("Shop Command: " + FCmdRoot.instance.fShopEnabled);
|
||||
System.out.print("Inventory See Command: " + FCmdRoot.instance.invSeeEnabled);
|
||||
System.out.print("Points Command: " + FCmdRoot.instance.fPointsEnabled);
|
||||
System.out.print("Alts Command: " + FCmdRoot.instance.fAltsEnabled);
|
||||
System.out.print("Grace Command: " + FCmdRoot.instance.fGraceEnabled);
|
||||
System.out.print("Focus Command: " + FCmdRoot.instance.fFocusEnabled);
|
||||
System.out.print("Fly Command: " + FCmdRoot.instance.fFlyEnabled);
|
||||
System.out.print("PayPal Commands: " + FCmdRoot.instance.fPayPalEnabled);
|
||||
System.out.print("Inspect Command: " + FCmdRoot.instance.coreProtectEnabled);
|
||||
System.out.print("Internal FTOP Command: " + FCmdRoot.instance.internalFTOPEnabled);
|
||||
System.out.print("----End Command----");
|
||||
System.out.print("-----End Main-----");
|
||||
System.out.print("------Discord------");
|
||||
System.out.print("Discord Integration enabled in config: " + Discord.confUseDiscord);
|
||||
System.out.print("Discord Integration enabled: " + Discord.useDiscord);
|
||||
System.out.print("Setup attempts: " + Discord.setupLog.size());
|
||||
System.out.print("FPlayers waiting to link: " + Discord.waitingLink.size());
|
||||
System.out.print("Bot Token: " + (Discord.botToken == "<token here>" ? "Not Set" : "Set"));
|
||||
System.out.print("JDA Null: " + (Discord.jda == null ? "True" : "False"));
|
||||
System.out.print("Main Guild ID: " + Discord.mainGuildID);
|
||||
System.out.print("Main Guild Null: " + (Discord.mainGuild == null ? "True" : "False"));
|
||||
System.out.print("Emotes enabled: " + Discord.useEmotes);
|
||||
System.out.print("Leader role null: " + (Discord.leader == null ? "True" : "False"));
|
||||
System.out.print("Attempt Log:");
|
||||
for (DiscordSetupAttempt d : Discord.setupLog) {System.out.print(d.getDifferentialFormatted() + " " + d.getSuccess() + " " + d.getReason());}
|
||||
System.out.print("End Attempt Log");
|
||||
System.out.print("----End Discord----");
|
||||
System.out.print("--------End Debug Info--------");
|
||||
FactionsPlugin.getInstance().divider();
|
||||
context.fPlayer.msg(TL.COMMAND_DEBUG_PRINTED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_DEBUG_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,10 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdDeinvite extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdDeinvite() {
|
||||
super();
|
||||
this.aliases.add("deinvite");
|
||||
@@ -29,9 +33,8 @@ public class CmdDeinvite extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
|
||||
// Check if arg 0 == null do you don't have
|
||||
// `No player "null" could be found.` message.
|
||||
if (context.args.get(0) == null) {
|
||||
|
||||
if (context.args.size() == 0) {
|
||||
FancyMessage msg = new FancyMessage(TL.COMMAND_DEINVITE_CANDEINVITE.toString()).color(ChatColor.GOLD);
|
||||
for (String id : context.faction.getInvites()) {
|
||||
FPlayer fp = FPlayers.getInstance().getById(id);
|
||||
@@ -54,6 +57,7 @@ public class CmdDeinvite extends FCommand {
|
||||
if (you == null) {
|
||||
FancyMessage msg = new FancyMessage(TL.COMMAND_DEINVITE_CANDEINVITE.toString()).color(ChatColor.GOLD);
|
||||
for (String id : context.faction.getInvites()) {
|
||||
if(context.faction.getInvites().isEmpty()) return;
|
||||
FPlayer fp = FPlayers.getInstance().getById(id);
|
||||
String name = fp != null ? fp.getName() : id;
|
||||
msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_DEINVITE_CLICKTODEINVITE.format(name)).command("/" + Conf.baseCommandAliases.get(0) + " deinvite " + name);
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdDelFWarp extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdDelFWarp() {
|
||||
super();
|
||||
this.aliases.add("delwarp");
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.massivecraft.factions.zcore.util.TextUtil;
|
||||
|
||||
public class CmdDescription extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdDescription() {
|
||||
super();
|
||||
this.aliases.add("desc");
|
||||
|
||||
@@ -16,6 +16,10 @@ import java.util.HashMap;
|
||||
|
||||
public class CmdDisband extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
|
||||
private static HashMap<String, String> disbandMap = new HashMap<>();
|
||||
|
||||
|
||||
40
src/main/java/com/massivecraft/factions/cmd/CmdDiscord.java
Normal file
40
src/main/java/com/massivecraft/factions/cmd/CmdDiscord.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class CmdDiscord extends FCommand {
|
||||
public CmdDiscord() {
|
||||
super();
|
||||
this.aliases.add("discord");
|
||||
this.requirements = new CommandRequirements.Builder(Permission.DISCORD)
|
||||
.playerOnly()
|
||||
.build();
|
||||
}
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (context.fPlayer.discordSetup()) {
|
||||
context.fPlayer.msg(TL.DISCORD_ALREADY_LINKED, context.fPlayer.discordUser().getName());
|
||||
} else {
|
||||
if (Discord.waitingLink.containsValue(context.fPlayer)) {
|
||||
context.fPlayer.msg(TL.DISCORD_CODE_SENT, Discord.waitingLinkk.get(context.fPlayer), Discord.mainGuild.getSelfMember().getEffectiveName());
|
||||
return;
|
||||
}
|
||||
Integer random = new Random().nextInt(9999);
|
||||
while (Discord.waitingLink.containsValue(random)) {
|
||||
random = new Random().nextInt(9999);
|
||||
}
|
||||
Discord.waitingLink.put(random, context.fPlayer);
|
||||
Discord.waitingLinkk.put(context.fPlayer, random);
|
||||
context.fPlayer.msg(TL.DISCORD_CODE_SENT, String.valueOf(random));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_DISCORD_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,10 @@ import java.util.UUID;
|
||||
|
||||
public class CmdFGlobal extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Trent
|
||||
*/
|
||||
|
||||
public static List<UUID> toggled = new ArrayList<>();
|
||||
|
||||
public CmdFGlobal() {
|
||||
|
||||
@@ -14,6 +14,10 @@ import java.util.UUID;
|
||||
|
||||
public class CmdFWarp extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdFWarp() {
|
||||
super();
|
||||
this.aliases.add("warp");
|
||||
|
||||
@@ -19,6 +19,10 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class CmdFly extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
|
||||
public static ConcurrentHashMap<String, Boolean> flyMap = new ConcurrentHashMap<>();
|
||||
public static BukkitTask particleTask = null;
|
||||
@@ -97,6 +101,9 @@ public class CmdFly extends FCommand {
|
||||
}
|
||||
|
||||
public static boolean checkBypassPerms(FPlayer fme, Player me, Faction toFac) {
|
||||
if (Conf.denyFlightIfInNoClaimingWorld && !Conf.worldsNoClaiming.isEmpty() && Conf.worldsNoClaiming.stream().anyMatch(me.getWorld().getName()::equalsIgnoreCase))
|
||||
return false;
|
||||
|
||||
if (toFac != fme.getFaction()) {
|
||||
if (!me.hasPermission(Permission.FLY_WILD.node) && toFac.isWilderness() || !me.hasPermission(Permission.FLY_SAFEZONE.node) && toFac.isSafeZone() || !me.hasPermission(Permission.FLY_WARZONE.node) && toFac.isWarZone()) {
|
||||
fme.msg(TL.COMMAND_FLY_NO_ACCESS, toFac.getTag(fme));
|
||||
@@ -182,7 +189,7 @@ public class CmdFly extends FCommand {
|
||||
}
|
||||
|
||||
|
||||
if (fme.canFlyAtLocation())
|
||||
if (fme.canFlyAtLocation()) {
|
||||
context.doWarmUp(WarmUpUtil.Warmup.FLIGHT, TL.WARMUPS_NOTIFY_FLIGHT, "Fly", () -> {
|
||||
fme.setFlying(true);
|
||||
flyMap.put(fme.getPlayer().getName(), true);
|
||||
@@ -194,6 +201,9 @@ public class CmdFly extends FCommand {
|
||||
startFlyCheck();
|
||||
}
|
||||
}, FactionsPlugin.getInstance().getConfig().getLong("warmups.f-fly", 0));
|
||||
} else {
|
||||
fme.msg(TL.COMMAND_FLY_NO_ACCESS, Board.getInstance().getFactionAt(fme.getLastStoodAt()).getTag());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,11 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdFocus extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdFocus() {
|
||||
aliases.add("focus");
|
||||
|
||||
@@ -21,7 +26,7 @@ public class CmdFocus extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("ffocus.Enabled")) {
|
||||
context.msg(TL.GENERIC_DISABLED);
|
||||
context.msg(TL.GENERIC_DISABLED, "Faction Focus");
|
||||
return;
|
||||
}
|
||||
FPlayer target = context.argAsFPlayer(0);
|
||||
|
||||
@@ -9,6 +9,11 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class CmdGetVault extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdGetVault() {
|
||||
super();
|
||||
this.aliases.add("getvault");
|
||||
@@ -22,7 +27,7 @@ public class CmdGetVault extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fvault.Enabled")) {
|
||||
context.fPlayer.sendMessage("This command is disabled!");
|
||||
context.fPlayer.msg(TL.GENERIC_DISABLED, "Faction Vaults");
|
||||
return;
|
||||
}
|
||||
Location vaultLocation = context.faction.getVault();
|
||||
@@ -42,9 +47,9 @@ public class CmdGetVault extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!context.fPlayer.takeMoney(amount)) {return;}
|
||||
|
||||
//success :)
|
||||
context.fPlayer.takeMoney(amount);
|
||||
context.player.getInventory().addItem(vault);
|
||||
context.fPlayer.msg(TL.COMMAND_GETVAULT_RECEIVE);
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ import java.util.List;
|
||||
|
||||
public class CmdHelp extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public ArrayList<ArrayList<String>> helpPages;
|
||||
|
||||
public CmdHelp() {
|
||||
|
||||
@@ -20,6 +20,10 @@ import java.util.List;
|
||||
|
||||
public class CmdHome extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdHome() {
|
||||
super();
|
||||
this.aliases.add("home");
|
||||
|
||||
@@ -4,6 +4,11 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdInspect extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdInspect() {
|
||||
super();
|
||||
this.aliases.add("inspect");
|
||||
|
||||
@@ -16,6 +16,10 @@ import java.util.Objects;
|
||||
|
||||
public class CmdInventorySee extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdInventorySee() {
|
||||
super();
|
||||
|
||||
@@ -32,7 +36,7 @@ public class CmdInventorySee extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("f-inventory-see.Enabled")) {
|
||||
context.msg(TL.GENERIC_DISABLED);
|
||||
context.msg(TL.GENERIC_DISABLED, "Inventory See");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdInvite extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdInvite() {
|
||||
super();
|
||||
this.aliases.add("invite");
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.fupgrades.UpgradeType;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.exceptions.HierarchyException;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdJoin extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdJoin() {
|
||||
super();
|
||||
this.aliases.add("join");
|
||||
@@ -116,7 +123,18 @@ public class CmdJoin extends FCommand {
|
||||
}
|
||||
|
||||
faction.deinvite(fplayer);
|
||||
context.fPlayer.setRole(faction.getDefaultRole());
|
||||
try {
|
||||
context.fPlayer.setRole(faction.getDefaultRole());
|
||||
if (Discord.useDiscord && context.fPlayer.discordSetup() && Discord.isInMainGuild(context.fPlayer.discordUser()) && Discord.mainGuild != null) {
|
||||
Member m = Discord.mainGuild.getMember(context.fPlayer.discordUser());
|
||||
if (Conf.factionRoles) {
|
||||
Discord.mainGuild.getController().addSingleRoleToMember(m, Discord.createFactionRole(faction.getTag())).queue();
|
||||
}
|
||||
if (Conf.factionDiscordTags) {
|
||||
Discord.mainGuild.getController().setNickname(m, Discord.getNicknameString(context.fPlayer)).queue();
|
||||
}
|
||||
}
|
||||
} catch (HierarchyException e) {System.out.print(e.getMessage());}
|
||||
|
||||
if (Conf.logFactionJoin) {
|
||||
if (samePlayer) {
|
||||
|
||||
@@ -16,6 +16,10 @@ import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public class CmdKick extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdKick() {
|
||||
super();
|
||||
this.aliases.add("kick");
|
||||
|
||||
@@ -4,6 +4,11 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdKillHolograms extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdKillHolograms() {
|
||||
super();
|
||||
this.aliases.add("killholos");
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdLeave extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdLeave() {
|
||||
super();
|
||||
this.aliases.add("leave");
|
||||
|
||||
@@ -14,6 +14,10 @@ import java.util.List;
|
||||
|
||||
public class CmdList extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
private String[] defaults = new String[3];
|
||||
|
||||
public CmdList() {
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdLock extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
// TODO: This solution needs refactoring.
|
||||
/*
|
||||
factions.lock:
|
||||
|
||||
@@ -5,6 +5,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdLogins extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdLogins() {
|
||||
super();
|
||||
this.aliases.add("login");
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdLowPower extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdLowPower() {
|
||||
super();
|
||||
this.aliases.add("lowpower");
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdMap extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdMap() {
|
||||
super();
|
||||
this.aliases.add("map");
|
||||
|
||||
@@ -5,6 +5,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdMapHeight extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdMapHeight() {
|
||||
super();
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdMod extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdMod() {
|
||||
super();
|
||||
this.aliases.add("mod");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdModifyPower extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdModifyPower() {
|
||||
super();
|
||||
|
||||
|
||||
@@ -9,6 +9,11 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CmdNear extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdNear() {
|
||||
super();
|
||||
this.aliases.add("near");
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdOpen extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdOpen() {
|
||||
super();
|
||||
this.aliases.add("open");
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdOwner extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdOwner() {
|
||||
super();
|
||||
this.aliases.add("owner");
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdOwnerList extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdOwnerList() {
|
||||
super();
|
||||
this.aliases.add("ownerlist");
|
||||
|
||||
@@ -6,6 +6,11 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPaypalSee extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdPaypalSee() {
|
||||
this.aliases.add("seepaypal");
|
||||
this.aliases.add("paypal");
|
||||
@@ -20,7 +25,7 @@ public class CmdPaypalSee extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
context.msg(TL.GENERIC_DISABLED);
|
||||
context.msg(TL.GENERIC_DISABLED, "Faction Paypals");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPaypalSet extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdPaypalSet() {
|
||||
this.aliases.add("setpaypal");
|
||||
|
||||
@@ -25,7 +29,7 @@ public class CmdPaypalSet extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
context.fPlayer.msg(TL.GENERIC_DISABLED);
|
||||
context.fPlayer.msg(TL.GENERIC_DISABLED, "Faction Paypals");
|
||||
return;
|
||||
}
|
||||
if (context.fPlayer.getRole() != Role.LEADER && !context.fPlayer.isAdminBypassing()) {
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPeaceful extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdPeaceful() {
|
||||
super();
|
||||
this.aliases.add("peaceful");
|
||||
|
||||
@@ -17,6 +17,10 @@ import java.util.Set;
|
||||
|
||||
public class CmdPerm extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdPerm() {
|
||||
super();
|
||||
this.aliases.add("perm");
|
||||
|
||||
@@ -10,6 +10,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPermanent extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdPermanent() {
|
||||
super();
|
||||
this.aliases.add("permanent");
|
||||
|
||||
@@ -6,6 +6,11 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPermanentPower extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdPermanentPower() {
|
||||
super();
|
||||
this.aliases.add("permanentpower");
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPlayerTitleToggle extends FCommand {
|
||||
public CmdPlayerTitleToggle() {
|
||||
super();
|
||||
this.aliases.add("titles");
|
||||
this.requirements = new CommandRequirements.Builder(Permission.TOGGLE_TITLES)
|
||||
.build();
|
||||
}
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
context.fPlayer.setTitlesEnabled(!context.fPlayer.hasTitlesEnabled());
|
||||
context.msg(TL.COMMAND_TITLETOGGLE_TOGGLED, context.fPlayer.hasTitlesEnabled() ? FactionsPlugin.getInstance().color("&dEnabled") : FactionsPlugin.getInstance().color("&dDisabled"));
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {return TL.COMMAND_TITLETOGGLE_DESCRIPTION;}
|
||||
}
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPower extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdPower() {
|
||||
super();
|
||||
this.aliases.add("power");
|
||||
|
||||
@@ -9,6 +9,10 @@ import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public class CmdPowerBoost extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdPowerBoost() {
|
||||
super();
|
||||
this.aliases.add("powerboost");
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.listeners.FactionsPlayerListener;
|
||||
import com.massivecraft.factions.shop.ShopConfig;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -9,6 +10,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdReload extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdReload() {
|
||||
super();
|
||||
this.aliases.add("reload");
|
||||
@@ -26,7 +31,7 @@ public class CmdReload extends FCommand {
|
||||
FactionsPlugin.getInstance().loadLang();
|
||||
|
||||
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
|
||||
if (FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight", false)) {
|
||||
FactionsPlugin.getInstance().factionsFlight = true;
|
||||
}
|
||||
|
||||
@@ -34,6 +39,10 @@ public class CmdReload extends FCommand {
|
||||
FactionsPlayerListener.loadCorners();
|
||||
}
|
||||
|
||||
Discord.setupDiscord();
|
||||
//Recheck if commands should truly be disabled and rebuild.
|
||||
FCmdRoot.instance.addVariableCommands();
|
||||
FCmdRoot.instance.rebuild();
|
||||
long timeReload = (System.currentTimeMillis() - timeInitStart);
|
||||
|
||||
context.msg(TL.COMMAND_RELOAD_TIME, timeReload);
|
||||
|
||||
@@ -8,6 +8,11 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class CmdRules extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdRules() {
|
||||
super();
|
||||
aliases.add("r");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSB extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdSB() {
|
||||
this.aliases.add("sb");
|
||||
this.aliases.add("scoreboard");
|
||||
|
||||
@@ -10,6 +10,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSaveAll extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdSaveAll() {
|
||||
super();
|
||||
this.aliases.add("saveall");
|
||||
|
||||
@@ -15,6 +15,10 @@ import java.util.HashMap;
|
||||
|
||||
public class CmdSeeChunk extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
//Used a hashmap cuz imma make a particle selection gui later, will store it where the boolean is rn.
|
||||
public static HashMap<String, Boolean> seeChunkMap = new HashMap<>();
|
||||
private long interval;
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSeeDiscord extends FCommand{
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdSeeDiscord() {
|
||||
this.aliases.add("seediscord");
|
||||
this.aliases.add("discord");
|
||||
@@ -21,7 +25,7 @@ public class CmdSeeDiscord extends FCommand{
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fdiscord.Enabled")) {
|
||||
context.msg(TL.GENERIC_DISABLED);
|
||||
context.msg(TL.GENERIC_DISABLED, "Faction Discords");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSetBanner extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdSetBanner() {
|
||||
super();
|
||||
aliases.add("setbanner");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSetDefaultRole extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdSetDefaultRole() {
|
||||
super();
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSetDiscord extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdSetDiscord(){
|
||||
super();
|
||||
this.aliases.add("setdiscord");
|
||||
|
||||
@@ -9,6 +9,11 @@ import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSetFWarp extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdSetFWarp() {
|
||||
this.aliases.add("setwarp");
|
||||
this.aliases.add("sw");
|
||||
|
||||
@@ -7,6 +7,10 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdSetMaxVaults extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdSetMaxVaults() {
|
||||
this.aliases.add("setmaxvaults");
|
||||
this.aliases.add("smv");
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSethome extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdSethome() {
|
||||
this.aliases.add("sethome");
|
||||
this.optionalArgs.put("faction tag", "mine");
|
||||
|
||||
@@ -14,6 +14,10 @@ import java.util.List;
|
||||
|
||||
public class CmdShow extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
List<String> defaults = new ArrayList<>();
|
||||
|
||||
public CmdShow() {
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdShowClaims extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdShowClaims() {
|
||||
this.aliases.add("showclaims");
|
||||
this.aliases.add("showclaim");
|
||||
|
||||
@@ -10,6 +10,10 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdShowInvites extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdShowInvites() {
|
||||
super();
|
||||
aliases.add("showinvites");
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSpawnerLock extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdSpawnerLock(){
|
||||
super();
|
||||
this.aliases.add("lockspawners");
|
||||
|
||||
@@ -10,6 +10,10 @@ import java.util.ArrayList;
|
||||
|
||||
public class CmdStatus extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdStatus() {
|
||||
super();
|
||||
this.aliases.add("status");
|
||||
|
||||
@@ -4,6 +4,11 @@ import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdStealth extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdStealth() {
|
||||
this.aliases.add("ninja");
|
||||
this.aliases.add("stealth");
|
||||
|
||||
@@ -6,6 +6,9 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdStrikes extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdStrikesGive cmdStrikesGive = new CmdStrikesGive();
|
||||
public CmdStrikesInfo cmdStrikesInfo = new CmdStrikesInfo();
|
||||
|
||||
@@ -6,6 +6,9 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdStrikesGive extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdStrikesGive() {
|
||||
super();
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdStrikesInfo extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdStrikesInfo() {
|
||||
super();
|
||||
this.aliases.add("info");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdStrikesSet extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdStrikesSet() {
|
||||
super();
|
||||
this.aliases.add("set");
|
||||
|
||||
@@ -6,6 +6,9 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdStrikesTake extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdStrikesTake() {
|
||||
super();
|
||||
|
||||
@@ -13,6 +13,10 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class CmdStuck extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdStuck() {
|
||||
super();
|
||||
this.aliases.add("stuck");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.discord.Discord;
|
||||
import com.massivecraft.factions.event.FactionRenameEvent;
|
||||
import com.massivecraft.factions.scoreboards.FTeamWrapper;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -13,6 +14,10 @@ import java.util.ArrayList;
|
||||
|
||||
public class CmdTag extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdTag() {
|
||||
this.aliases.add("tag");
|
||||
this.aliases.add("rename");
|
||||
@@ -61,6 +66,7 @@ public class CmdTag extends FCommand {
|
||||
|
||||
String oldtag = context.faction.getTag();
|
||||
context.faction.setTag(tag);
|
||||
Discord.changeFactionTag(context.faction, oldtag);
|
||||
|
||||
// Inform
|
||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TextUtil;
|
||||
|
||||
public class CmdTitle extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdTitle() {
|
||||
this.aliases.add("title");
|
||||
this.requiredArgs.add("player name");
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdToggleAllianceChat extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdToggleAllianceChat() {
|
||||
super();
|
||||
this.aliases.add("tac");
|
||||
|
||||
@@ -12,6 +12,10 @@ import java.util.ArrayList;
|
||||
|
||||
public class CmdTop extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdTop() {
|
||||
super();
|
||||
this.aliases.add("top");
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdTpBanner extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdTpBanner() {
|
||||
super();
|
||||
this.aliases.add("tpbanner");
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdUnban extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdUnban() {
|
||||
super();
|
||||
this.aliases.add("unban");
|
||||
|
||||
@@ -6,6 +6,11 @@ import com.massivecraft.factions.zcore.fupgrades.FUpgradesGUI;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdUpgrades extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdUpgrades() {
|
||||
super();
|
||||
this.aliases.add("upgrades");
|
||||
@@ -21,7 +26,7 @@ public class CmdUpgrades extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fupgrades.Enabled")) {
|
||||
context.fPlayer.sendMessage("This command is disabled!");
|
||||
context.fPlayer.msg(TL.COMMAND_UPGRADES_DISABLED);
|
||||
return;
|
||||
}
|
||||
new FUpgradesGUI().openMainMenu(context.fPlayer);
|
||||
|
||||
@@ -13,6 +13,10 @@ import org.bukkit.inventory.Inventory;
|
||||
|
||||
public class CmdVault extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Illyria Team
|
||||
*/
|
||||
|
||||
public CmdVault() {
|
||||
this.aliases.add("vault");
|
||||
|
||||
@@ -28,7 +32,7 @@ public class CmdVault extends FCommand {
|
||||
public void perform(CommandContext context) {
|
||||
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fvault.Enabled")) {
|
||||
context.fPlayer.sendMessage("This command is disabled!");
|
||||
context.fPlayer.msg(TL.GENERIC_DISABLED, "Faction Vaults");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdVersion extends FCommand {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CmdVersion() {
|
||||
this.aliases.add("version");
|
||||
this.aliases.add("ver");
|
||||
|
||||
@@ -7,6 +7,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdViewChest extends FCommand {
|
||||
|
||||
/**
|
||||
* @author Driftay
|
||||
*/
|
||||
|
||||
public CmdViewChest() {
|
||||
super();
|
||||
this.aliases.add("viewchest");
|
||||
@@ -22,7 +26,7 @@ public class CmdViewChest extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("fchest.Enabled")) {
|
||||
context.msg(TL.GENERIC_DISABLED);
|
||||
context.msg(TL.GENERIC_DISABLED, "Faction Chests");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ import java.util.List;
|
||||
*/
|
||||
public class CommandContext {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
public CommandSender sender;
|
||||
|
||||
public Player player;
|
||||
|
||||
@@ -9,6 +9,10 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CommandRequirements {
|
||||
|
||||
/**
|
||||
* @author FactionsUUID Team
|
||||
*/
|
||||
|
||||
// Permission required to execute command
|
||||
public Permission permission;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user