mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-05 01:59:46 +01:00
DisplayName per Beholder
This commit is contained in:
parent
56768aca55
commit
3a3d5cd4fb
@ -5,6 +5,7 @@ import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.factions.cmd.req.ReqFactionsEnabled;
|
||||
import com.massivecraft.factions.cmd.req.ReqHasFaction;
|
||||
import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.factions.event.EventFactionsDescriptionChange;
|
||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||
import com.massivecraft.massivecore.mixin.Mixin;
|
||||
@ -51,7 +52,10 @@ public class CmdFactionsDescription extends FCommand
|
||||
usenderFaction.setDescription(newDescription);
|
||||
|
||||
// Inform
|
||||
usenderFaction.msg("<i>%s <i>set your faction description to:\n%s", Mixin.getDisplayName(sender), usenderFaction.getDescription());
|
||||
for (UPlayer follower : usenderFaction.getUPlayers())
|
||||
{
|
||||
follower.msg("<i>%s <i>set your faction description to:\n%s", Mixin.getDisplayName(sender, follower), usenderFaction.getDescription());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import com.massivecraft.factions.FPerm;
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.Perm;
|
||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||
import com.massivecraft.massivecore.util.IdUtil;
|
||||
import com.massivecraft.massivecore.util.Txt;
|
||||
|
||||
public class CmdFactionsDisband extends FCommand
|
||||
@ -87,7 +88,7 @@ public class CmdFactionsDisband extends FCommand
|
||||
|
||||
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(), usender.getDisplayName()));
|
||||
Factions.get().log(Txt.parse("<i>The faction <h>%s <i>(<h>%s<i>) was disbanded by <h>%s<i>.", faction.getName(), faction.getId(), usender.getDisplayName(IdUtil.getConsole())));
|
||||
}
|
||||
|
||||
faction.detach();
|
||||
|
@ -14,6 +14,7 @@ import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.event.EventFactionsMembershipChange;
|
||||
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
|
||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||
import com.massivecraft.massivecore.util.IdUtil;
|
||||
|
||||
public class CmdFactionsKick extends FCommand
|
||||
{
|
||||
@ -84,7 +85,7 @@ public class CmdFactionsKick extends FCommand
|
||||
|
||||
if (MConf.get().logFactionKick)
|
||||
{
|
||||
Factions.get().log(usender.getDisplayName() + " kicked " + uplayer.getName() + " from the faction " + uplayerFaction.getName());
|
||||
Factions.get().log(usender.getDisplayName(IdUtil.getConsole()) + " kicked " + uplayer.getName() + " from the faction " + uplayerFaction.getName());
|
||||
}
|
||||
|
||||
// Apply
|
||||
|
@ -260,7 +260,7 @@ public class UPlayer extends SenderEntity<UPlayer> implements EconomyParticipato
|
||||
factionNameDesc = faction.getName();
|
||||
}
|
||||
|
||||
Factions.get().log(Txt.parse("<i>setFactionId moved <h>%s <i>aka <h>%s <i>from <h>%s <i>aka <h>%s <i>to <h>%s <i>aka <h>%s<i>.", this.getId(), Mixin.getDisplayName(this.getId()), oldFactionIdDesc, oldFactionNameDesc, factionIdDesc, factionNameDesc));
|
||||
Factions.get().log(Txt.parse("<i>setFactionId moved <h>%s <i>aka <h>%s <i>from <h>%s <i>aka <h>%s <i>to <h>%s <i>aka <h>%s<i>.", this.getId(), this.getDisplayName(IdUtil.getConsole()), oldFactionIdDesc, oldFactionNameDesc, factionIdDesc, factionNameDesc));
|
||||
|
||||
// Mark as changed
|
||||
this.changed();
|
||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Rel;
|
||||
import com.massivecraft.massivecore.mixin.Mixin;
|
||||
import com.massivecraft.massivecore.store.MStore;
|
||||
import com.massivecraft.massivecore.store.SenderColl;
|
||||
import com.massivecraft.massivecore.util.IdUtil;
|
||||
import com.massivecraft.massivecore.util.TimeUnit;
|
||||
import com.massivecraft.massivecore.util.Txt;
|
||||
|
||||
@ -34,7 +35,7 @@ public class UPlayerColl extends SenderColl<UPlayer>
|
||||
|
||||
uplayer.resetFactionData();
|
||||
|
||||
String message = Txt.parse("<i>Reset data for <h>%s <i>in <h>%s <i>universe. Unknown factionId <h>%s", uplayer.getDisplayName(), universe, factionId);
|
||||
String message = Txt.parse("<i>Reset data for <h>%s <i>in <h>%s <i>universe. Unknown factionId <h>%s", uplayer.getDisplayName(IdUtil.getConsole()), universe, factionId);
|
||||
Factions.get().log(message);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user