This is 2.2.2

This commit is contained in:
Olof Larsson 2013-11-11 09:31:04 +01:00
parent fa0c8686c1
commit 1a63c59c54
63 changed files with 651 additions and 171 deletions

View File

@ -1,6 +1,6 @@
main: com.massivecraft.factions.Factions main: com.massivecraft.factions.Factions
name: Factions name: Factions
version: 2.2.1 version: 2.2.2
website: http://massivecraft.com/factions website: http://massivecraft.com/factions
authors: [Cayorion, Brettflan] authors: [Cayorion, Brettflan]
description: §eFactions allows the players to team up and claim land as their own and start wars with other factions. This way we hope to inspire politics, intrigue, and team spirit. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead Factions programmer. Feel free to visit us at §bhttp://massivecraft.com description: §eFactions allows the players to team up and claim land as their own and start wars with other factions. This way we hope to inspire politics, intrigue, and team spirit. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead Factions programmer. Feel free to visit us at §bhttp://massivecraft.com

View File

@ -1,25 +0,0 @@
package com.massivecraft.factions;
import java.util.*;
import com.massivecraft.mcore.SimpleConfig;
import com.massivecraft.mcore.util.MUtil;
public class ConfServer extends SimpleConfig
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static transient ConfServer i = new ConfServer();
public static ConfServer get() { return i; }
public ConfServer() { super(Factions.get()); }
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public static List<String> baseCommandAliases = MUtil.list("f");
public static String dburi = "default";
}

View File

