Addressed Issue: https://github.com/SaberLLC/Saber-Factions/issues/69
This commit is contained in:
parent
6205bbca9f
commit
7ea81a6c10
@ -86,24 +86,20 @@ public class CmdAdmin extends FCommand {
|
||||
FactionsPlugin.instance.getFlogManager().log(targetFaction, FLogType.RANK_EDIT, context.fPlayer.getName(), fyou.getName(), ChatColor.RED + "Admin");
|
||||
|
||||
// Inform all players
|
||||
if(FactionsPlugin.instance.getConfig().getBoolean("faction-leader-broadcast")) {
|
||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
||||
fplayer.msg(TL.COMMAND_ADMIN_PROMOTED,
|
||||
context.player == null ? TL.GENERIC_SERVERADMIN.toString() : context.fPlayer.describeTo(fplayer, true),
|
||||
fyou.describeTo(fplayer), targetFaction.describeTo(fplayer));
|
||||
fplayer.msg(TL.COMMAND_ADMIN_PROMOTED, context.player == null ? TL.GENERIC_SERVERADMIN.toString() : context.fPlayer.describeTo(fplayer, true), fyou.describeTo(fplayer), targetFaction.describeTo(fplayer));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setRole(FPlayer fp, Role r) {
|
||||
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, () -> {
|
||||
fp.setRole(r);
|
||||
});
|
||||
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, () -> fp.setRole(r));
|
||||
}
|
||||
|
||||
private void promoteNewLeader(Faction f) {
|
||||
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, () -> {
|
||||
f.promoteNewLeader();
|
||||
});
|
||||
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, (Runnable) f::promoteNewLeader);
|
||||
}
|
||||
|
||||
public TL getUsageTranslation() {
|
||||
|
@ -600,6 +600,7 @@ fwarp-gui:
|
||||
faction-creation-broadcast: true #Disabling this will not make faction creation broadcasts appear in chat.
|
||||
faction-disband-broadcast: true #Disabling this will not make faction disband broadcasts appear in chat.
|
||||
faction-open-broadcast: true #Disabling this will not make faction open broadcasts appear in chat.
|
||||
faction-leader-broadcast: true #Disabling this will not make leader changes appear in chat.
|
||||
|
||||
############################################################
|
||||
# +------------------------------------------------------+ #
|
||||
|
Loading…
Reference in New Issue
Block a user