MassiveCore - Object Titles and Mixed Messages

This commit is contained in:
Olof Larsson
2016-03-15 20:43:54 +01:00
parent 7c131f270b
commit f03733f488
12 changed files with 51 additions and 29 deletions

View File

@@ -53,7 +53,10 @@ public abstract class CmdFactionsAccessAbstract extends FactionsCommand
public void sendAccessInfo()
{
message(Txt.titleize("Access at " + chunk.toString(PSFormatHumanSpace.get())));
Object title = "Access at " + chunk.toString(PSFormatHumanSpace.get());
title = Txt.titleize(title);
message(title);
msg("<k>Host Faction: %s", hostFaction.describeTo(msender, true));
msg("<k>Host Faction Allowed: %s", ta.isHostFactionAllowed() ? Txt.parse("<lime>TRUE") : Txt.parse("<rose>FALSE"));
msg("<k>Granted Players: %s", describeRelationParticipators(ta.getGrantedMPlayers(), msender));

View File

@@ -34,7 +34,9 @@ public class CmdFactionsExpansions extends FactionsCommand
event.run();
// Title
msg(Txt.titleize("Factions Expansions"));
Object title = "Factions Expansions";
title = Txt.titleize(title);
message(title);
// Lines
for (Entry<String, Boolean> entry : event.getExpansions().entrySet())

View File

@@ -45,7 +45,7 @@ public class CmdFactionsFlagShow extends FactionsCommand
Collection<MFlag> mflags = this.readArg(MFlag.getAll());
// Create messages
List<String> messages = new ArrayList<String>();
List<Object> messages = new ArrayList<>();
messages.add(Txt.titleize("Flag for " + faction.describeTo(msender, true)));
for (MFlag mflag : mflags)
{

View File

@@ -65,7 +65,7 @@ public class CmdFactionsMap extends FactionsCommand
public void showMap(int width, int height)
{
Location location = me.getLocation();
List<String> message = BoardColl.get().getMap(msenderFaction, PS.valueOf(location), location.getYaw(), width, height);
List<Object> message = BoardColl.get().getMap(msenderFaction, PS.valueOf(location), location.getYaw(), width, height);
message(message);
}

View File

@@ -84,7 +84,7 @@ public class CmdFactionsPermSet extends FactionsCommand
}
// Create messages
List<String> messages = new ArrayList<String>();
List<Object> messages = new ArrayList<>();
// Inform sender
messages.add(Txt.titleize("Perm for " + faction.describeTo(msender, true)));

View File

@@ -45,7 +45,7 @@ public class CmdFactionsPermShow extends FactionsCommand
Collection<MPerm> mperms = this.readArg(MPerm.getAll());
// Create messages
List<String> messages = new ArrayList<String>();
List<Object> messages = new ArrayList<>();
messages.add(Txt.titleize("Perm for " + faction.describeTo(msender, true)));
messages.add(MPerm.getStateHeaders());

View File

@@ -44,7 +44,7 @@ public class CmdFactionsPlayer extends FactionsCommand
MPlayer mplayer = this.readArg(msender);
// INFO: Title
msg(Txt.titleize("Player " + mplayer.describeTo(msender)));
message(Txt.titleize("Player " + mplayer.describeTo(msender)));
// INFO: Power (as progress bar)
double progressbarQuota = 0;