Silence the create and disband actions. The general public need not know. It will just be spammy.
This commit is contained in:
parent
b65d76f4e9
commit
9503baff6e
@ -6,11 +6,9 @@ import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.cmd.req.ReqHasntFaction;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.FactionColl;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.entity.MPlayerColl;
|
||||
import com.massivecraft.factions.event.EventFactionsCreate;
|
||||
import com.massivecraft.factions.event.EventFactionsMembershipChange;
|
||||
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
|
||||
@ -80,13 +78,10 @@ public class CmdFactionsCreate extends FactionsCommand
|
||||
// NOTE: join event cannot be cancelled or you'll have an empty faction
|
||||
|
||||
// Inform
|
||||
for (MPlayer follower : MPlayerColl.get().getAllOnline())
|
||||
{
|
||||
follower.msg("%s<i> created a new faction %s", msender.describeTo(follower, true), faction.getName(follower));
|
||||
}
|
||||
|
||||
msg("<i>You created the faction %s", faction.getName(msender));
|
||||
msg("<i>You should now: %s", Factions.get().getOuterCmdFactions().cmdFactionsDescription.getUseageTemplate());
|
||||
|
||||
// Log
|
||||
if (MConf.get().logFactionCreate)
|
||||
{
|
||||
Factions.get().log(msender.getName()+" created a new faction: "+newName);
|
||||
|
@ -5,7 +5,6 @@ import com.massivecraft.factions.entity.FactionColl;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.entity.MPlayerColl;
|
||||
import com.massivecraft.factions.event.EventFactionsDisband;
|
||||
import com.massivecraft.factions.event.EventFactionsMembershipChange;
|
||||
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
|
||||
@ -70,25 +69,24 @@ public class CmdFactionsDisband extends FactionsCommand
|
||||
membershipChangeEvent.run();
|
||||
}
|
||||
|
||||
// Inform all players
|
||||
for (MPlayer mplayer : MPlayerColl.get().getAllOnline())
|
||||
// Inform
|
||||
for (MPlayer mplayer : faction.getMPlayersWhereOnline(true))
|
||||
{
|
||||
String who = msender.describeTo(mplayer);
|
||||
if (mplayer.getFaction() == faction)
|
||||
{
|
||||
mplayer.msg("<h>%s<i> disbanded your faction.", who);
|
||||
}
|
||||
else
|
||||
{
|
||||
mplayer.msg("<h>%s<i> disbanded the faction %s.", who, faction.getName(mplayer));
|
||||
}
|
||||
mplayer.msg("<h>%s<i> disbanded your faction.", msender.describeTo(mplayer));
|
||||
}
|
||||
|
||||
if (msenderFaction != faction)
|
||||
{
|
||||
msender.msg("<i>You disbanded <h>%s<i>." , faction.describeTo(msender));
|
||||
}
|
||||
|
||||
// Log
|
||||
if (MConf.get().logFactionDisband)
|
||||
{
|
||||
Factions.get().log(Txt.parse("<i>The faction <h>%s <i>(<h>%s<i>) was disbanded by <h>%s<i>.", faction.getName(), faction.getId(), msender.getDisplayName(IdUtil.getConsole())));
|
||||
}
|
||||
|
||||
// Apply
|
||||
faction.detach();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user