@ -2,18 +2,18 @@ package com.massivecraft.factions;
public class Const public class Const
{ {
// MStore Collection Names // Collections & Aspects
public static final String COLLECTION_BASENAME = "factions"; public static final String BASENAME = "factions";
public static final String COLLECTION_BASENAME_ = COLLECTION_BASENAME+"_"; public static final String BASENAME_ = BASENAME+"_";
public static final String COLLECTION_BASENAME_BOARD = COLLECTION_BASENAME_+"board";
public static final String COLLECTION_BASENAME_FACTION = COLLECTION_BASENAME_+"faction";
public static final String COLLECTION_BASENAME_UPLAYER = COLLECTION_BASENAME_+"uplayer";
public static final String COLLECTION_BASENAME_MPLAYER = COLLECTION_BASENAME_+"mplayer";
public static final String COLLECTION_BASENAME_UCONF = COLLECTION_BASENAME_+"uconf";
public static final String COLLECTION_BASENAME_MCONF = COLLECTION_BASENAME_+"mconf";
// Aspect Ids public static final String COLLECTION_BOARD = BASENAME_+"board";
public static final String ASPECT_ID = "factions"; public static final String COLLECTION_FACTION = BASENAME_+"faction";
public static final String COLLECTION_UPLAYER = BASENAME_+"uplayer";
public static final String COLLECTION_MPLAYER = BASENAME_+"mplayer";
public static final String COLLECTION_UCONF = BASENAME_+"uconf";
public static final String COLLECTION_MCONF = BASENAME_+"mconf";
public static final String ASPECT = BASENAME;
// ASCII Map // ASCII Map
public static final int MAP_HEIGHT = 8; public static final int MAP_HEIGHT = 8;

View File

@ -94,11 +94,8 @@ public class Factions extends MPlugin
{ {
if ( ! preEnable()) return; if ( ! preEnable()) return;
// Load Server Config
ConfServer.get().load();
// Initialize Aspects // Initialize Aspects
this.aspect = AspectColl.get().get(Const.ASPECT_ID, true); this.aspect = AspectColl.get().get(Const.ASPECT, true);
this.aspect.register(); this.aspect.register();
this.aspect.setDesc( this.aspect.setDesc(
"<i>If the factions system even is enabled and how it's configured.", "<i>If the factions system even is enabled and how it's configured.",
@ -122,7 +119,7 @@ public class Factions extends MPlugin
// Commands // Commands
this.outerCmdFactions = new CmdFactions(); this.outerCmdFactions = new CmdFactions();
this.outerCmdFactions.register(this); this.outerCmdFactions.register();
// Setup Listeners // Setup Listeners
FactionsListenerMain.get().setup(); FactionsListenerMain.get().setup();

View File

@ -1,15 +1,19 @@
package com.massivecraft.factions.cmd; package com.massivecraft.factions.cmd;
import java.util.Collections; import java.util.List;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.mcore.cmd.HelpCommand; import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.VersionCommand; import com.massivecraft.mcore.cmd.VersionCommand;
public class CmdFactions extends FCommand public class CmdFactions extends FCommand
{ {
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public CmdFactionsList cmdFactionsList = new CmdFactionsList(); public CmdFactionsList cmdFactionsList = new CmdFactionsList();
public CmdFactionsFaction cmdFactionsFaction = new CmdFactionsFaction(); public CmdFactionsFaction cmdFactionsFaction = new CmdFactionsFaction();
public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer(); public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer();
@ -47,17 +51,13 @@ public class CmdFactions extends FCommand
public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost(); public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost();
public VersionCommand cmdFactionsVersion = new VersionCommand(Factions.get(), Perm.VERSION.node, "v", "version"); public VersionCommand cmdFactionsVersion = new VersionCommand(Factions.get(), Perm.VERSION.node, "v", "version");
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactions() public CmdFactions()
{ {
this.aliases.addAll(ConfServer.baseCommandAliases); // Add SubCommands
// remove any nulls from extra commas
// TODO: When is this required? Should this be added to MCore?
this.aliases.removeAll(Collections.singletonList(null));
this.setDesc("The faction base command");
this.setHelp("This command contains all faction stuff.");
this.addSubCommand(HelpCommand.get()); this.addSubCommand(HelpCommand.get());
this.addSubCommand(this.cmdFactionsList); this.addSubCommand(this.cmdFactionsList);
this.addSubCommand(this.cmdFactionsFaction); this.addSubCommand(this.cmdFactionsFaction);
@ -95,13 +95,20 @@ public class CmdFactions extends FCommand
this.addSubCommand(this.cmdFactionsAdmin); this.addSubCommand(this.cmdFactionsAdmin);
this.addSubCommand(this.cmdFactionsPowerBoost); this.addSubCommand(this.cmdFactionsPowerBoost);
this.addSubCommand(this.cmdFactionsVersion); this.addSubCommand(this.cmdFactionsVersion);
// Misc
this.setDesc("The faction base command");
this.setHelp("This command contains all faction stuff.");
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public List<String> getAliases()
{ {
this.getCommandChain().add(this); return MConf.get().aliasesF;
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain);
} }
} }

View File

@ -9,28 +9,43 @@ import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
public class CmdFactionsAccess extends FCommand public class CmdFactionsAccess extends FCommand
{ {
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public CmdFactionsAccessView cmdFactionsAccessView = new CmdFactionsAccessView(); public CmdFactionsAccessView cmdFactionsAccessView = new CmdFactionsAccessView();
public CmdFactionsAccessPlayer cmdFactionsAccessPlayer = new CmdFactionsAccessPlayer(); public CmdFactionsAccessPlayer cmdFactionsAccessPlayer = new CmdFactionsAccessPlayer();
public CmdFactionsAccessFaction cmdFactionsAccessFaction = new CmdFactionsAccessFaction(); public CmdFactionsAccessFaction cmdFactionsAccessFaction = new CmdFactionsAccessFaction();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAccess() public CmdFactionsAccess()
{ {
this.addAliases("access"); // Add SubCommands
this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqIsPlayer.get());
this.addRequirements(ReqHasPerm.get(Perm.ACCESS.node));
this.addSubCommand(this.cmdFactionsAccessView); this.addSubCommand(this.cmdFactionsAccessView);
this.addSubCommand(this.cmdFactionsAccessPlayer); this.addSubCommand(this.cmdFactionsAccessPlayer);
this.addSubCommand(this.cmdFactionsAccessFaction); this.addSubCommand(this.cmdFactionsAccessFaction);
// Aliases
this.addAliases("access");
// Requirements
this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqIsPlayer.get());
this.addRequirements(ReqHasPerm.get(Perm.ACCESS.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {
this.getCommandChain().add(this); this.getCommandChain().add(this);
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain); HelpCommand.get().execute(this.sender, this.args, this.commandChain);
} }
} }

View File

@ -17,16 +17,29 @@ import com.massivecraft.mcore.util.Txt;
public abstract class CmdFactionsAccessAbstract extends FCommand public abstract class CmdFactionsAccessAbstract extends FCommand
{ {
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public PS chunk; public PS chunk;
public TerritoryAccess ta; public TerritoryAccess ta;
public Faction hostFaction; public Faction hostFaction;
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAccessAbstract() public CmdFactionsAccessAbstract()
{ {
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {
@ -58,4 +71,5 @@ public abstract class CmdFactionsAccessAbstract extends FCommand
} }
return Txt.implodeCommaAnd(descriptions, Txt.parse("<i>, "), Txt.parse(" <i>and ")); return Txt.implodeCommaAnd(descriptions, Txt.parse("<i>, "), Txt.parse(" <i>and "));
} }
} }

View File

@ -10,16 +10,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAccessFaction() public CmdFactionsAccessFaction()
{ {
// Aliases
this.addAliases("f", "faction"); this.addAliases("f", "faction");
// Args
this.addRequiredArg("faction"); this.addRequiredArg("faction");
this.addOptionalArg("yes/no", "toggle"); this.addOptionalArg("yes/no", "toggle");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_FACTION.node)); this.addRequirements(ReqHasPerm.get(Perm.ACCESS_FACTION.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void innerPerform() public void innerPerform()
{ {
@ -40,4 +51,5 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
// Inform // Inform
this.sendAccessInfo(); this.sendAccessInfo();
} }
} }

View File

@ -10,16 +10,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAccessPlayer() public CmdFactionsAccessPlayer()
{ {
// Aliases
this.addAliases("p", "player"); this.addAliases("p", "player");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
this.addOptionalArg("yes/no", "toggle"); this.addOptionalArg("yes/no", "toggle");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_PLAYER.node)); this.addRequirements(ReqHasPerm.get(Perm.ACCESS_PLAYER.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void innerPerform() public void innerPerform()
{ {
@ -40,4 +51,5 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
// Inform // Inform
this.sendAccessInfo(); this.sendAccessInfo();
} }
} }

View File

@ -3,19 +3,29 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.mcore.cmd.req.ReqHasPerm; import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsAccessView extends CmdFactionsAccessAbstract public class CmdFactionsAccessView extends CmdFactionsAccessAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAccessView() public CmdFactionsAccessView()
{ {
// Aliases
this.addAliases("v", "view"); this.addAliases("v", "view");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_VIEW.node)); this.addRequirements(ReqHasPerm.get(Perm.ACCESS_VIEW.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void innerPerform() public void innerPerform()
{ {
this.sendAccessInfo(); this.sendAccessInfo();
} }
} }

View File

@ -7,15 +7,26 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsAdmin extends FCommand public class CmdFactionsAdmin extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAdmin() public CmdFactionsAdmin()
{ {
// Aliases
this.addAliases("admin"); this.addAliases("admin");
// Args
this.addOptionalArg("on/off", "flip"); this.addOptionalArg("on/off", "flip");
//this.addRequirements(ReqFactionsEnabled.get()); // Requirements
// this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node)); this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -36,4 +47,5 @@ public class CmdFactionsAdmin extends FCommand
Factions.get().log(msender.getId() + " DISABLED admin bypass mode."); Factions.get().log(msender.getId() + " DISABLED admin bypass mode.");
} }
} }
} }

View File

@ -12,17 +12,28 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsAutoClaim extends FCommand public class CmdFactionsAutoClaim extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAutoClaim() public CmdFactionsAutoClaim()
{ {
// Aliases
this.addAliases("autoclaim"); this.addAliases("autoclaim");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.AUTOCLAIM.node)); this.addRequirements(ReqHasPerm.get(Perm.AUTOCLAIM.node));
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {

View File

@ -15,18 +15,28 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsClaim extends FCommand public class CmdFactionsClaim extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsClaim() public CmdFactionsClaim()
{ {
// Aliases
this.addAliases("claim"); this.addAliases("claim");
// Args
this.addOptionalArg("radius", "1"); this.addOptionalArg("radius", "1");
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node)); this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -98,4 +108,5 @@ public class CmdFactionsClaim extends FCommand
}; };
} }
} }

