A few command improvements

This commit is contained in:
Magnus Ulf 2019-01-02 00:43:39 +01:00
parent c955ddc552
commit 3827d2bf06
5 changed files with 11 additions and 8 deletions

View File

@ -25,6 +25,7 @@ public class CmdFactions extends FactionsCommand
public CmdFactionsList cmdFactionsList = new CmdFactionsList();
public CmdFactionsFaction cmdFactionsFaction = new CmdFactionsFaction();
public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer();
public CmdFactionsStatus cmdFactionsStatus = new CmdFactionsStatus();
public CmdFactionsJoin cmdFactionsJoin = new CmdFactionsJoin();
public CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave();
public CmdFactionsHome cmdFactionsHome = new CmdFactionsHome();
@ -43,7 +44,6 @@ public class CmdFactions extends FactionsCommand
public CmdFactionsSeeChunk cmdFactionsSeeChunk = new CmdFactionsSeeChunk();
public CmdFactionsSeeChunkOld cmdFactionsSeeChunkOld = new CmdFactionsSeeChunkOld();
public CmdFactionsTerritorytitles cmdFactionsTerritorytitles = new CmdFactionsTerritorytitles();
public CmdFactionsStatus cmdFactionsStatus = new CmdFactionsStatus();
public CmdFactionsClaim cmdFactionsClaim = new CmdFactionsClaim();
public CmdFactionsUnclaim cmdFactionsUnclaim = new CmdFactionsUnclaim();
public CmdFactionsAccess cmdFactionsAccess = new CmdFactionsAccess();

View File

@ -37,6 +37,9 @@ public class CmdFactionsPlayer extends FactionsCommand
// INFO: Title
message(Txt.titleize("Player " + mplayer.describeTo(msender)));
// INFO: Rank
msg("<a>Rank: <v>%s", mplayer.getRank().getDisplayName(sender));
// INFO: Power (as progress bar)
double progressbarQuota = 0;

View File

@ -27,7 +27,7 @@ public class CmdFactionsRankEdit extends FactionsCommand
if (!msender.getRank().isLeader())
{
throw new MassiveException().addMsg("<b>Only the leader can create ranks.");
throw new MassiveException().addMsg("<b>Only the leader can create, edit or delete ranks.");
}
}

View File

@ -18,9 +18,6 @@ public class CmdFactionsSethome extends FactionsCommandHome
public CmdFactionsSethome()
{
// Aliases
this.addAliases("sethome");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");

View File

@ -20,7 +20,7 @@ public class CmdFactionsTitle extends FactionsCommand
{
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeString.get(), "title", "", true);
this.addParameter(TypeString.get(), "title", "none", true);
}
// -------------------------------------------- //
@ -46,8 +46,11 @@ public class CmdFactionsTitle extends FactionsCommand
// Rank Check
if (!msender.isOverriding() && you.getRank().isMoreThan(msender.getRank()))
{
msg("<b>You can not edit titles for higher ranks.");
return;
throw new MassiveException().addMsg("<b>You can not edit titles for higher ranks.");
}
if (!msender.isOverriding() && you.getRank() == msender.getRank())
{
throw new MassiveException().addMsg("<b>You can't edit titles of people with the same rank as yourself.");
}
// Event