Renamed Main Class of plugin from 'P' to 'SavageFactions', along with the plugin field from 'p' to 'plugin'
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.zcore.CommandVisibility;
|
||||
import com.massivecraft.factions.zcore.MCommand;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CmdAutoHelp extends MCommand<P> {
|
||||
public class CmdAutoHelp extends MCommand<SavageFactions> {
|
||||
|
||||
public CmdAutoHelp() {
|
||||
super(P.p);
|
||||
super(SavageFactions.plugin);
|
||||
this.aliases.add("?");
|
||||
this.aliases.add("h");
|
||||
this.aliases.add("help");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.event.FPlayerLeaveEvent;
|
||||
import com.massivecraft.factions.struct.BanInfo;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -80,7 +80,7 @@ public class CmdBan extends FCommand {
|
||||
|
||||
if (event.isCancelled()) {
|
||||
// if someone cancels a ban, we'll get people complaining here. So lets log it.
|
||||
P.p.log(Level.WARNING, "Attempted to ban {0} but someone cancelled the kick event. This isn't good.", target.getName());
|
||||
SavageFactions.plugin.log(Level.WARNING, "Attempted to ban {0} but someone cancelled the kick event. This isn't good.", target.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
@@ -31,31 +31,30 @@ public class CmdBanner extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fbanners.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fbanners.Enabled")) {
|
||||
msg(TL.COMMAND_BANNER_DISABLED);
|
||||
return;
|
||||
}
|
||||
if (!fme.hasMoney(P.p.getConfig().getInt("fbanners.Banner-Cost", 5000))) {
|
||||
if (! fme.hasMoney(SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000))) {
|
||||
msg(TL.COMMAND_BANNER_NOTENOUGHMONEY);
|
||||
return;
|
||||
}
|
||||
takeMoney(fme, P.p.getConfig().getInt("fbanners.Banner-Cost", 5000));
|
||||
takeMoney(fme, SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000));
|
||||
|
||||
//ItemStack warBanner = P.p.createItem(Material.BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore"));
|
||||
//ItemStack warBanner = SavageFactions.plugin.createItem(Material.BANNER, 1, (short) 1, SavageFactions.plugin.getConfig().getString("fbanners.Item.Name"), SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore"));
|
||||
//BannerMeta bannerMeta = (BannerMeta) warBanner.getItemMeta();
|
||||
ItemStack warBanner = fme.getFaction().getBanner();
|
||||
if (warBanner != null) {
|
||||
ItemMeta warmeta = warBanner.getItemMeta();
|
||||
warmeta.setDisplayName(P.p.color(P.p.getConfig().getString("fbanners.Item.Name")));
|
||||
warmeta.setLore(P.p.colorList(P.p.getConfig().getStringList("fbanners.Item.Lore")));
|
||||
warmeta.setDisplayName(SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fbanners.Item.Name")));
|
||||
warmeta.setLore(SavageFactions.plugin.colorList(SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore")));
|
||||
warBanner.setItemMeta(warmeta);
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
warBanner = P.p.createItem(P.p.BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore"));
|
||||
warBanner = SavageFactions.plugin.createItem(SavageFactions.plugin.BANNER, 1, (short) 1, SavageFactions.plugin.getConfig().getString("fbanners.Item.Name"), SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore"));
|
||||
}
|
||||
fme.msg(TL.COMMAND_BANNER_SUCCESS);
|
||||
warBanner.setAmount(1);
|
||||
@@ -64,7 +63,7 @@ public class CmdBanner extends FCommand {
|
||||
|
||||
|
||||
public boolean hasMoney(FPlayer fme, int amt) {
|
||||
Economy econ = P.p.getEcon();
|
||||
Economy econ = SavageFactions.plugin.getEcon();
|
||||
if (econ.getBalance(fme.getPlayer()) >= amt) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -75,7 +74,7 @@ public class CmdBanner extends FCommand {
|
||||
|
||||
public void takeMoney(FPlayer fme, int amt) {
|
||||
if (hasMoney(fme, amt)) {
|
||||
Economy econ = P.p.getEcon();
|
||||
Economy econ = SavageFactions.plugin.getEcon();
|
||||
econ.withdrawPlayer(fme.getPlayer(), amt);
|
||||
fme.sendMessage(TL.COMMAND_BANNER_MONEYTAKE.toString().replace("{amount}", amt + ""));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -30,10 +30,10 @@ public class CmdBypass extends FCommand {
|
||||
// TODO: Move this to a transient field in the model??
|
||||
if (fme.isAdminBypassing()) {
|
||||
fme.msg(TL.COMMAND_BYPASS_ENABLE.toString());
|
||||
P.p.log(fme.getName() + TL.COMMAND_BYPASS_ENABLELOG.toString());
|
||||
SavageFactions.plugin.log(fme.getName() + TL.COMMAND_BYPASS_ENABLELOG.toString());
|
||||
} else {
|
||||
fme.msg(TL.COMMAND_BYPASS_DISABLE.toString());
|
||||
P.p.log(fme.getName() + TL.COMMAND_BYPASS_DISABLELOG.toString());
|
||||
SavageFactions.plugin.log(fme.getName() + TL.COMMAND_BYPASS_DISABLELOG.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class CmdChat extends FCommand {
|
||||
} else if (modeString.startsWith("m") && !fme.getRole().isAtLeast(Role.MODERATOR)) {
|
||||
msg(TL.COMMAND_CHAT_MOD_ONLY);
|
||||
return;
|
||||
} else if (modeString.startsWith("p")) {
|
||||
} else if (modeString.startsWith("plugin")) {
|
||||
modeTarget = ChatMode.PUBLIC;
|
||||
} else if (modeString.startsWith("a")) {
|
||||
modeTarget = ChatMode.ALLIANCE;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -28,10 +28,10 @@ public class CmdChatSpy extends FCommand {
|
||||
|
||||
if (fme.isSpyingChat()) {
|
||||
fme.msg(TL.COMMAND_CHATSPY_ENABLE);
|
||||
P.p.log(fme.getName() + TL.COMMAND_CHATSPY_ENABLELOG.toString());
|
||||
SavageFactions.plugin.log(fme.getName() + TL.COMMAND_CHATSPY_ENABLELOG.toString());
|
||||
} else {
|
||||
fme.msg(TL.COMMAND_CHATSPY_DISABLE);
|
||||
P.p.log(fme.getName() + TL.COMMAND_CHATSPY_DISABLELOG.toString());
|
||||
SavageFactions.plugin.log(fme.getName() + TL.COMMAND_CHATSPY_DISABLELOG.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class CmdCheckpoint extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("checkpoints.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("checkpoints.Enabled")) {
|
||||
fme.msg(TL.COMMAND_CHECKPOINT_DISABLED);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
@@ -28,7 +28,7 @@ public class CmdChest extends FCommand {
|
||||
public void perform() {
|
||||
|
||||
|
||||
if (!P.p.getConfig().getBoolean("fchest.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fchest.Enabled")) {
|
||||
fme.sendMessage("This command is disabled!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -231,10 +231,10 @@ public class CmdConfig extends FCommand {
|
||||
if (!success.isEmpty()) {
|
||||
if (sender instanceof Player) {
|
||||
sendMessage(success);
|
||||
P.p.log(success + TL.COMMAND_CONFIG_LOG.format((Player) sender));
|
||||
} else // using P.p.log() instead of sendMessage if run from server console so that "[Factions v#.#.#]" is prepended in server log
|
||||
SavageFactions.plugin.log(success + TL.COMMAND_CONFIG_LOG.format((Player) sender));
|
||||
} else // using SavageFactions.plugin.log() instead of sendMessage if run from server console so that "[Factions v#.#.#]" is prepended in server log
|
||||
{
|
||||
P.p.log(success);
|
||||
SavageFactions.plugin.log(success);
|
||||
}
|
||||
}
|
||||
// save change to disk
|
||||
|
||||
@@ -98,9 +98,9 @@ public class CmdCreate extends FCommand {
|
||||
msg(TL.COMMAND_CREATE_YOUSHOULD, p.cmdBase.cmdDescription.getUseageTemplate());
|
||||
|
||||
if (Conf.logFactionCreate) {
|
||||
P.p.log(fme.getName() + TL.COMMAND_CREATE_CREATEDLOG.toString() + tag);
|
||||
SavageFactions.plugin.log(fme.getName() + TL.COMMAND_CREATE_CREATEDLOG.toString() + tag);
|
||||
}
|
||||
if (P.p.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
this.fme.msg(TL.COMMAND_PAYPALSET_CREATED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class CmdDelFWarp extends FCommand {
|
||||
}
|
||||
|
||||
private boolean transact(FPlayer player) {
|
||||
return !P.p.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(P.p.getConfig().getDouble("warp-cost.delwarp", 5), TL.COMMAND_DELFWARP_TODELETE.toString(), TL.COMMAND_DELFWARP_FORDELETE.toString());
|
||||
return ! SavageFactions.plugin.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(SavageFactions.plugin.getConfig().getDouble("warp-cost.delwarp", 5), TL.COMMAND_DELFWARP_TODELETE.toString(), TL.COMMAND_DELFWARP_FORDELETE.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
@@ -69,7 +69,7 @@ public class CmdDisband extends FCommand {
|
||||
if (!disbandMap.containsKey(me.getUniqueId().toString()) && faction.getTnt() > 0) {
|
||||
msg(TL.COMMAND_DISBAND_CONFIRM.toString().replace("{tnt}", faction.getTnt() + ""));
|
||||
disbandMap.put(me.getUniqueId().toString(), faction.getId());
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(P.p, new Runnable() {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(SavageFactions.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
disbandMap.remove(me.getUniqueId().toString());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.WarmUpUtil;
|
||||
@@ -82,7 +82,7 @@ public class CmdFWarp extends FCommand {
|
||||
}
|
||||
|
||||
private boolean transact(FPlayer player) {
|
||||
return !P.p.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(P.p.getConfig().getDouble("warp-cost.warp", 5), TL.COMMAND_FWARP_TOWARP.toString(), TL.COMMAND_FWARP_FORWARPING.toString());
|
||||
return ! SavageFactions.plugin.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(SavageFactions.plugin.getConfig().getDouble("warp-cost.warp", 5), TL.COMMAND_FWARP_TOWARP.toString(), TL.COMMAND_FWARP_FORWARPING.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,11 +39,11 @@ public class CmdFly extends FCommand {
|
||||
|
||||
public static void startParticles() {
|
||||
// Just a secondary check.
|
||||
if (!P.p.getConfig().getBoolean("ffly.Particles.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("ffly.Particles.Enabled")) {
|
||||
return;
|
||||
}
|
||||
|
||||
id = Bukkit.getScheduler().scheduleSyncRepeatingTask(P.p, new Runnable() {
|
||||
id = Bukkit.getScheduler().scheduleSyncRepeatingTask(SavageFactions.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (String name : flyMap.keySet()) {
|
||||
@@ -54,7 +54,7 @@ public class CmdFly extends FCommand {
|
||||
if (!player.isFlying()) {
|
||||
continue;
|
||||
}
|
||||
if (!P.p.mc17) {
|
||||
if (! SavageFactions.plugin.mc17) {
|
||||
if (player.getGameMode() == GameMode.SPECTATOR) {
|
||||
continue;
|
||||
}
|
||||
@@ -63,12 +63,12 @@ public class CmdFly extends FCommand {
|
||||
if (FPlayers.getInstance().getByPlayer(player).isVanished()) {
|
||||
// Actually, vanished players (such as admins) should not display particles to prevent others from knowing their vanished assistance for moderation.
|
||||
// But we can keep it as a config.
|
||||
if (P.p.getConfig().getBoolean("ffly.Particles.Enable-While-Vanished")) {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("ffly.Particles.Enable-While-Vanished")) {
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (P.p.useNonPacketParticles) {
|
||||
if (SavageFactions.plugin.useNonPacketParticles) {
|
||||
// 1.9+ based servers will use the built in particleAPI instead of packet based.
|
||||
// any particle amount higher than 0 made them go everywhere, and the offset at 0 was not working.
|
||||
// So setting the amount to 0 spawns 1 in the precise location
|
||||
@@ -87,7 +87,7 @@ public class CmdFly extends FCommand {
|
||||
}
|
||||
|
||||
public static void startFlyCheck() {
|
||||
flyid = Bukkit.getScheduler().scheduleSyncRepeatingTask(P.p, new Runnable() {
|
||||
flyid = Bukkit.getScheduler().scheduleSyncRepeatingTask(SavageFactions.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() throws ConcurrentModificationException { //threw the exception for now, until I recode fly :( Cringe.
|
||||
checkTaskState();
|
||||
@@ -185,7 +185,7 @@ public class CmdFly extends FCommand {
|
||||
@Override
|
||||
public void perform() {
|
||||
// Disabled by default.
|
||||
if (!P.p.getConfig().getBoolean("enable-faction-flight", false)) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("enable-faction-flight", false)) {
|
||||
fme.msg(TL.COMMAND_FLY_DISABLED);
|
||||
return;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public class CmdFly extends FCommand {
|
||||
fme.setFlying(true);
|
||||
flyMap.put(player.getName(), true);
|
||||
if (id == -1) {
|
||||
if (P.p.getConfig().getBoolean("ffly.Particles.Enabled")) {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("ffly.Particles.Enabled")) {
|
||||
startParticles();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Location;
|
||||
@@ -26,12 +26,12 @@ public class CmdGetVault extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fvault.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fvault.Enabled")) {
|
||||
fme.sendMessage("This command is disabled!");
|
||||
return;
|
||||
}
|
||||
Location vaultLocation = fme.getFaction().getVault();
|
||||
ItemStack vault = P.p.createItem(Material.CHEST, 1, (short) 0, P.p.color(P.p.getConfig().getString("fvault.Item.Name")), P.p.colorList(P.p.getConfig().getStringList("fvault.Item.Lore")));
|
||||
ItemStack vault = SavageFactions.plugin.createItem(Material.CHEST, 1, (short) 0, SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fvault.Item.Name")), SavageFactions.plugin.colorList(SavageFactions.plugin.getConfig().getStringList("fvault.Item.Lore")));
|
||||
|
||||
|
||||
//check if vault is set
|
||||
@@ -42,7 +42,7 @@ public class CmdGetVault extends FCommand {
|
||||
|
||||
|
||||
//has enough money?
|
||||
int amount = P.p.getConfig().getInt("fvault.Price");
|
||||
int amount = SavageFactions.plugin.getConfig().getInt("fvault.Price");
|
||||
if (!fme.hasMoney(amount)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
@@ -40,7 +40,7 @@ public class CmdHelp extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (P.p.getConfig().getBoolean("use-old-help", true)) {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("use-old-help", true)) {
|
||||
if (helpPages == null) {
|
||||
updateHelp();
|
||||
}
|
||||
@@ -57,9 +57,9 @@ public class CmdHelp extends FCommand {
|
||||
sendMessage(helpPages.get(page));
|
||||
return;
|
||||
}
|
||||
ConfigurationSection help = P.p.getConfig().getConfigurationSection("help");
|
||||
ConfigurationSection help = SavageFactions.plugin.getConfig().getConfigurationSection("help");
|
||||
if (help == null) {
|
||||
help = P.p.getConfig().createSection("help"); // create new help section
|
||||
help = SavageFactions.plugin.getConfig().createSection("help"); // create new help section
|
||||
List<String> error = new ArrayList<>();
|
||||
error.add("&cUpdate help messages in config.yml!");
|
||||
error.add("&cSet use-old-help for legacy help messages");
|
||||
@@ -72,7 +72,7 @@ public class CmdHelp extends FCommand {
|
||||
return;
|
||||
}
|
||||
for (String helpLine : page) {
|
||||
sendMessage(P.p.txt.parse(helpLine));
|
||||
sendMessage(SavageFactions.plugin.txt.parse(helpLine));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class CmdHelp extends FCommand {
|
||||
pageLines.add(p.cmdBase.cmdSafeunclaimall.getUseageTemplate(true));
|
||||
pageLines.add(p.cmdBase.cmdWarunclaimall.getUseageTemplate(true));
|
||||
//TODO:TL
|
||||
pageLines.add(p.txt.parse("<i>Note: " + p.cmdBase.cmdUnclaim.getUseageTemplate(false) + P.p.txt.parse("<i>") + " works on safe/war zones as well."));
|
||||
pageLines.add(p.txt.parse("<i>Note: " + p.cmdBase.cmdUnclaim.getUseageTemplate(false) + SavageFactions.plugin.txt.parse("<i>") + " works on safe/war zones as well."));
|
||||
pageLines.add(p.cmdBase.cmdPeaceful.getUseageTemplate(true));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
|
||||
@@ -112,9 +112,9 @@ public class CmdJoin extends FCommand {
|
||||
|
||||
if (Conf.logFactionJoin) {
|
||||
if (samePlayer) {
|
||||
P.p.log(TL.COMMAND_JOIN_JOINEDLOG.toString(), fplayer.getName(), faction.getTag());
|
||||
SavageFactions.plugin.log(TL.COMMAND_JOIN_JOINEDLOG.toString(), fplayer.getName(), faction.getTag());
|
||||
} else {
|
||||
P.p.log(TL.COMMAND_JOIN_MOVEDLOG.toString(), fme.getName(), fplayer.getName(), faction.getTag());
|
||||
SavageFactions.plugin.log(TL.COMMAND_JOIN_MOVEDLOG.toString(), fme.getName(), fplayer.getName(), faction.getTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.event.FPlayerLeaveEvent;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
@@ -122,7 +122,7 @@ public class CmdKick extends FCommand {
|
||||
fme.msg(TL.COMMAND_KICK_KICKS, toKick.describeTo(fme), toKickFaction.describeTo(fme));
|
||||
}
|
||||
if (Conf.logFactionKick) {
|
||||
P.p.log((senderIsConsole ? "A console command" : fme.getName()) + " kicked " + toKick.getName() + " from the faction: " + toKickFaction.getTag());
|
||||
SavageFactions.plugin.log((senderIsConsole ? "A console command" : fme.getName()) + " kicked " + toKick.getName() + " from the faction: " + toKickFaction.getTag());
|
||||
}
|
||||
if (toKick.getRole() == Role.LEADER) {
|
||||
toKickFaction.promoteNewLeader();
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagUtil;
|
||||
@@ -52,7 +52,7 @@ public class CmdList extends FCommand {
|
||||
|
||||
// remove exempt factions
|
||||
if (!fme.getPlayer().hasPermission("factions.show.bypassexempt")) {
|
||||
List<String> exemptFactions = P.p.getConfig().getStringList("show-exempt");
|
||||
List<String> exemptFactions = SavageFactions.plugin.getConfig().getStringList("show-exempt");
|
||||
Iterator<Faction> factionIterator = factionList.iterator();
|
||||
while (factionIterator.hasNext()) {
|
||||
Faction next = factionIterator.next();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdMoney extends FCommand {
|
||||
@@ -40,7 +40,7 @@ public class CmdMoney extends FCommand {
|
||||
@Override
|
||||
public void perform() {
|
||||
this.commandChain.add(this);
|
||||
P.p.cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
|
||||
SavageFactions.plugin.cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -38,7 +38,7 @@ public class CmdMoneyDeposit extends FCommand {
|
||||
boolean success = Econ.transferMoney(fme, fme, faction, amount);
|
||||
|
||||
if (success && Conf.logMoneyTransactions) {
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYDEPOSIT_DEPOSITED.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
SavageFactions.plugin.log(ChatColor.stripColor(SavageFactions.plugin.txt.parse(TL.COMMAND_MONEYDEPOSIT_DEPOSITED.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -46,7 +46,7 @@ public class CmdMoneyTransferFf extends FCommand {
|
||||
|
||||
if (success && Conf.logMoneyTransactions) {
|
||||
String name = sender instanceof Player ? fme.getName() : sender.getName();
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFF_TRANSFER.toString(), name, Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
SavageFactions.plugin.log(ChatColor.stripColor(SavageFactions.plugin.txt.parse(TL.COMMAND_MONEYTRANSFERFF_TRANSFER.toString(), name, Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -44,7 +44,7 @@ public class CmdMoneyTransferFp extends FCommand {
|
||||
boolean success = Econ.transferMoney(fme, from, to, amount);
|
||||
|
||||
if (success && Conf.logMoneyTransactions) {
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERFP_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
SavageFactions.plugin.log(ChatColor.stripColor(SavageFactions.plugin.txt.parse(TL.COMMAND_MONEYTRANSFERFP_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -44,7 +44,7 @@ public class CmdMoneyTransferPf extends FCommand {
|
||||
boolean success = Econ.transferMoney(fme, from, to, amount);
|
||||
|
||||
if (success && Conf.logMoneyTransactions) {
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYTRANSFERPF_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
SavageFactions.plugin.log(ChatColor.stripColor(SavageFactions.plugin.txt.parse(TL.COMMAND_MONEYTRANSFERPF_TRANSFER.toString(), fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -47,7 +47,7 @@ public class CmdMoneyWithdraw extends FCommand {
|
||||
boolean success = Econ.transferMoney(fme, faction, fme, amount);
|
||||
|
||||
if (success && Conf.logMoneyTransactions) {
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse(TL.COMMAND_MONEYWITHDRAW_WITHDRAW.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
SavageFactions.plugin.log(ChatColor.stripColor(SavageFactions.plugin.txt.parse(TL.COMMAND_MONEYWITHDRAW_WITHDRAW.toString(), fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -25,12 +25,12 @@ public class CmdNear extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fnear.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fnear.Enabled")) {
|
||||
fme.msg(TL.COMMAND_NEAR_DISABLED_MSG);
|
||||
return;
|
||||
}
|
||||
|
||||
double range = P.p.getConfig().getInt("fnear.Radius");
|
||||
double range = SavageFactions.plugin.getConfig().getInt("fnear.Radius");
|
||||
String format = TL.COMMAND_NEAR_FORMAT.toString();
|
||||
fme.msg(TL.COMMAND_NEAR_USE_MSG);
|
||||
for (Entity e : me.getNearbyEntities(range, 255, range)) {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdPaypalSee extends FCommand{
|
||||
public CmdPaypalSee() {
|
||||
@@ -21,7 +20,7 @@ public class CmdPaypalSee extends FCommand{
|
||||
}
|
||||
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
fme.msg(TL.GENERIC_DISABLED);
|
||||
} else {
|
||||
Faction faction = argAsFaction(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CmdPaypalSet extends FCommand{
|
||||
}
|
||||
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
fme.msg(TL.GENERIC_DISABLED);
|
||||
} else {
|
||||
String paypal = argAsString(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
@@ -104,7 +104,7 @@ public class CmdPerm extends FCommand {
|
||||
}
|
||||
|
||||
fme.msg(TL.COMMAND_PERM_SET, argAsString(1), access.name(), argAsString(0));
|
||||
P.p.log(String.format(TL.COMMAND_PERM_SET.toString(), argAsString(1), access.name(), argAsString(0)) + " for faction " + fme.getTag());
|
||||
SavageFactions.plugin.log(String.format(TL.COMMAND_PERM_SET.toString(), argAsString(1), access.name(), argAsString(0)) + " for faction " + fme.getTag());
|
||||
}
|
||||
|
||||
private Permissable getPermissable(String name) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class CmdPermanent extends FCommand {
|
||||
faction.setPermanent(true);
|
||||
}
|
||||
|
||||
P.p.log((fme == null ? "A server admin" : fme.getName()) + " " + change + " the faction \"" + faction.getTag() + "\".");
|
||||
SavageFactions.plugin.log((fme == null ? "A server admin" : fme.getName()) + " " + change + " the faction \"" + faction.getTag() + "\".");
|
||||
|
||||
// Inform all players
|
||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -12,7 +12,7 @@ public class CmdPowerBoost extends FCommand {
|
||||
super();
|
||||
this.aliases.add("powerboost");
|
||||
|
||||
this.requiredArgs.add("p|f|player|faction");
|
||||
this.requiredArgs.add("plugin|f|player|faction");
|
||||
this.requiredArgs.add("name");
|
||||
this.requiredArgs.add("# or reset");
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CmdPowerBoost extends FCommand {
|
||||
boolean doPlayer = true;
|
||||
if (type.equals("f") || type.equals("faction")) {
|
||||
doPlayer = false;
|
||||
} else if (!type.equals("p") && !type.equals("player")) {
|
||||
} else if (! type.equals("plugin") && ! type.equals("player")) {
|
||||
msg(TL.COMMAND_POWERBOOST_HELP_1);
|
||||
msg(TL.COMMAND_POWERBOOST_HELP_2);
|
||||
return;
|
||||
@@ -77,7 +77,7 @@ public class CmdPowerBoost extends FCommand {
|
||||
int roundedPower = (int) Math.round(targetPower);
|
||||
msg(TL.COMMAND_POWERBOOST_BOOST, target, roundedPower);
|
||||
if (!senderIsConsole) {
|
||||
P.p.log(TL.COMMAND_POWERBOOST_BOOSTLOG.toString(), fme.getName(), target, roundedPower);
|
||||
SavageFactions.plugin.log(TL.COMMAND_POWERBOOST_BOOSTLOG.toString(), fme.getName(), target, roundedPower);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.Particles.ReflectionUtils;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
@@ -26,13 +26,13 @@ public class CmdReload extends FCommand {
|
||||
public void perform() {
|
||||
long timeInitStart = System.currentTimeMillis();
|
||||
Conf.load();
|
||||
P.p.reloadConfig();
|
||||
P.p.loadLang();
|
||||
SavageFactions.plugin.reloadConfig();
|
||||
SavageFactions.plugin.loadLang();
|
||||
int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);
|
||||
|
||||
|
||||
if (P.p.getConfig().getBoolean("enable-faction-flight")) {
|
||||
P.p.factionsFlight = true;
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("enable-faction-flight")) {
|
||||
SavageFactions.plugin.factionsFlight = true;
|
||||
}
|
||||
long timeReload = (System.currentTimeMillis() - timeInitStart);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -28,19 +28,19 @@ public class CmdRules extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("frules.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("frules.Enabled")) {
|
||||
fme.msg(TL.COMMAND_RULES_DISABLED_MSG);
|
||||
return;
|
||||
}
|
||||
if (this.args.size() == 0) {
|
||||
HashMap<Integer, String> rules = fme.getFaction().getRulesMap();
|
||||
if (rules.size() == 0) {
|
||||
List<String> ruleList = P.p.getConfig().getStringList("frules.default-rules");
|
||||
fme.sendMessage(P.p.colorList(ruleList));
|
||||
List<String> ruleList = SavageFactions.plugin.getConfig().getStringList("frules.default-rules");
|
||||
fme.sendMessage(SavageFactions.plugin.colorList(ruleList));
|
||||
|
||||
} else {
|
||||
for (int i = 0; i <= rules.size() - 1; i++) {
|
||||
fme.sendMessage(P.p.color(rules.get(i)));
|
||||
fme.sendMessage(SavageFactions.plugin.color(rules.get(i)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -49,7 +49,7 @@ public class CmdSafeunclaimall extends FCommand {
|
||||
msg(TL.COMMAND_SAFEUNCLAIMALL_UNCLAIMED);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_SAFEUNCLAIMALL_UNCLAIMEDLOG.format(sender.getName()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_SAFEUNCLAIMALL_UNCLAIMEDLOG.format(sender.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.Particles.ParticleEffect;
|
||||
import com.massivecraft.factions.util.VisualizeUtil;
|
||||
@@ -42,7 +42,7 @@ public class CmdSeeChunk extends FCommand {
|
||||
senderMustBeAdmin = false;
|
||||
|
||||
this.useParticles = p.getConfig().getBoolean("see-chunk.particles", true);
|
||||
interval = P.p.getConfig().getLong("see-chunk.interval", 10L);
|
||||
interval = SavageFactions.plugin.getConfig().getLong("see-chunk.interval", 10L);
|
||||
if (effect == null) {
|
||||
effect = ParticleEffect.REDSTONE;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class CmdSeeChunk extends FCommand {
|
||||
}
|
||||
|
||||
private void startTask() {
|
||||
taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(P.p, new Runnable() {
|
||||
taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(SavageFactions.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Iterator itr = seeChunkMap.keySet().iterator();
|
||||
@@ -123,10 +123,10 @@ public class CmdSeeChunk extends FCommand {
|
||||
continue;
|
||||
}
|
||||
if (useParticles) {
|
||||
if (P.p.useNonPacketParticles) {
|
||||
if (SavageFactions.plugin.useNonPacketParticles) {
|
||||
// Dust options only exists in the 1.13 API, so we use an
|
||||
// alternative method to achieve this in lower versions.
|
||||
if (P.p.mc113) {
|
||||
if (SavageFactions.plugin.mc113) {
|
||||
player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1));
|
||||
} else {
|
||||
player.getWorld().spawnParticle(Particle.REDSTONE, loc, 0, 255, 0, 0, 1);
|
||||
@@ -138,7 +138,7 @@ public class CmdSeeChunk extends FCommand {
|
||||
|
||||
|
||||
} else {
|
||||
Material type = blockY % 5 == 0 ? P.p.REDSTONE_LAMP_ON : P.p.STAINED_GLASS;
|
||||
Material type = blockY % 5 == 0 ? SavageFactions.plugin.REDSTONE_LAMP_ON : SavageFactions.plugin.STAINED_GLASS;
|
||||
VisualizeUtil.addLocation(player, loc, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
@@ -46,7 +46,7 @@ public class CmdSetFWarp extends FCommand {
|
||||
}
|
||||
|
||||
|
||||
int maxWarps = P.p.getConfig().getInt("max-warps", 5);
|
||||
int maxWarps = SavageFactions.plugin.getConfig().getInt("max-warps", 5);
|
||||
if (maxWarps <= myFaction.getWarps().size()) {
|
||||
fme.msg(TL.COMMAND_SETFWARP_LIMIT, maxWarps);
|
||||
return;
|
||||
@@ -68,7 +68,7 @@ public class CmdSetFWarp extends FCommand {
|
||||
}
|
||||
|
||||
private boolean transact(FPlayer player) {
|
||||
return !P.p.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(P.p.getConfig().getDouble("warp-cost.setwarp", 5), TL.COMMAND_SETFWARP_TOSET.toString(), TL.COMMAND_SETFWARP_FORSET.toString());
|
||||
return ! SavageFactions.plugin.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(SavageFactions.plugin.getConfig().getDouble("warp-cost.setwarp", 5), TL.COMMAND_SETFWARP_TOSET.toString(), TL.COMMAND_SETFWARP_FORSET.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import com.massivecraft.factions.zcore.util.TagReplacer;
|
||||
@@ -55,7 +55,7 @@ public class CmdShow extends FCommand {
|
||||
}
|
||||
|
||||
if (fme != null && !fme.getPlayer().hasPermission("factions.show.bypassexempt")
|
||||
&& P.p.getConfig().getStringList("show-exempt").contains(faction.getTag())) {
|
||||
&& SavageFactions.plugin.getConfig().getStringList("show-exempt").contains(faction.getTag())) {
|
||||
msg(TL.COMMAND_SHOW_EXEMPT);
|
||||
return;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class CmdShow extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> show = P.p.getConfig().getStringList("show");
|
||||
List<String> show = SavageFactions.plugin.getConfig().getStringList("show");
|
||||
if (show == null || show.isEmpty()) {
|
||||
show = defaults;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class CmdStealth extends FCommand {
|
||||
public CmdStealth() {
|
||||
|
||||
@@ -34,11 +34,11 @@ public class CmdStuck extends FCommand {
|
||||
final Player player = fme.getPlayer();
|
||||
final Location sentAt = player.getLocation();
|
||||
final FLocation chunk = fme.getLastStoodAt();
|
||||
final long delay = P.p.getConfig().getLong("hcf.stuck.delay", 30);
|
||||
final int radius = P.p.getConfig().getInt("hcf.stuck.radius", 10);
|
||||
final long delay = SavageFactions.plugin.getConfig().getLong("hcf.stuck.delay", 30);
|
||||
final int radius = SavageFactions.plugin.getConfig().getInt("hcf.stuck.radius", 10);
|
||||
|
||||
if (P.p.getStuckMap().containsKey(player.getUniqueId())) {
|
||||
long wait = P.p.getTimers().get(player.getUniqueId()) - System.currentTimeMillis();
|
||||
if (SavageFactions.plugin.getStuckMap().containsKey(player.getUniqueId())) {
|
||||
long wait = SavageFactions.plugin.getTimers().get(player.getUniqueId()) - System.currentTimeMillis();
|
||||
String time = DurationFormatUtils.formatDuration(wait, TL.COMMAND_STUCK_TIMEFORMAT.toString(), true);
|
||||
msg(TL.COMMAND_STUCK_EXISTS, time);
|
||||
} else {
|
||||
@@ -48,11 +48,11 @@ public class CmdStuck extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
final int id = Bukkit.getScheduler().runTaskLater(P.p, new BukkitRunnable() {
|
||||
final int id = Bukkit.getScheduler().runTaskLater(SavageFactions.plugin, new BukkitRunnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!P.p.getStuckMap().containsKey(player.getUniqueId())) {
|
||||
if (! SavageFactions.plugin.getStuckMap().containsKey(player.getUniqueId())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ public class CmdStuck extends FCommand {
|
||||
final World world = chunk.getWorld();
|
||||
if (world.getUID() != player.getWorld().getUID() || sentAt.distance(player.getLocation()) > radius) {
|
||||
msg(TL.COMMAND_STUCK_OUTSIDE.format(radius));
|
||||
P.p.getTimers().remove(player.getUniqueId());
|
||||
P.p.getStuckMap().remove(player.getUniqueId());
|
||||
SavageFactions.plugin.getTimers().remove(player.getUniqueId());
|
||||
SavageFactions.plugin.getStuckMap().remove(player.getUniqueId());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -73,18 +73,18 @@ public class CmdStuck extends FCommand {
|
||||
public boolean work() {
|
||||
FLocation chunk = currentFLocation();
|
||||
Faction faction = board.getFactionAt(chunk);
|
||||
int buffer = P.p.getConfig().getInt("world-border.buffer", 0);
|
||||
int buffer = SavageFactions.plugin.getConfig().getInt("world-border.buffer", 0);
|
||||
if (faction.isWilderness() && !chunk.isOutsideWorldBorder(buffer)) {
|
||||
int cx = FLocation.chunkToBlock((int) chunk.getX());
|
||||
int cz = FLocation.chunkToBlock((int) chunk.getZ());
|
||||
int y = world.getHighestBlockYAt(cx, cz);
|
||||
Location tp = new Location(world, cx, y, cz);
|
||||
msg(TL.COMMAND_STUCK_TELEPORT, tp.getBlockX(), tp.getBlockY(), tp.getBlockZ());
|
||||
P.p.getTimers().remove(player.getUniqueId());
|
||||
P.p.getStuckMap().remove(player.getUniqueId());
|
||||
SavageFactions.plugin.getTimers().remove(player.getUniqueId());
|
||||
SavageFactions.plugin.getStuckMap().remove(player.getUniqueId());
|
||||
if (!Essentials.handleTeleport(player, tp)) {
|
||||
player.teleport(tp);
|
||||
P.p.debug("/f stuck used regular teleport, not essentials!");
|
||||
SavageFactions.plugin.debug("/f stuck used regular teleport, not essentials!");
|
||||
}
|
||||
this.stop();
|
||||
return false;
|
||||
@@ -95,11 +95,11 @@ public class CmdStuck extends FCommand {
|
||||
}
|
||||
}, delay * 20).getTaskId();
|
||||
|
||||
P.p.getTimers().put(player.getUniqueId(), System.currentTimeMillis() + (delay * 1000));
|
||||
long wait = P.p.getTimers().get(player.getUniqueId()) - System.currentTimeMillis();
|
||||
SavageFactions.plugin.getTimers().put(player.getUniqueId(), System.currentTimeMillis() + (delay * 1000));
|
||||
long wait = SavageFactions.plugin.getTimers().get(player.getUniqueId()) - System.currentTimeMillis();
|
||||
String time = DurationFormatUtils.formatDuration(wait, TL.COMMAND_STUCK_TIMEFORMAT.toString(), true);
|
||||
msg(TL.COMMAND_STUCK_START, time);
|
||||
P.p.getStuckMap().put(player.getUniqueId(), id);
|
||||
SavageFactions.plugin.getStuckMap().put(player.getUniqueId(), id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
@@ -31,7 +31,7 @@ public class CmdTnt extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("ftnt.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("ftnt.Enabled")) {
|
||||
fme.msg(TL.COMMAND_TNT_DISABLED_MSG);
|
||||
return;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class CmdTnt extends FCommand {
|
||||
return;
|
||||
}
|
||||
ItemStack tnt = new ItemStack(Material.TNT, amount);
|
||||
if (fme.getFaction().getTnt() + amount > P.p.getConfig().getInt("ftnt.Bank-Limit")) {
|
||||
if (fme.getFaction().getTnt() + amount > SavageFactions.plugin.getConfig().getInt("ftnt.Bank-Limit")) {
|
||||
msg(TL.COMMAND_TNT_EXCEEDLIMIT);
|
||||
return;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class CmdTnt extends FCommand {
|
||||
|
||||
fme.getFaction().addTnt(amount);
|
||||
fme.msg(TL.COMMAND_TNT_DEPOSIT_SUCCESS);
|
||||
fme.sendMessage(P.p.color(TL.COMMAND_TNT_AMOUNT.toString().replace("{amount}", fme.getFaction().getTnt() + "")));
|
||||
fme.sendMessage(SavageFactions.plugin.color(TL.COMMAND_TNT_AMOUNT.toString().replace("{amount}", fme.getFaction().getTnt() + "")));
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
@@ -46,12 +46,12 @@ public class CmdTntFill extends FCommand {
|
||||
msg(TL.COMMAND_TNTFILL_HEADER);
|
||||
int radius = argAsInt(0, 16);
|
||||
int amount = argAsInt(1, 16);
|
||||
if (radius > P.p.getConfig().getInt("Tntfill.max-radius")) {
|
||||
msg(TL.COMMAND_TNTFILL_RADIUSMAX.toString().replace("{max}", P.p.getConfig().getInt("Tntfill.max-radius") + ""));
|
||||
if (radius > SavageFactions.plugin.getConfig().getInt("Tntfill.max-radius")) {
|
||||
msg(TL.COMMAND_TNTFILL_RADIUSMAX.toString().replace("{max}", SavageFactions.plugin.getConfig().getInt("Tntfill.max-radius") + ""));
|
||||
return;
|
||||
}
|
||||
if (amount > P.p.getConfig().getInt("Tntfill.max-amount")) {
|
||||
msg(TL.COMMAND_TNTFILL_AMOUNTMAX.toString().replace("{max}", P.p.getConfig().getInt("Tntfill.max-amount") + ""));
|
||||
if (amount > SavageFactions.plugin.getConfig().getInt("Tntfill.max-amount")) {
|
||||
msg(TL.COMMAND_TNTFILL_AMOUNTMAX.toString().replace("{max}", SavageFactions.plugin.getConfig().getInt("Tntfill.max-amount") + ""));
|
||||
return;
|
||||
}
|
||||
int testNumber = -1;
|
||||
@@ -177,7 +177,7 @@ public class CmdTntFill extends FCommand {
|
||||
return;
|
||||
}
|
||||
ItemStack tnt = new ItemStack(Material.TNT, amount);
|
||||
if (fme.getFaction().getTnt() + amount > P.p.getConfig().getInt("ftnt.Bank-Limit")) {
|
||||
if (fme.getFaction().getTnt() + amount > SavageFactions.plugin.getConfig().getInt("ftnt.Bank-Limit")) {
|
||||
msg(TL.COMMAND_TNT_EXCEEDLIMIT);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.listeners.FactionsPlayerListener;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.util.WarmUpUtil;
|
||||
@@ -24,12 +24,12 @@ public class CmdTpBanner extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fbanners.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fbanners.Enabled")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final FactionsPlayerListener fpl = new FactionsPlayerListener(P.p);
|
||||
final FactionsPlayerListener fpl = new FactionsPlayerListener(SavageFactions.plugin);
|
||||
|
||||
if (FactionsPlayerListener.bannerLocations.containsKey(fme.getTag())) {
|
||||
fme.msg(TL.COMMAND_TPBANNER_SUCCESS);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class CmdUnclaim extends FCommand {
|
||||
msg(TL.COMMAND_UNCLAIM_SAFEZONE_SUCCESS);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -99,7 +99,7 @@ public class CmdUnclaim extends FCommand {
|
||||
msg(TL.COMMAND_UNCLAIM_WARZONE_SUCCESS);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -121,7 +121,7 @@ public class CmdUnclaim extends FCommand {
|
||||
msg(TL.COMMAND_UNCLAIM_UNCLAIMS);
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -172,7 +172,7 @@ public class CmdUnclaim extends FCommand {
|
||||
myFaction.msg(TL.COMMAND_UNCLAIM_FACTIONUNCLAIMED, fme.describeTo(myFaction, true));
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_UNCLAIM_LOG.format(fme.getName(), target.getCoordString(), targetFaction.getTag()));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.event.LandUnclaimAllEvent;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@@ -52,7 +52,7 @@ public class CmdUnclaimall extends FCommand {
|
||||
myFaction.msg(TL.COMMAND_UNCLAIMALL_UNCLAIMED, fme.describeTo(myFaction, true));
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_UNCLAIMALL_LOG.format(fme.getName(), myFaction.getTag()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_UNCLAIMALL_LOG.format(fme.getName(), myFaction.getTag()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.fupgrades.FUpgradesGUI;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
@@ -25,7 +25,7 @@ public class CmdUpgrades extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!P.p.getConfig().getBoolean("fupgrades.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fupgrades.Enabled")) {
|
||||
fme.sendMessage("This command is disabled!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.fperms.Access;
|
||||
import com.massivecraft.factions.zcore.fperms.PermissableAction;
|
||||
@@ -32,7 +32,7 @@ public class CmdVault extends FCommand {
|
||||
@Override
|
||||
public void perform() {
|
||||
|
||||
if (!P.p.getConfig().getBoolean("fvault.Enabled")) {
|
||||
if (! SavageFactions.plugin.getConfig().getBoolean("fvault.Enabled")) {
|
||||
fme.sendMessage("This command is disabled!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class CmdVersion extends FCommand {
|
||||
@Override
|
||||
public void perform() {
|
||||
msg(TL.COMMAND_VERSION_NAME); // Did this so people can differentiate between SavageFactions and FactionsUUID (( Requested Feature ))
|
||||
msg(TL.COMMAND_VERSION_VERSION, P.p.getDescription().getFullName());
|
||||
msg(TL.COMMAND_VERSION_VERSION, SavageFactions.plugin.getDescription().getFullName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -48,7 +48,7 @@ public class CmdWarunclaimall extends FCommand {
|
||||
|
||||
|
||||
if (Conf.logLandUnclaims) {
|
||||
P.p.log(TL.COMMAND_WARUNCLAIMALL_LOG.format(fme.getName()));
|
||||
SavageFactions.plugin.log(TL.COMMAND_WARUNCLAIMALL_LOG.format(fme.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
@@ -124,7 +124,7 @@ public class FCmdRoot extends FCommand {
|
||||
this.setHelpShort("The faction base command");
|
||||
this.helpLong.add(p.txt.parseTags("<i>This command contains all faction stuff."));
|
||||
|
||||
//this.subCommands.add(p.cmdHelp);
|
||||
//this.subCommands.add(plugin.cmdHelp);
|
||||
|
||||
this.addSubCommand(this.cmdAdmin);
|
||||
this.addSubCommand(this.cmdAutoClaim);
|
||||
@@ -218,22 +218,22 @@ public class FCmdRoot extends FCommand {
|
||||
|
||||
|
||||
if (Bukkit.getServer().getPluginManager().getPlugin("CoreProtect") != null) {
|
||||
P.p.log("Found CoreProtect, enabling Inspect");
|
||||
SavageFactions.plugin.log("Found CoreProtect, enabling Inspect");
|
||||
this.addSubCommand(this.cmdInspect);
|
||||
} else {
|
||||
P.p.log("CoreProtect not found, disabling Inspect");
|
||||
SavageFactions.plugin.log("CoreProtect not found, disabling Inspect");
|
||||
}
|
||||
|
||||
if (P.p.getConfig().getBoolean("enable-faction-flight", false)) {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("enable-faction-flight", false)) {
|
||||
this.addSubCommand(this.cmdFly);
|
||||
}
|
||||
if (Bukkit.getServer().getPluginManager().isPluginEnabled("FactionsTop")) {
|
||||
P.p.log(Level.INFO, "Found FactionsTop plugin. Disabling our own /f top command.");
|
||||
SavageFactions.plugin.log(Level.INFO, "Found FactionsTop plugin. Disabling our own /f top command.");
|
||||
} else {
|
||||
P.p.log(Level.INFO, "Enabling FactionsTop command, this is a very basic /f top please get a dedicated /f top resource if you want land calculation etc.");
|
||||
SavageFactions.plugin.log(Level.INFO, "Enabling FactionsTop command, this is a very basic /f top please get a dedicated /f top resource if you want land calculation etc.");
|
||||
this.addSubCommand(this.cmdTop);
|
||||
}
|
||||
if (P.p.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
this.addSubCommand(this.cmdPaypalSet);
|
||||
this.addSubCommand(this.cmdPaypalSee);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public abstract class FCommand extends MCommand<P> {
|
||||
public abstract class FCommand extends MCommand<SavageFactions> {
|
||||
|
||||
public SimpleDateFormat sdf = new SimpleDateFormat(TL.DATE_FORMAT.toString());
|
||||
|
||||
@@ -29,7 +29,7 @@ public abstract class FCommand extends MCommand<P> {
|
||||
public boolean isMoneyCommand;
|
||||
|
||||
public FCommand() {
|
||||
super(P.p);
|
||||
super(SavageFactions.plugin);
|
||||
|
||||
// Due to safety reasons it defaults to disable on lock.
|
||||
disableOnLock = true;
|
||||
@@ -160,7 +160,7 @@ public abstract class FCommand extends MCommand<P> {
|
||||
}
|
||||
|
||||
if (msg && ret == null) {
|
||||
this.msg("<b>No player \"<p>%s<b>\" could be found.", name);
|
||||
this.msg("<b>No player \"<plugin>%s<b>\" could be found.", name);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -233,7 +233,7 @@ public abstract class FCommand extends MCommand<P> {
|
||||
}
|
||||
|
||||
if (msg && ret == null) {
|
||||
this.msg("<b>The faction or player \"<p>%s<b>\" could not be found.", name);
|
||||
this.msg("<b>The faction or player \"<plugin>%s<b>\" could not be found.", name);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.SavageFactions;
|
||||
import com.massivecraft.factions.event.FactionRelationEvent;
|
||||
import com.massivecraft.factions.event.FactionRelationWishEvent;
|
||||
import com.massivecraft.factions.scoreboards.FTeamWrapper;
|
||||
@@ -103,8 +103,8 @@ public abstract class FRelationCommand extends FCommand {
|
||||
}
|
||||
|
||||
private boolean hasMaxRelations(Faction them, Relation targetRelation) {
|
||||
int max = P.p.getConfig().getInt("max-relations." + targetRelation.toString(), -1);
|
||||
if (P.p.getConfig().getBoolean("max-relations.enabled", false)) {
|
||||
int max = SavageFactions.plugin.getConfig().getInt("max-relations." + targetRelation.toString(), - 1);
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("max-relations.enabled", false)) {
|
||||
if (max != -1) {
|
||||
if (myFaction.getRelationCount(targetRelation) >= max) {
|
||||
msg(TL.COMMAND_RELATIONS_EXCEEDS_ME, max, targetRelation.getPluralTranslation());
|
||||
|
||||
Reference in New Issue
Block a user