View File

@ -21,20 +21,31 @@ import com.massivecraft.mcore.store.MStore;
public class CmdFactionsCreate extends FCommand public class CmdFactionsCreate extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsCreate() public CmdFactionsCreate()
{ {
// Aliases
this.addAliases("create"); this.addAliases("create");
// Args
this.addRequiredArg("name"); this.addRequiredArg("name");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasntFaction.get()); this.addRequirements(ReqHasntFaction.get());
this.addRequirements(ReqHasPerm.get(Perm.CREATE.node)); this.addRequirements(ReqHasPerm.get(Perm.CREATE.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {
// Args // Args
String newName = this.arg(0); String newName = this.arg(0);

View File

@ -9,13 +9,19 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsDemote extends FCommand public class CmdFactionsDemote extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsDemote() public CmdFactionsDemote()
{ {
// Aliases
this.addAliases("demote"); this.addAliases("demote");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.DEMOTE.node)); this.addRequirements(ReqHasPerm.get(Perm.DEMOTE.node));
@ -23,6 +29,10 @@ public class CmdFactionsDemote extends FCommand
//To demote someone from officer -> member you must be a leader. //To demote someone from officer -> member you must be a leader.
//We'll handle this internally //We'll handle this internally
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -11,18 +11,29 @@ import com.massivecraft.mcore.mixin.Mixin;
public class CmdFactionsDescription extends FCommand public class CmdFactionsDescription extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsDescription() public CmdFactionsDescription()
{ {
// Aliases
this.addAliases("desc"); this.addAliases("desc");
// Args
this.addRequiredArg("desc"); this.addRequiredArg("desc");
this.setErrorOnToManyArgs(false); this.setErrorOnToManyArgs(false);
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node)); this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -19,15 +19,26 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsDisband extends FCommand public class CmdFactionsDisband extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsDisband() public CmdFactionsDisband()
{ {
// Aliases
this.addAliases("disband"); this.addAliases("disband");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node)); this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -81,4 +92,5 @@ public class CmdFactionsDisband extends FCommand
faction.detach(); faction.detach();
} }
} }

View File

@ -26,16 +26,27 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsFaction extends FCommand public class CmdFactionsFaction extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsFaction() public CmdFactionsFaction()
{ {
// Aliases
this.addAliases("f", "faction"); this.addAliases("f", "faction");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.FACTION.node)); this.addRequirements(ReqHasPerm.get(Perm.FACTION.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {

View File

@ -12,18 +12,28 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsFlag extends FCommand public class CmdFactionsFlag extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsFlag() public CmdFactionsFlag()
{ {
// Aliases
this.addAliases("flag"); this.addAliases("flag");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
this.addOptionalArg("flag", "all"); this.addOptionalArg("flag", "all");
this.addOptionalArg("yes/no", "read"); this.addOptionalArg("yes/no", "read");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node)); this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -24,15 +24,25 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsHome extends FCommand public class CmdFactionsHome extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsHome() public CmdFactionsHome()
{ {
// Aliases
this.addAliases("home"); this.addAliases("home");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.HOME.node)); this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -14,18 +14,29 @@ import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
public class CmdFactionsInvite extends FCommand public class CmdFactionsInvite extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsInvite() public CmdFactionsInvite()
{ {
// Aliases
this.addAliases("inv", "invite"); this.addAliases("inv", "invite");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
this.addOptionalArg("yes/no", "toggle"); this.addOptionalArg("yes/no", "toggle");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.INVITE.node)); this.addRequirements(ReqHasPerm.get(Perm.INVITE.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -16,16 +16,27 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsJoin extends FCommand public class CmdFactionsJoin extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsJoin() public CmdFactionsJoin()
{ {
// Aliases
this.addAliases("join"); this.addAliases("join");
// Args
this.addRequiredArg("faction"); this.addRequiredArg("faction");
this.addOptionalArg("player", "you"); this.addOptionalArg("player", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node)); this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -113,4 +124,5 @@ public class CmdFactionsJoin extends FCommand
} }
} }
} }
} }

