MCore change and disable name change broadcasting per default
This commit is contained in:
parent
d4c5140c8b
commit
b951493ea1
@ -144,9 +144,9 @@ public class Factions extends MPlugin
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Schedule recurring non-tps-dependent tasks
|
// Schedule recurring non-tps-dependent tasks
|
||||||
TaskPlayerPowerUpdate.get().schedule(this);
|
TaskPlayerPowerUpdate.get().activate(this);
|
||||||
TaskPlayerDataRemove.get().schedule(this);
|
TaskPlayerDataRemove.get().activate(this);
|
||||||
TaskEconLandReward.get().schedule(this);
|
TaskEconLandReward.get().activate(this);
|
||||||
|
|
||||||
// Register built in chat modifiers
|
// Register built in chat modifiers
|
||||||
ChatModifierLc.get().register();
|
ChatModifierLc.get().register();
|
||||||
|
@ -10,6 +10,7 @@ import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast;
|
|||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.FactionColl;
|
import com.massivecraft.factions.entity.FactionColl;
|
||||||
import com.massivecraft.factions.entity.FactionColls;
|
import com.massivecraft.factions.entity.FactionColls;
|
||||||
|
import com.massivecraft.factions.entity.UConf;
|
||||||
import com.massivecraft.factions.event.FactionsEventNameChange;
|
import com.massivecraft.factions.event.FactionsEventNameChange;
|
||||||
import com.massivecraft.factions.util.MiscUtil;
|
import com.massivecraft.factions.util.MiscUtil;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
@ -74,6 +75,8 @@ public class CmdFactionsName extends FCommand
|
|||||||
|
|
||||||
// Inform
|
// Inform
|
||||||
usenderFaction.msg("%s<i> changed your faction name to %s", usender.describeTo(usenderFaction, true), usenderFaction.getName(usenderFaction));
|
usenderFaction.msg("%s<i> changed your faction name to %s", usender.describeTo(usenderFaction, true), usenderFaction.getName(usenderFaction));
|
||||||
|
|
||||||
|
if (!UConf.get(usender).broadcastNameChange) return;
|
||||||
for (Faction faction : FactionColls.get().get(usenderFaction).getAll())
|
for (Faction faction : FactionColls.get().get(usenderFaction).getAll())
|
||||||
{
|
{
|
||||||
if (faction == usenderFaction)
|
if (faction == usenderFaction)
|
||||||
|
@ -83,6 +83,12 @@ public class UConf extends Entity<UConf>
|
|||||||
public Map<FFlag, Boolean> defaultFactionFlags = FFlag.getDefaultDefaults();
|
public Map<FFlag, Boolean> defaultFactionFlags = FFlag.getDefaultDefaults();
|
||||||
public Map<FPerm, Set<Rel>> defaultFactionPerms = FPerm.getDefaultDefaults();
|
public Map<FPerm, Set<Rel>> defaultFactionPerms = FPerm.getDefaultDefaults();
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// MESSAGES
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
public boolean broadcastNameChange = false;
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// POWER
|
// POWER
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
Loading…
Reference in New Issue
Block a user