From a5a012519580c976fa4893037f70df1842b5c8f0 Mon Sep 17 00:00:00 2001 From: Elias Woods Date: Sat, 10 Sep 2011 00:26:15 -0400 Subject: [PATCH] Add an option to disable faction only chat --- src/com/massivecraft/factions/Conf.java | 2 ++ src/com/massivecraft/factions/commands/FCommandChat.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index ff0664ce..ede5d5f9 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -46,6 +46,8 @@ public class Conf { // Disallow joining/leaving/kicking while power is negative public static boolean CanLeaveWithNegativePower = true; + // Configuration for faction-only chat + public static boolean factionOnlyChat = true; // Configuration on the Faction tag in chat messages. public static boolean chatTagEnabled = true; public static transient boolean chatTagHandledByAnotherPlugin = false; diff --git a/src/com/massivecraft/factions/commands/FCommandChat.java b/src/com/massivecraft/factions/commands/FCommandChat.java index c7b2157a..57799879 100644 --- a/src/com/massivecraft/factions/commands/FCommandChat.java +++ b/src/com/massivecraft/factions/commands/FCommandChat.java @@ -1,5 +1,7 @@ package com.massivecraft.factions.commands; +import com.massivecraft.factions.Conf; + public class FCommandChat extends FBaseCommand { public FCommandChat() { @@ -11,6 +13,10 @@ public class FCommandChat extends FBaseCommand { @Override public void perform() { + if ( ! Conf.factionOnlyChat ) + { + return; + } if ( ! assertHasFaction()) { return; }