View File

@ -17,16 +17,26 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsKick extends FCommand public class CmdFactionsKick extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsKick() public CmdFactionsKick()
{ {
// Aliases
this.addAliases("kick"); this.addAliases("kick");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.KICK.node)); this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -15,17 +15,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdFactionsLeader extends FCommand public class CmdFactionsLeader extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsLeader() public CmdFactionsLeader()
{ {
// Aliases
this.addAliases("leader"); this.addAliases("leader");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.LEADER.node)); this.addRequirements(ReqHasPerm.get(Perm.LEADER.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -97,4 +107,5 @@ public class CmdFactionsLeader extends FCommand
uplayer.msg("%s<i> gave %s<i> the leadership of %s<i>.", senderIsConsole ? "A server admin" : RelationUtil.describeThatToMe(usender, uplayer, true), newLeader.describeTo(uplayer), targetFaction.describeTo(uplayer)); uplayer.msg("%s<i> gave %s<i> the leadership of %s<i>.", senderIsConsole ? "A server admin" : RelationUtil.describeThatToMe(usender, uplayer, true), newLeader.describeTo(uplayer), targetFaction.describeTo(uplayer));
} }
} }
} }

View File

@ -5,16 +5,26 @@ import com.massivecraft.factions.cmd.req.ReqFactionsEnabled;
import com.massivecraft.factions.cmd.req.ReqHasFaction; import com.massivecraft.factions.cmd.req.ReqHasFaction;
import com.massivecraft.mcore.cmd.req.ReqHasPerm; import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsLeave extends FCommand { public class CmdFactionsLeave extends FCommand
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsLeave() public CmdFactionsLeave()
{ {
// Aliases
this.addAliases("leave"); this.addAliases("leave");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.LEAVE.node)); this.addRequirements(ReqHasPerm.get(Perm.LEAVE.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -15,16 +15,27 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsList extends FCommand public class CmdFactionsList extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsList() public CmdFactionsList()
{ {
// Aliases
this.addAliases("l", "list"); this.addAliases("l", "list");
// Args
this.addOptionalArg("page", "1"); this.addOptionalArg("page", "1");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.LIST.node)); this.addRequirements(ReqHasPerm.get(Perm.LIST.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {
@ -69,4 +80,5 @@ public class CmdFactionsList extends FCommand
sendMessage(lines); sendMessage(lines);
} }
} }

View File

@ -10,16 +10,27 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsMap extends FCommand public class CmdFactionsMap extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMap() public CmdFactionsMap()
{ {
// Aliases
this.addAliases("map"); this.addAliases("map");
// Args
this.addOptionalArg("on/off", "once"); this.addOptionalArg("on/off", "once");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MAP.node)); this.addRequirements(ReqHasPerm.get(Perm.MAP.node));
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -3,11 +3,14 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.req.ReqFactionsEnabled; import com.massivecraft.factions.cmd.req.ReqFactionsEnabled;
import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.req.ReqHasPerm; import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsMoney extends FCommand public class CmdFactionsMoney extends FCommand
{ {
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public CmdFactionsMoneyBalance cmdMoneyBalance = new CmdFactionsMoneyBalance(); public CmdFactionsMoneyBalance cmdMoneyBalance = new CmdFactionsMoneyBalance();
public CmdFactionsMoneyDeposit cmdMoneyDeposit = new CmdFactionsMoneyDeposit(); public CmdFactionsMoneyDeposit cmdMoneyDeposit = new CmdFactionsMoneyDeposit();
public CmdFactionsMoneyWithdraw cmdMoneyWithdraw = new CmdFactionsMoneyWithdraw(); public CmdFactionsMoneyWithdraw cmdMoneyWithdraw = new CmdFactionsMoneyWithdraw();
@ -15,27 +18,27 @@ public class CmdFactionsMoney extends FCommand
public CmdFactionsMoneyTransferFp cmdMoneyTransferFp = new CmdFactionsMoneyTransferFp(); public CmdFactionsMoneyTransferFp cmdMoneyTransferFp = new CmdFactionsMoneyTransferFp();
public CmdFactionsMoneyTransferPf cmdMoneyTransferPf = new CmdFactionsMoneyTransferPf(); public CmdFactionsMoneyTransferPf cmdMoneyTransferPf = new CmdFactionsMoneyTransferPf();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoney() public CmdFactionsMoney()
{ {
this.addAliases("money"); // Add SubCommands
this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqBankCommandsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY.node));
this.addSubCommand(this.cmdMoneyBalance); this.addSubCommand(this.cmdMoneyBalance);
this.addSubCommand(this.cmdMoneyDeposit); this.addSubCommand(this.cmdMoneyDeposit);
this.addSubCommand(this.cmdMoneyWithdraw); this.addSubCommand(this.cmdMoneyWithdraw);
this.addSubCommand(this.cmdMoneyTransferFf); this.addSubCommand(this.cmdMoneyTransferFf);
this.addSubCommand(this.cmdMoneyTransferFp); this.addSubCommand(this.cmdMoneyTransferFp);
this.addSubCommand(this.cmdMoneyTransferPf); this.addSubCommand(this.cmdMoneyTransferPf);
}
// Aliases
@Override this.addAliases("money");
public void perform()
{ // Requirements
this.getCommandChain().add(this); this.addRequirements(ReqFactionsEnabled.get());
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain); this.addRequirements(ReqBankCommandsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY.node));
} }
} }

