fix an NPE and other changes
This commit is contained in:
parent
4f38bfa949
commit
fb3204ddb1
@ -29,7 +29,7 @@ public class CmdAutoHelp extends FCommand {
|
||||
|
||||
for (FCommand scmd : pcmd.subCommands) {
|
||||
if (scmd.visibility == CommandVisibility.VISIBLE) {
|
||||
lines.add(scmd.getUseageTemplate(context, true));
|
||||
lines.add(scmd.getUsageTemplate(context, true));
|
||||
}
|
||||
// TODO deal with other visibilities
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class CmdCreate extends FCommand {
|
||||
follower.msg(TL.COMMAND_CREATE_CREATED, context.fPlayer.getName(), faction.getTag(follower));
|
||||
}
|
||||
}
|
||||
context.msg(TL.COMMAND_CREATE_YOUSHOULD, FactionsPlugin.getInstance().cmdBase.cmdDescription.getUseageTemplate(context));
|
||||
context.msg(TL.COMMAND_CREATE_YOUSHOULD, FactionsPlugin.getInstance().cmdBase.cmdDescription.getUsageTemplate(context));
|
||||
if (Conf.econEnabled) Econ.setBalance(faction.getAccountId(), Conf.econFactionStartingBalance);
|
||||
if (Conf.logFactionCreate)
|
||||
FactionsPlugin.getInstance().log(context.fPlayer.getName() + TL.COMMAND_CREATE_CREATEDLOG.toString() + tag);
|
||||
|
@ -64,7 +64,7 @@ public class CmdDeinvite extends FCommand {
|
||||
|
||||
if (you.getFaction() == context.faction) {
|
||||
context.msg(TL.COMMAND_DEINVITE_ALREADYMEMBER, you.getName(), context.faction.getTag());
|
||||
context.msg(TL.COMMAND_DEINVITE_MIGHTWANT, FactionsPlugin.getInstance().cmdBase.cmdKick.getUseageTemplate(context));
|
||||
context.msg(TL.COMMAND_DEINVITE_MIGHTWANT, FactionsPlugin.getInstance().cmdBase.cmdKick.getUsageTemplate(context));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -75,28 +75,28 @@ public class CmdHelp extends FCommand {
|
||||
ArrayList<String> pageLines;
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdHelp.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdList.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdShow.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPower.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdJoin.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdLeave.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdChat.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdToggleAllianceChat.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdHome.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdHelp.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdList.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdShow.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPower.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdJoin.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdLeave.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdChat.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdToggleAllianceChat.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdHome.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_NEXTCREATE.toString()));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdCreate.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdDescription.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdTag.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdCreate.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdDescription.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdTag.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_INVITATIONS.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdOpen.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdInvite.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdDeinvite.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdOpen.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdInvite.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdDeinvite.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_HOME.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSethome.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSethome.getUsageTemplate(context));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
if (Econ.isSetup() && Conf.econEnabled && Conf.bankEnabled) {
|
||||
@ -106,7 +106,7 @@ public class CmdHelp extends FCommand {
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_BANK_2.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_BANK_3.toString()));
|
||||
pageLines.add("");
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdMoney.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdMoney.getUsageTemplate(context));
|
||||
pageLines.add("");
|
||||
pageLines.add("");
|
||||
pageLines.add("");
|
||||
@ -114,36 +114,36 @@ public class CmdHelp extends FCommand {
|
||||
}
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdClaim.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdAutoClaim.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdUnclaim.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdUnclaimall.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdKick.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdMod.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdAdmin.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdTitle.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSB.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSeeChunk.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdStatus.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdClaim.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdAutoClaim.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdUnclaim.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdUnclaimall.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdKick.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdMod.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdAdmin.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdTitle.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSB.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSeeChunk.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdStatus.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_PLAYERTITLES.toString()));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdMap.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdBoom.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdOwner.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdOwnerList.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdMap.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdBoom.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdOwner.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdOwnerList.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_OWNERSHIP_1.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_OWNERSHIP_2.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_OWNERSHIP_3.toString()));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdDisband.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdDisband.getUsageTemplate(context));
|
||||
pageLines.add("");
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdRelationAlly.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdRelationNeutral.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdRelationEnemy.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdRelationAlly.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdRelationNeutral.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdRelationEnemy.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_RELATIONS_1.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_RELATIONS_2.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_RELATIONS_3.toString()));
|
||||
@ -176,32 +176,32 @@ public class CmdHelp extends FCommand {
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(TL.COMMAND_HELP_MOAR_1.toString());
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdBypass.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdBypass.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_ADMIN_1.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_ADMIN_2.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_ADMIN_3.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSafeunclaimall.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdWarunclaimall.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSafeunclaimall.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdWarunclaimall.getUsageTemplate(context));
|
||||
//TODO:TL
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse("<i>Note: " + FactionsPlugin.getInstance().cmdBase.cmdUnclaim.getUseageTemplate(context) + FactionsPlugin.getInstance().txt.parse("<i>") + " works on safe/war zones as well."));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPeaceful.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse("<i>Note: " + FactionsPlugin.getInstance().cmdBase.cmdUnclaim.getUsageTemplate(context) + FactionsPlugin.getInstance().txt.parse("<i>") + " works on safe/war zones as well."));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPeaceful.getUsageTemplate(context));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_MOAR_2.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdChatSpy.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPermanent.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPermanentPower.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPowerBoost.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdConfig.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdChatSpy.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPermanent.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPermanentPower.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdPowerBoost.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdConfig.getUsageTemplate(context));
|
||||
helpPages.add(pageLines);
|
||||
|
||||
pageLines = new ArrayList<>();
|
||||
pageLines.add(FactionsPlugin.getInstance().txt.parse(TL.COMMAND_HELP_MOAR_3.toString()));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdLock.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdReload.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSaveAll.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdVersion.getUseageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdLock.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdReload.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdSaveAll.getUsageTemplate(context));
|
||||
pageLines.add(FactionsPlugin.getInstance().cmdBase.cmdVersion.getUsageTemplate(context));
|
||||
helpPages.add(pageLines);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class CmdHome extends FCommand {
|
||||
|
||||
if (!context.faction.hasHome()) {
|
||||
context.msg(TL.COMMAND_HOME_NOHOME.toString() + (context.fPlayer.getRole().value < Role.MODERATOR.value ? TL.GENERIC_ASKYOURLEADER.toString() : TL.GENERIC_YOUSHOULD.toString()));
|
||||
context.sendMessage(FactionsPlugin.getInstance().cmdBase.cmdSethome.getUseageTemplate(context));
|
||||
context.sendMessage(FactionsPlugin.getInstance().cmdBase.cmdSethome.getUsageTemplate(context));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class CmdInvite extends FCommand {
|
||||
|
||||
if (target.getFaction() == context.faction) {
|
||||
context.msg(TL.COMMAND_INVITE_ALREADYMEMBER, target.getName(), context.faction.getTag());
|
||||
context.msg(TL.GENERIC_YOUMAYWANT.toString() + FactionsPlugin.getInstance().cmdBase.cmdKick.getUseageTemplate(context));
|
||||
context.msg(TL.GENERIC_YOUMAYWANT.toString() + FactionsPlugin.getInstance().cmdBase.cmdKick.getUsageTemplate(context));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class CmdKick extends FCommand {
|
||||
|
||||
if (context.fPlayer == toKick) {
|
||||
context.msg(TL.COMMAND_KICK_SELF);
|
||||
context.msg(TL.GENERIC_YOUMAYWANT.toString() + FactionsPlugin.getInstance().cmdBase.cmdLeave.getUseageTemplate(context));
|
||||
context.msg(TL.GENERIC_YOUMAYWANT.toString() + FactionsPlugin.getInstance().cmdBase.cmdLeave.getUsageTemplate(context));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,10 @@ public class CmdPaypalSee extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (context.args.size() == 0) {
|
||||
if (context.fPlayer.getFaction().getPaypal().isEmpty()) {
|
||||
if (context.fPlayer.getFaction().getPaypal() == null) {
|
||||
context.msg(TL.COMMAND_PAYPAL_NOTSET);
|
||||
} else {
|
||||
context.msg(TL.PAYPALSEE_PLAYER_PAYPAL, context.fPlayer.getFaction().getPaypal());
|
||||
@ -34,7 +36,7 @@ public class CmdPaypalSee extends FCommand {
|
||||
if (context.fPlayer.isAdminBypassing()) {
|
||||
Faction faction = context.argAsFaction(0);
|
||||
if (faction != null) {
|
||||
if (faction.getPaypal().isEmpty()) {
|
||||
if (faction.getPaypal() == null) {
|
||||
context.msg(TL.COMMAND_PAYPALSEE_FACTION_NOTSET, faction.getTag());
|
||||
} else {
|
||||
context.msg(TL.COMMAND_PAYPALSEE_FACTION_PAYPAL.toString(), faction.getTag(), faction.getPaypal());
|
||||
@ -44,7 +46,7 @@ public class CmdPaypalSee extends FCommand {
|
||||
context.msg(TL.GENERIC_NOPERMISSION, "see another factions paypal.");
|
||||
}
|
||||
} else {
|
||||
context.msg(FactionsPlugin.getInstance().cmdBase.cmdPaypalSee.getUseageTemplate(context));
|
||||
context.msg(FactionsPlugin.getInstance().cmdBase.cmdPaypalSee.getUsageTemplate(context));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class CmdPaypalSet extends FCommand {
|
||||
context.msg(TL.GENERIC_NOPERMISSION, "set another factions paypal!");
|
||||
}
|
||||
} else {
|
||||
context.msg(FactionsPlugin.getInstance().cmdBase.cmdPaypalSet.getUseageTemplate(context));
|
||||
context.msg(FactionsPlugin.getInstance().cmdBase.cmdPaypalSet.getUsageTemplate(context));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class CmdSethome extends FCommand {
|
||||
faction.setHome(context.player.getLocation());
|
||||
|
||||
faction.msg(TL.COMMAND_SETHOME_SET, context.fPlayer.describeTo(context.faction, true));
|
||||
faction.sendMessage(FactionsPlugin.getInstance().cmdBase.cmdHome.getUseageTemplate(context));
|
||||
faction.sendMessage(FactionsPlugin.getInstance().cmdBase.cmdHome.getUsageTemplate(context));
|
||||
if (faction != context.faction) {
|
||||
context.msg(TL.COMMAND_SETHOME_SETOTHER, faction.getTag(context.fPlayer));
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public abstract class FCommand {
|
||||
if (context.args.size() < this.requiredArgs.size()) {
|
||||
if (context.sender != null) {
|
||||
context.msg(TL.GENERIC_ARGS_TOOFEW);
|
||||
context.sender.sendMessage(this.getUseageTemplate(context));
|
||||
context.sender.sendMessage(this.getUsageTemplate(context));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -106,7 +106,7 @@ public abstract class FCommand {
|
||||
// Get the to many string slice
|
||||
List<String> theToMany = context.args.subList(this.requiredArgs.size() + this.optionalArgs.size(), context.args.size());
|
||||
context.msg(TL.GENERIC_ARGS_TOOMANY, TextUtil.implode(theToMany, " "));
|
||||
context.sender.sendMessage(this.getUseageTemplate(context));
|
||||
context.sender.sendMessage(this.getUsageTemplate(context));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -200,7 +200,7 @@ public abstract class FCommand {
|
||||
/*
|
||||
Help and Usage information
|
||||
*/
|
||||
public String getUseageTemplate(CommandContext context, boolean addShortHelp) {
|
||||
public String getUsageTemplate(CommandContext context, boolean addShortHelp) {
|
||||
StringBuilder ret = new StringBuilder();
|
||||
ret.append(FactionsPlugin.getInstance().color(TL.COMMAND_USEAGE_TEMPLATE_COLOR.toString()));
|
||||
ret.append('/');
|
||||
@ -241,8 +241,8 @@ public abstract class FCommand {
|
||||
return ret.toString();
|
||||
}
|
||||
|
||||
public String getUseageTemplate(CommandContext context) {
|
||||
return getUseageTemplate(context, false);
|
||||
public String getUsageTemplate(CommandContext context) {
|
||||
return getUsageTemplate(context, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public class EssentialsHomeHandler implements Listener {
|
||||
Faction factionAt = Board.getInstance().getFactionAt(floc);
|
||||
if (factionAt.equals(faction) && factionAt.isNormal()) {
|
||||
user.delHome(homeName);
|
||||
FactionsPlugin.getInstance().log(Level.INFO, "FactionLeaveEvent: Removing home %s, player %s, in territory of %s", homeName, event.getfPlayer().getName(), faction.getTag());
|
||||
FactionsPlugin.getInstance().log(Level.INFO, "Removing home %s, player %s, in territory of %s", homeName, event.getfPlayer().getName(), faction.getTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +259,6 @@ public class FactionsBlockListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onHopperPlace(BlockPlaceEvent e) {
|
||||
|
||||
if (e.getItemInHand().getType() != Material.HOPPER && !FactionsPlugin.getInstance().getConfig().getBoolean("fvault.No-Hoppers-near-vault")) {
|
||||
return;
|
||||
}
|
||||
|
@ -329,6 +329,6 @@ public abstract class MPlugin extends JavaPlugin {
|
||||
}
|
||||
|
||||
public void log(Level level, Object msg) {
|
||||
getLogger().log(level, "[" + this.getDescription().getFullName() + "] " + msg);
|
||||
getLogger().log(level, "[" + this.getDescription().getVersion() + "] " + msg); // Full name is really ugly
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user