Add an option to disable faction only chat
This commit is contained in:
parent
120039b07f
commit
a5a0125195
@ -46,6 +46,8 @@ public class Conf {
|
|||||||
// Disallow joining/leaving/kicking while power is negative
|
// Disallow joining/leaving/kicking while power is negative
|
||||||
public static boolean CanLeaveWithNegativePower = true;
|
public static boolean CanLeaveWithNegativePower = true;
|
||||||
|
|
||||||
|
// Configuration for faction-only chat
|
||||||
|
public static boolean factionOnlyChat = true;
|
||||||
// Configuration on the Faction tag in chat messages.
|
// Configuration on the Faction tag in chat messages.
|
||||||
public static boolean chatTagEnabled = true;
|
public static boolean chatTagEnabled = true;
|
||||||
public static transient boolean chatTagHandledByAnotherPlugin = false;
|
public static transient boolean chatTagHandledByAnotherPlugin = false;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.massivecraft.factions.commands;
|
package com.massivecraft.factions.commands;
|
||||||
|
|
||||||
|
import com.massivecraft.factions.Conf;
|
||||||
|
|
||||||
public class FCommandChat extends FBaseCommand {
|
public class FCommandChat extends FBaseCommand {
|
||||||
|
|
||||||
public FCommandChat() {
|
public FCommandChat() {
|
||||||
@ -11,6 +13,10 @@ public class FCommandChat extends FBaseCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform() {
|
public void perform() {
|
||||||
|
if ( ! Conf.factionOnlyChat )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ( ! assertHasFaction()) {
|
if ( ! assertHasFaction()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user