View File

@ -10,16 +10,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsMoneyBalance extends FCommand public class CmdFactionsMoneyBalance extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyBalance() public CmdFactionsMoneyBalance()
{ {
// Aliases
this.addAliases("b", "balance"); this.addAliases("b", "balance");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node)); this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));
this.addRequirements(ReqBankCommandsEnabled.get()); this.addRequirements(ReqBankCommandsEnabled.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -15,20 +15,30 @@ import com.massivecraft.mcore.util.Txt;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
public class CmdFactionsMoneyDeposit extends FCommand public class CmdFactionsMoneyDeposit extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyDeposit() public CmdFactionsMoneyDeposit()
{ {
// Aliases
this.addAliases("d", "deposit"); this.addAliases("d", "deposit");
// Args
this.addRequiredArg("amount"); this.addRequiredArg("amount");
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node)); this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));
this.addRequirements(ReqBankCommandsEnabled.get()); this.addRequirements(ReqBankCommandsEnabled.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -18,18 +18,29 @@ import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferFf extends FCommand public class CmdFactionsMoneyTransferFf extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyTransferFf() public CmdFactionsMoneyTransferFf()
{ {
// Aliases
this.addAliases("ff"); this.addAliases("ff");
// Args
this.addRequiredArg("amount"); this.addRequiredArg("amount");
this.addRequiredArg("faction"); this.addRequiredArg("faction");
this.addRequiredArg("faction"); this.addRequiredArg("faction");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node)); this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));
this.addRequirements(ReqBankCommandsEnabled.get()); this.addRequirements(ReqBankCommandsEnabled.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -50,4 +61,5 @@ public class CmdFactionsMoneyTransferFf extends FCommand
Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null))));
} }
} }
} }

View File

@ -20,19 +20,30 @@ import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferFp extends FCommand public class CmdFactionsMoneyTransferFp extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyTransferFp() public CmdFactionsMoneyTransferFp()
{ {
// Aliases
this.addAliases("fp"); this.addAliases("fp");
// Args
this.addRequiredArg("amount"); this.addRequiredArg("amount");
this.addRequiredArg("faction"); this.addRequiredArg("faction");
this.addRequiredArg("player"); this.addRequiredArg("player");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node)); this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));
this.addRequirements(ReqBankCommandsEnabled.get()); this.addRequirements(ReqBankCommandsEnabled.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
{ {
@ -52,4 +63,5 @@ public class CmdFactionsMoneyTransferFp extends FCommand
Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the player \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the player \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null))));
} }
} }
} }

View File

@ -20,18 +20,29 @@ import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferPf extends FCommand public class CmdFactionsMoneyTransferPf extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyTransferPf() public CmdFactionsMoneyTransferPf()
{ {
// Aliases
this.addAliases("pf"); this.addAliases("pf");
// Args
this.addRequiredArg("amount"); this.addRequiredArg("amount");
this.addRequiredArg("player"); this.addRequiredArg("player");
this.addRequiredArg("faction"); this.addRequiredArg("faction");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node)); this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));
this.addRequirements(ReqBankCommandsEnabled.get()); this.addRequirements(ReqBankCommandsEnabled.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -52,4 +63,5 @@ public class CmdFactionsMoneyTransferPf extends FCommand
Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the player \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the player \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null))));
} }
} }
} }

View File

@ -19,17 +19,28 @@ import org.bukkit.ChatColor;
public class CmdFactionsMoneyWithdraw extends FCommand public class CmdFactionsMoneyWithdraw extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyWithdraw() public CmdFactionsMoneyWithdraw()
{ {
// Aliases
this.addAliases("w", "withdraw"); this.addAliases("w", "withdraw");
// Args
this.addRequiredArg("amount"); this.addRequiredArg("amount");
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node)); this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));
this.addRequirements(ReqBankCommandsEnabled.get()); this.addRequirements(ReqBankCommandsEnabled.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -49,4 +60,5 @@ public class CmdFactionsMoneyWithdraw extends FCommand
Factions.get().log(ChatColor.stripColor(Txt.parse("%s withdrew %s from the faction bank: %s", usender.getName(), Money.format(from, amount), from.describeTo(null)))); Factions.get().log(ChatColor.stripColor(Txt.parse("%s withdrew %s from the faction bank: %s", usender.getName(), Money.format(from, amount), from.describeTo(null))));
} }
} }
} }

View File

