MCore change and disable name change broadcasting per default

This commit is contained in:
Olof Larsson 2014-01-05 11:55:45 +01:00
parent d4c5140c8b
commit b951493ea1
3 changed files with 12 additions and 3 deletions

View File

@ -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();

View File

@ -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)

View File

@ -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
// -------------------------------------------- // // -------------------------------------------- //