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");
|
FactionsPlugin.instance.getFlogManager().log(targetFaction, FLogType.RANK_EDIT, context.fPlayer.getName(), fyou.getName(), ChatColor.RED + "Admin");
|
||||||
|
|
||||||
// Inform all players
|
// Inform all players
|
||||||
|
if(FactionsPlugin.instance.getConfig().getBoolean("faction-leader-broadcast")) {
|
||||||
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
|
||||||
fplayer.msg(TL.COMMAND_ADMIN_PROMOTED,
|
fplayer.msg(TL.COMMAND_ADMIN_PROMOTED, context.player == null ? TL.GENERIC_SERVERADMIN.toString() : context.fPlayer.describeTo(fplayer, true), fyou.describeTo(fplayer), targetFaction.describeTo(fplayer));
|
||||||
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) {
|
private void setRole(FPlayer fp, Role r) {
|
||||||
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, () -> {
|
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, () -> fp.setRole(r));
|
||||||
fp.setRole(r);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void promoteNewLeader(Faction f) {
|
private void promoteNewLeader(Faction f) {
|
||||||
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, () -> {
|
FactionsPlugin.getInstance().getServer().getScheduler().runTask(FactionsPlugin.instance, (Runnable) f::promoteNewLeader);
|
||||||
f.promoteNewLeader();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TL getUsageTranslation() {
|
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-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-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-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