@ -16,17 +16,28 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsName extends FCommand public class CmdFactionsName extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsName() public CmdFactionsName()
{ {
// Aliases
this.addAliases("name"); this.addAliases("name");
// Args
this.addRequiredArg("new name"); this.addRequiredArg("new name");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.NAME.node)); this.addRequirements(ReqHasPerm.get(Perm.NAME.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -10,15 +10,26 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsOfficer extends FCommand public class CmdFactionsOfficer extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsOfficer() public CmdFactionsOfficer()
{ {
// Aliases
this.addAliases("officer"); this.addAliases("officer");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.OFFICER.node)); this.addRequirements(ReqHasPerm.get(Perm.OFFICER.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -11,17 +11,28 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsOpen extends FCommand public class CmdFactionsOpen extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsOpen() public CmdFactionsOpen()
{ {
// Aliases
this.addAliases("open"); this.addAliases("open");
// Args
this.addOptionalArg("yes/no", "toggle"); this.addOptionalArg("yes/no", "toggle");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.OPEN.node)); this.addRequirements(ReqHasPerm.get(Perm.OPEN.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -14,19 +14,30 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsPerm extends FCommand public class CmdFactionsPerm extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsPerm() public CmdFactionsPerm()
{ {
// Aliases
this.addAliases("perm"); this.addAliases("perm");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
this.addOptionalArg("perm", "all"); this.addOptionalArg("perm", "all");
this.addOptionalArg("relation", "read"); this.addOptionalArg("relation", "read");
this.addOptionalArg("yes/no", "read"); this.addOptionalArg("yes/no", "read");
this.setErrorOnToManyArgs(false); this.setErrorOnToManyArgs(false);
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.PERM.node)); this.addRequirements(ReqHasPerm.get(Perm.PERM.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -14,15 +14,26 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsPlayer extends FCommand public class CmdFactionsPlayer extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsPlayer() public CmdFactionsPlayer()
{ {
// Aliases
this.addAliases("p", "player"); this.addAliases("p", "player");
// Args
this.addOptionalArg("player", "you"); this.addOptionalArg("player", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node)); this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -70,4 +81,5 @@ public class CmdFactionsPlayer extends FCommand
msg("<k>Power per Death: <v>%.2f", uplayer.getPowerPerDeath()); msg("<k>Power per Death: <v>%.2f", uplayer.getPowerPerDeath());
} }
} }

View File

@ -12,17 +12,28 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsPowerBoost extends FCommand public class CmdFactionsPowerBoost extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsPowerBoost() public CmdFactionsPowerBoost()
{ {
// Aliases
this.addAliases("powerboost"); this.addAliases("powerboost");
// Args
this.addRequiredArg("p|f|player|faction"); this.addRequiredArg("p|f|player|faction");
this.addRequiredArg("name"); this.addRequiredArg("name");
this.addRequiredArg("#"); this.addRequiredArg("#");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node)); this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -65,4 +76,5 @@ public class CmdFactionsPowerBoost extends FCommand
msg("<i>"+target+" now has a power bonus/penalty of "+targetPower+" to min and max power levels."); msg("<i>"+target+" now has a power bonus/penalty of "+targetPower+" to min and max power levels.");
Factions.get().log(usender.getName()+" has set the power bonus/penalty for "+target+" to "+targetPower+"."); Factions.get().log(usender.getName()+" has set the power bonus/penalty for "+target+" to "+targetPower+".");
} }
} }

View File

@ -9,12 +9,19 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public class CmdFactionsPromote extends FCommand public class CmdFactionsPromote extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsPromote() public CmdFactionsPromote()
{ {
// Aliases
this.addAliases("promote"); this.addAliases("promote");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.PROMOTE.node)); this.addRequirements(ReqHasPerm.get(Perm.PROMOTE.node));
@ -22,6 +29,10 @@ public class CmdFactionsPromote extends FCommand
//To promote someone from member -> officer you must be a leader. //To promote someone from member -> officer you must be a leader.
//We'll handle this internally //We'll handle this internally
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.cmd; package com.massivecraft.factions.cmd;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.FFlag; import com.massivecraft.factions.FFlag;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
@ -9,22 +8,33 @@ import com.massivecraft.factions.cmd.req.ReqFactionsEnabled;
import com.massivecraft.factions.cmd.req.ReqHasFaction; import com.massivecraft.factions.cmd.req.ReqHasFaction;
import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast; import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.event.FactionsEventRelationChange; import com.massivecraft.factions.event.FactionsEventRelationChange;
import com.massivecraft.mcore.cmd.req.ReqHasPerm; import com.massivecraft.mcore.cmd.req.ReqHasPerm;
public abstract class CmdFactionsRelationAbstract extends FCommand public abstract class CmdFactionsRelationAbstract extends FCommand
{ {
public Rel targetRelation; public Rel targetRelation;
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRelationAbstract() public CmdFactionsRelationAbstract()
{ {
// Aliases
this.addRequiredArg("faction"); this.addRequiredArg("faction");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node)); this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()
@ -75,7 +85,7 @@ public abstract class CmdFactionsRelationAbstract extends FCommand
else else
{ {
otherFaction.msg("%s<i> wishes to be %s.", usenderFaction.describeTo(otherFaction, true), newRelation.getColor()+newRelation.getDescFactionOne()); otherFaction.msg("%s<i> wishes to be %s.", usenderFaction.describeTo(otherFaction, true), newRelation.getColor()+newRelation.getDescFactionOne());
otherFaction.msg("<i>Type <c>/"+ConfServer.baseCommandAliases.get(0)+" "+newRelation+" "+usenderFaction.getName()+"<i> to accept."); otherFaction.msg("<i>Type <c>/"+MConf.get().aliasesF.get(0)+" "+newRelation+" "+usenderFaction.getName()+"<i> to accept.");
usenderFaction.msg("%s<i> were informed that you wish to be %s<i>.", otherFaction.describeTo(usenderFaction, true), newRelation.getColor()+newRelation.getDescFactionOne()); usenderFaction.msg("%s<i> were informed that you wish to be %s<i>.", otherFaction.describeTo(usenderFaction, true), newRelation.getColor()+newRelation.getDescFactionOne());
} }
@ -93,4 +103,5 @@ public abstract class CmdFactionsRelationAbstract extends FCommand
usenderFaction.msg("<i>This will have no effect while your faction is peaceful."); usenderFaction.msg("<i>This will have no effect while your faction is peaceful.");
} }
} }
} }

