In progress: Using MassiveCraftCore and Allman indentation style and minor refactoring.
This commit is contained in:
@@ -12,7 +12,7 @@ import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.TextUtil;
|
||||
|
||||
@@ -99,7 +99,7 @@ public class FBaseCommand {
|
||||
// make sure player doesn't have their access to the command revoked
|
||||
Iterator<String> iter = aliases.iterator();
|
||||
while (iter.hasNext()) {
|
||||
if (Factions.isCommandDisabled(sender, iter.next())) {
|
||||
if (P.isCommandDisabled(sender, iter.next())) {
|
||||
sendMessage("You lack the permissions to "+this.helpDescription.toLowerCase()+".");
|
||||
return false;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class FBaseCommand {
|
||||
}
|
||||
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermParticipate(sender);
|
||||
return P.hasPermParticipate(sender);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
@@ -126,7 +126,7 @@ public class FBaseCommand {
|
||||
|
||||
ret += Conf.colorCommand;
|
||||
|
||||
ret += Factions.instance.getBaseCommand()+ " " +TextUtil.implode(this.getAliases(), ",")+" ";
|
||||
ret += P.p.getBaseCommand()+ " " +TextUtil.implode(this.getAliases(), ",")+" ";
|
||||
|
||||
List<String> parts = new ArrayList<String>();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandAutoSafeclaim extends FBaseCommand {
|
||||
|
||||
@@ -19,7 +19,7 @@ public class FCommandAutoSafeclaim extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermManageSafeZone(sender);
|
||||
return P.hasPermManageSafeZone(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandAutoWarclaim extends FBaseCommand {
|
||||
|
||||
@@ -19,7 +19,7 @@ public class FCommandAutoWarclaim extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermManageWarZone(sender);
|
||||
return P.hasPermManageWarZone(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
|
||||
public class FCommandBalance extends FBaseCommand {
|
||||
@@ -30,7 +30,7 @@ public class FCommandBalance extends FBaseCommand {
|
||||
Faction faction;
|
||||
|
||||
if (parameters.size() > 0) {
|
||||
if (!Factions.hasPermViewAnyFactionBalance(sender)) {
|
||||
if (!P.hasPermViewAnyFactionBalance(sender)) {
|
||||
sendMessage("You do not have sufficient permissions to view the bank balance of other factions.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
|
||||
public class FCommandBypass extends FBaseCommand {
|
||||
@@ -16,7 +16,7 @@ public class FCommandBypass extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermAdminBypass(sender);
|
||||
return P.hasPermAdminBypass(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -24,11 +24,11 @@ public class FCommandBypass extends FBaseCommand {
|
||||
if ( ! Conf.adminBypassPlayers.contains(player.getName())) {
|
||||
Conf.adminBypassPlayers.add(player.getName());
|
||||
me.sendMessage("You have enabled admin bypass mode. You will be able to build or destroy anywhere.");
|
||||
Factions.log(player.getName() + " has ENABLED admin bypass mode.");
|
||||
P.log(player.getName() + " has ENABLED admin bypass mode.");
|
||||
} else {
|
||||
Conf.adminBypassPlayers.remove(player.getName());
|
||||
me.sendMessage("You have disabled admin bypass mode.");
|
||||
Factions.log(player.getName() + " DISABLED admin bypass mode.");
|
||||
P.log(player.getName() + " DISABLED admin bypass mode.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
|
||||
public class FCommandConfig extends FBaseCommand {
|
||||
@@ -32,7 +32,7 @@ public class FCommandConfig extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermConfigure(sender);
|
||||
return P.hasPermConfigure(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -222,7 +222,7 @@ public class FCommandConfig extends FBaseCommand {
|
||||
if (!success.isEmpty()) {
|
||||
sendMessage(success);
|
||||
if (sender instanceof Player) {
|
||||
Factions.log(success + " Command was run by "+player.getName()+".");
|
||||
P.log(success + " Command was run by "+player.getName()+".");
|
||||
}
|
||||
}
|
||||
// save change to disk
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class FCommandCreate extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermCreate(sender);
|
||||
return P.hasPermCreate(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class FCommandDeposit extends FBaseCommand {
|
||||
faction.addMoney(amount);
|
||||
sendMessage("You have deposited "+amountString+" into "+faction.getTag()+"'s bank.");
|
||||
sendMessage(faction.getTag()+" now has "+Econ.moneyString(faction.getMoney()));
|
||||
Factions.log(player.getName() + " deposited "+amountString+" into "+faction.getTag()+"'s bank.");
|
||||
P.log(player.getName() + " deposited "+amountString+" into "+faction.getTag()+"'s bank.");
|
||||
|
||||
for (FPlayer fplayer : FPlayer.getAllOnline()) {
|
||||
if (fplayer.getFaction() == faction) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
@@ -34,7 +34,7 @@ public class FCommandDisband extends FBaseCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! Factions.hasPermDisband(sender)) {
|
||||
if ( ! P.hasPermDisband(sender)) {
|
||||
if (me.getFaction() == faction) {
|
||||
parameters.clear();
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class FCommandDisband extends FBaseCommand {
|
||||
|
||||
faction = me.getFaction();
|
||||
|
||||
if (faction.isPermanent() && !Factions.hasPermDisband(sender)) {
|
||||
if (faction.isPermanent() && !P.hasPermDisband(sender)) {
|
||||
sendMessage("Your faction is designated as permanent, so you cannot disband it.");
|
||||
return;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class FCommandDisband extends FBaseCommand {
|
||||
if (amount > 0.0) {
|
||||
String amountString = Econ.moneyString(amount);
|
||||
sendMessage("You have been given the disbanded faction's bank, totaling "+amountString+".");
|
||||
Factions.log(player.getName() + " has been given bank holdings of "+amountString+" from disbanding "+faction.getTag()+".");
|
||||
P.log(player.getName() + " has been given bank holdings of "+amountString+" from disbanding "+faction.getTag()+".");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandKick extends FBaseCommand {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class FCommandKick extends FBaseCommand {
|
||||
Faction myFaction = me.getFaction();
|
||||
|
||||
// players with admin-level "disband" permission can bypass these requirements
|
||||
if (!Factions.hasPermDisband(sender)) {
|
||||
if (!P.hasPermDisband(sender)) {
|
||||
if (yourFaction != myFaction) {
|
||||
sendMessage(you.getNameAndRelevant(me)+Conf.colorSystem+" is not a member of "+myFaction.getTag(me));
|
||||
return;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandLock extends FBaseCommand {
|
||||
|
||||
@@ -18,7 +18,7 @@ public class FCommandLock extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermLock(sender);
|
||||
return P.hasPermLock(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
public class FCommandNoBoom extends FBaseCommand {
|
||||
@@ -17,7 +17,7 @@ public class FCommandNoBoom extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermPeacefulExplosionToggle(sender);
|
||||
return P.hasPermPeacefulExplosionToggle(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class FCommandOwner extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
boolean hasBypass = Factions.hasPermAdminBypass(player);
|
||||
boolean hasBypass = P.hasPermAdminBypass(player);
|
||||
|
||||
if ( ! hasBypass && ! assertHasFaction()) {
|
||||
return;
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
|
||||
public class FCommandOwnerList extends FBaseCommand {
|
||||
@@ -20,7 +20,7 @@ public class FCommandOwnerList extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
boolean hasBypass = Factions.hasPermAdminBypass(player);
|
||||
boolean hasBypass = P.hasPermAdminBypass(player);
|
||||
|
||||
if ( ! hasBypass && ! assertHasFaction()) {
|
||||
return;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class FCommandPay extends FBaseCommand {
|
||||
them.addMoney(amount);
|
||||
sendMessage("You have paid "+amountString+" from "+us.getTag()+"'s bank to "+them.getTag()+"'s bank.");
|
||||
sendMessage(us.getTag()+" now has "+Econ.moneyString(us.getMoney()));
|
||||
Factions.log(player.getName() + " paid "+amountString+" from "+us.getTag()+"'s bank to "+them.getTag()+"'s bank.");
|
||||
P.log(player.getName() + " paid "+amountString+" from "+us.getTag()+"'s bank to "+them.getTag()+"'s bank.");
|
||||
|
||||
for (FPlayer fplayer : FPlayer.getAllOnline()) {
|
||||
if (fplayer.getFaction() == us || fplayer.getFaction() == them) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class FCommandPeaceful extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermSetPeaceful(sender);
|
||||
return P.hasPermSetPeaceful(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class FCommandPermanent extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermSetPermanent(sender);
|
||||
return P.hasPermSetPermanent(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class FCommandPower extends FBaseCommand {
|
||||
public void perform() {
|
||||
FPlayer target;
|
||||
if (parameters.size() > 0) {
|
||||
if (!Factions.hasPermViewAnyPower(player)) {
|
||||
if (!P.hasPermViewAnyPower(player)) {
|
||||
me.sendMessage("You do not have the appropriate permission to view another player's power level.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandReload extends FBaseCommand {
|
||||
|
||||
@@ -22,12 +22,12 @@ public class FCommandReload extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermReload(sender);
|
||||
return P.hasPermReload(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
Factions.log("=== RELOAD START ===");
|
||||
P.log("=== RELOAD START ===");
|
||||
long timeInitStart = System.currentTimeMillis();
|
||||
String fileName = "s";
|
||||
|
||||
@@ -35,33 +35,33 @@ public class FCommandReload extends FBaseCommand {
|
||||
if (parameters.size() > 0) {
|
||||
String file = parameters.get(0);
|
||||
if (file.equalsIgnoreCase("conf") || file.equalsIgnoreCase("conf.json")) {
|
||||
Factions.log("RELOADING CONF.JSON");
|
||||
P.log("RELOADING CONF.JSON");
|
||||
Conf.load();
|
||||
fileName = " conf.json";
|
||||
}
|
||||
else if (file.equalsIgnoreCase("board") || file.equalsIgnoreCase("board.json")) {
|
||||
Factions.log("RELOADING BOARD.JSON");
|
||||
P.log("RELOADING BOARD.JSON");
|
||||
Board.load();
|
||||
fileName = " board.json";
|
||||
}
|
||||
else if (file.equalsIgnoreCase("factions") || file.equalsIgnoreCase("factions.json")) {
|
||||
Factions.log("RELOADING FACTIONS.JSON");
|
||||
P.log("RELOADING FACTIONS.JSON");
|
||||
Faction.load();
|
||||
fileName = " factions.json";
|
||||
}
|
||||
else if (file.equalsIgnoreCase("players") || file.equalsIgnoreCase("players.json")) {
|
||||
Factions.log("RELOADING PLAYERS.JSON");
|
||||
P.log("RELOADING PLAYERS.JSON");
|
||||
FPlayer.load();
|
||||
fileName = " players.json";
|
||||
}
|
||||
else {
|
||||
Factions.log("RELOAD CANCELLED - SPECIFIED FILE INVALID");
|
||||
P.log("RELOAD CANCELLED - SPECIFIED FILE INVALID");
|
||||
sendMessage("Invalid file specified. Valid files: conf, board, factions, players.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Factions.log("RELOADING ALL FILES");
|
||||
P.log("RELOADING ALL FILES");
|
||||
Conf.load();
|
||||
FPlayer.load();
|
||||
Faction.load();
|
||||
@@ -69,7 +69,7 @@ public class FCommandReload extends FBaseCommand {
|
||||
}
|
||||
|
||||
long timeReload = (System.currentTimeMillis()-timeInitStart);
|
||||
Factions.log("=== RELOAD DONE (Took "+timeReload+"ms) ===");
|
||||
P.log("=== RELOAD DONE (Took "+timeReload+"ms) ===");
|
||||
|
||||
sendMessage("Factions file" + fileName + " reloaded from disk, took " + timeReload + "ms");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandSafeclaim extends FBaseCommand {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class FCommandSafeclaim extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermManageSafeZone(sender);
|
||||
return P.hasPermManageSafeZone(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandSafeunclaimall extends FBaseCommand {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class FCommandSafeunclaimall extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermManageSafeZone(sender);
|
||||
return P.hasPermManageSafeZone(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandSaveAll extends FBaseCommand {
|
||||
|
||||
@@ -17,12 +17,12 @@ public class FCommandSaveAll extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermSaveAll(sender);
|
||||
return P.hasPermSaveAll(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
Factions.saveAll();
|
||||
P.saveAll();
|
||||
|
||||
sendMessage("Factions saved to disk!");
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.commands;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
public class FCommandSethome extends FBaseCommand {
|
||||
@@ -38,7 +38,7 @@ public class FCommandSethome extends FBaseCommand {
|
||||
Faction myFaction = me.getFaction();
|
||||
|
||||
if (parameters.size() > 0) {
|
||||
if (!Factions.hasPermAdminBypass(player)) {
|
||||
if (!P.hasPermAdminBypass(player)) {
|
||||
me.sendMessage("You cannot set the home of another faction without adminBypass permission.");
|
||||
return;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class FCommandSethome extends FBaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
if (Conf.homesMustBeInClaimedTerritory && !me.isInOwnTerritory() && !Factions.hasPermAdminBypass(player)) {
|
||||
if (Conf.homesMustBeInClaimedTerritory && !me.isInOwnTerritory() && !P.hasPermAdminBypass(player)) {
|
||||
me.sendMessage("Sorry, your faction home can only be set inside your own claimed territory.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
public class FCommandUnclaim extends FBaseCommand {
|
||||
@@ -29,7 +29,7 @@ public class FCommandUnclaim extends FBaseCommand {
|
||||
Faction otherFaction = Board.getFactionAt(flocation);
|
||||
|
||||
if (otherFaction.isSafeZone()) {
|
||||
if (Factions.hasPermManageSafeZone(sender)) {
|
||||
if (P.hasPermManageSafeZone(sender)) {
|
||||
Board.removeAt(flocation);
|
||||
sendMessage("Safe zone was unclaimed.");
|
||||
} else {
|
||||
@@ -38,7 +38,7 @@ public class FCommandUnclaim extends FBaseCommand {
|
||||
return;
|
||||
}
|
||||
else if (otherFaction.isWarZone()) {
|
||||
if (Factions.hasPermManageWarZone(sender)) {
|
||||
if (P.hasPermManageWarZone(sender)) {
|
||||
Board.removeAt(flocation);
|
||||
sendMessage("War zone was unclaimed.");
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
|
||||
public class FCommandVersion extends FBaseCommand {
|
||||
@@ -22,7 +22,7 @@ public class FCommandVersion extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
sendMessage("You are running "+Factions.instance.getDescription().getFullName());
|
||||
sendMessage("You are running "+P.p.getDescription().getFullName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandWarclaim extends FBaseCommand {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class FCommandWarclaim extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermManageWarZone(sender);
|
||||
return P.hasPermManageWarZone(sender);
|
||||
}
|
||||
|
||||
public void perform() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
|
||||
public class FCommandWarunclaimall extends FBaseCommand {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class FCommandWarunclaimall extends FBaseCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return Factions.hasPermManageWarZone(sender);
|
||||
return P.hasPermManageWarZone(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.commands;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FCommandWithdraw extends FBaseCommand {
|
||||
Econ.addMoney(me.getName(), amount);
|
||||
sendMessage("You have withdrawn "+amountString+" from "+faction.getTag()+"'s bank.");
|
||||
sendMessage(faction.getTag()+" now has "+Econ.moneyString(faction.getMoney()));
|
||||
Factions.log(player.getName() + " withdrew "+amountString+" from "+faction.getTag()+"'s bank.");
|
||||
P.log(player.getName() + " withdrew "+amountString+" from "+faction.getTag()+"'s bank.");
|
||||
|
||||
for (FPlayer fplayer : FPlayer.getAllOnline()) {
|
||||
if (fplayer.getFaction() == faction) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.ChatColor;
|
||||
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.P;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
@@ -62,7 +62,7 @@ public class FRelationCommand extends FBaseCommand {
|
||||
myFaction.sendMessage(Conf.colorSystem+"Your faction is now "+currentRelationColor+whishedRelation.toString()+Conf.colorSystem+" to "+currentRelationColor+otherFaction.getTag());
|
||||
} else {
|
||||
otherFaction.sendMessage(currentRelationColor+myFaction.getTag()+Conf.colorSystem+ " wishes to be your "+whishedRelation.getColor()+whishedRelation.toString());
|
||||
otherFaction.sendMessage(Conf.colorSystem+"Type "+Conf.colorCommand+Factions.instance.getBaseCommand()+" "+whishedRelation+" "+myFaction.getTag()+Conf.colorSystem+" to accept.");
|
||||
otherFaction.sendMessage(Conf.colorSystem+"Type "+Conf.colorCommand+P.p.getBaseCommand()+" "+whishedRelation+" "+myFaction.getTag()+Conf.colorSystem+" to accept.");
|
||||
myFaction.sendMessage(currentRelationColor+otherFaction.getTag()+Conf.colorSystem+ " were informed that you wish to be "+whishedRelation.getColor()+whishedRelation);
|
||||
}
|
||||
if (!whishedRelation.isNeutral() && otherFaction.isPeaceful()) {
|
||||
|
||||
Reference in New Issue
Block a user