View File

@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel;
public class CmdFactionsRelationAlly extends CmdFactionsRelationAbstract public class CmdFactionsRelationAlly extends CmdFactionsRelationAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRelationAlly() public CmdFactionsRelationAlly()
{ {
// Aliases
this.addAliases("ally"); this.addAliases("ally");
// Misc
this.targetRelation = Rel.ALLY; this.targetRelation = Rel.ALLY;
} }
} }

View File

@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel;
public class CmdFactionsRelationEnemy extends CmdFactionsRelationAbstract public class CmdFactionsRelationEnemy extends CmdFactionsRelationAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRelationEnemy() public CmdFactionsRelationEnemy()
{ {
// Aliases
this.addAliases("enemy"); this.addAliases("enemy");
// Misc
this.targetRelation = Rel.ENEMY; this.targetRelation = Rel.ENEMY;
} }
} }

View File

@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel;
public class CmdFactionsRelationNeutral extends CmdFactionsRelationAbstract public class CmdFactionsRelationNeutral extends CmdFactionsRelationAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRelationNeutral() public CmdFactionsRelationNeutral()
{ {
// Aliases
this.addAliases("neutral"); this.addAliases("neutral");
// Misc
this.targetRelation = Rel.NEUTRAL; this.targetRelation = Rel.NEUTRAL;
} }
} }

View File

@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel;
public class CmdFactionsRelationTruce extends CmdFactionsRelationAbstract public class CmdFactionsRelationTruce extends CmdFactionsRelationAbstract
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRelationTruce() public CmdFactionsRelationTruce()
{ {
// Aliases
this.addAliases("truce"); this.addAliases("truce");
// Misc
this.targetRelation = Rel.TRUCE; this.targetRelation = Rel.TRUCE;
} }
} }

View File

@ -14,14 +14,24 @@ import com.massivecraft.mcore.ps.PSFormatHumanSpace;
public class CmdFactionsSeeChunk extends FCommand public class CmdFactionsSeeChunk extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsSeeChunk() public CmdFactionsSeeChunk()
{ {
// Aliases
this.addAliases("sc", "seechunk"); this.addAliases("sc", "seechunk");
//this.addRequirements(ReqFactionsEnabled.get()); // Requirements
// this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.SEE_CHUNK.node)); this.addRequirements(ReqHasPerm.get(Perm.SEE_CHUNK.node));
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -14,16 +14,27 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsSethome extends FCommand public class CmdFactionsSethome extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsSethome() public CmdFactionsSethome()
{ {
// Aliases
this.addAliases("sethome"); this.addAliases("sethome");
// Args
this.addOptionalArg("faction", "you"); this.addOptionalArg("faction", "you");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node)); this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -15,17 +15,28 @@ import com.massivecraft.mcore.util.Txt;
public class CmdFactionsTitle extends FCommand public class CmdFactionsTitle extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsTitle() public CmdFactionsTitle()
{ {
// Aliases
this.addAliases("title"); this.addAliases("title");
// Args
this.addRequiredArg("player"); this.addRequiredArg("player");
this.addOptionalArg("title", ""); this.addOptionalArg("title", "");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node)); this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));
this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -11,15 +11,25 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsUnclaim extends FCommand public class CmdFactionsUnclaim extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsUnclaim() public CmdFactionsUnclaim()
{ {
// Aliases
this.addAliases("unclaim"); this.addAliases("unclaim");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node)); this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqIsPlayer.get());
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -20,15 +20,25 @@ import com.massivecraft.mcore.ps.PS;
public class CmdFactionsUnclaimall extends FCommand public class CmdFactionsUnclaimall extends FCommand
{ {
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsUnclaimall() public CmdFactionsUnclaimall()
{ {
// Aliases
this.addAliases("unclaimall"); this.addAliases("unclaimall");
// Requirements
this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqFactionsEnabled.get());
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM_ALL.node)); this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM_ALL.node));
this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqHasFaction.get());
this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER));
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void perform() public void perform()

View File

@ -10,10 +10,18 @@ import com.massivecraft.mcore.util.Txt;
public abstract class FCommand extends MCommand public abstract class FCommand extends MCommand
{ {
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public MPlayer msender; public MPlayer msender;
public UPlayer usender; public UPlayer usender;
public Faction usenderFaction; public Faction usenderFaction;
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override @Override
public void fixSenderVars() public void fixSenderVars()
{ {
@ -68,4 +76,5 @@ public abstract class FCommand extends MCommand
return false; return false;
} }
} }

View File

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.RelationParticipator; import com.massivecraft.factions.RelationParticipator;
import com.massivecraft.factions.TerritoryAccess; import com.massivecraft.factions.TerritoryAccess;
@ -21,7 +20,7 @@ public class BoardColl extends Coll<Board> implements BoardInterface
public BoardColl(String name) public BoardColl(String name)
{ {
super(name, Board.class, MStore.getDb(ConfServer.dburi), Factions.get(), false, true, true); super(name, Board.class, MStore.getDb(), Factions.get(), false, true, true);
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -46,7 +46,7 @@ public class BoardColls extends XColls<BoardColl, Board> implements BoardInterfa
@Override @Override
public String getBasename() public String getBasename()
{ {
return Const.COLLECTION_BASENAME_BOARD; return Const.COLLECTION_BOARD;
} }
@Override @Override

View File

@ -8,7 +8,6 @@ import com.massivecraft.mcore.store.Coll;
import com.massivecraft.mcore.store.MStore; import com.massivecraft.mcore.store.MStore;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.FFlag; import com.massivecraft.factions.FFlag;
import com.massivecraft.factions.FPerm; import com.massivecraft.factions.FPerm;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
@ -24,7 +23,7 @@ public class FactionColl extends Coll<Faction>
public FactionColl(String name) public FactionColl(String name)
{ {
super(name, Faction.class, MStore.getDb(ConfServer.dburi), Factions.get()); super(name, Faction.class, MStore.getDb(), Factions.get());
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -42,7 +42,7 @@ public class FactionColls extends XColls<FactionColl, Faction>
@Override @Override
public String getBasename() public String getBasename()
{ {
return Const.COLLECTION_BASENAME_FACTION; return Const.COLLECTION_FACTION;
} }
@Override @Override

View File

@ -2,6 +2,7 @@ package com.massivecraft.factions.entity;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
@ -40,6 +41,12 @@ public class MConf extends Entity<MConf>
return this; return this;
} }
// -------------------------------------------- //
// COMMAND ALIASES
// -------------------------------------------- //
public List<String> aliasesF = MUtil.list("f");
// -------------------------------------------- // // -------------------------------------------- //
// TASKS // TASKS
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.entity; package com.massivecraft.factions.entity;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Const; import com.massivecraft.factions.Const;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.mcore.MCore; import com.massivecraft.mcore.MCore;
@ -17,7 +16,7 @@ public class MConfColl extends Coll<MConf>
public static MConfColl get() { return i; } public static MConfColl get() { return i; }
private MConfColl() private MConfColl()
{ {
super(Const.COLLECTION_BASENAME_MCONF, MConf.class, MStore.getDb(ConfServer.dburi), Factions.get()); super(Const.COLLECTION_MCONF, MConf.class, MStore.getDb(), Factions.get());
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.entity; package com.massivecraft.factions.entity;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Const; import com.massivecraft.factions.Const;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.mcore.store.MStore; import com.massivecraft.mcore.store.MStore;
@ -16,7 +15,7 @@ public class MPlayerColl extends SenderColl<MPlayer>
public static MPlayerColl get() { return i; } public static MPlayerColl get() { return i; }
private MPlayerColl() private MPlayerColl()
{ {
super(Const.COLLECTION_BASENAME_MPLAYER, MPlayer.class, MStore.getDb(ConfServer.dburi), Factions.get()); super(Const.COLLECTION_MPLAYER, MPlayer.class, MStore.getDb(), Factions.get());
} }
} }

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.entity; package com.massivecraft.factions.entity;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.mcore.MCore; import com.massivecraft.mcore.MCore;
import com.massivecraft.mcore.store.Coll; import com.massivecraft.mcore.store.Coll;
@ -14,7 +13,7 @@ public class UConfColl extends Coll<UConf>
public UConfColl(String name) public UConfColl(String name)
{ {
super(name, UConf.class, MStore.getDb(ConfServer.dburi), Factions.get()); super(name, UConf.class, MStore.getDb(), Factions.get());
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -33,7 +33,7 @@ public class UConfColls extends XColls<UConfColl, UConf>
@Override @Override
public String getBasename() public String getBasename()
{ {
return Const.COLLECTION_BASENAME_UCONF; return Const.COLLECTION_UCONF;
} }
@Override @Override

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.entity; package com.massivecraft.factions.entity;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
import com.massivecraft.mcore.mixin.Mixin; import com.massivecraft.mcore.mixin.Mixin;
@ -17,7 +16,7 @@ public class UPlayerColl extends SenderColl<UPlayer>
public UPlayerColl(String name) public UPlayerColl(String name)
{ {
super(name, UPlayer.class, MStore.getDb(ConfServer.dburi), Factions.get()); super(name, UPlayer.class, MStore.getDb(), Factions.get());
} }
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -40,7 +40,7 @@ public class UPlayerColls extends XColls<UPlayerColl, UPlayer>
@Override @Override
public String getBasename() public String getBasename()
{ {
return Const.COLLECTION_BASENAME_UPLAYER; return Const.COLLECTION_UPLAYER;
} }
@Override @Override