From 323dce1c4f59a9812413b62060ad867b265c780b Mon Sep 17 00:00:00 2001 From: Driftay Date: Wed, 18 Mar 2020 14:37:23 -0400 Subject: [PATCH] boolean to toggle f inspect on and off --- src/main/java/com/massivecraft/factions/Conf.java | 3 +++ src/main/java/com/massivecraft/factions/FactionsPlugin.java | 1 - src/main/java/com/massivecraft/factions/cmd/CmdInspect.java | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index 526c9eb3..eb6e9fa8 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -105,6 +105,9 @@ public class Conf { //AUDIT public static boolean useAuditSystem = true; + //INSPECT + public static boolean useInspectSystem = true; + //GUI's public static boolean useDisbandGUI = true; diff --git a/src/main/java/com/massivecraft/factions/FactionsPlugin.java b/src/main/java/com/massivecraft/factions/FactionsPlugin.java index fd5b0d00..de1a60f0 100755 --- a/src/main/java/com/massivecraft/factions/FactionsPlugin.java +++ b/src/main/java/com/massivecraft/factions/FactionsPlugin.java @@ -52,7 +52,6 @@ import java.io.*; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.nio.file.Files; -import java.nio.file.OpenOption; import java.nio.file.Paths; import java.util.*; import java.util.concurrent.atomic.AtomicReference; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java b/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java index a752e731..6458ac67 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.Conf; import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.zcore.util.TL; @@ -21,6 +22,11 @@ public class CmdInspect extends FCommand { @Override public void perform(CommandContext context) { + if(!Conf.useInspectSystem){ + context.fPlayer.msg(TL.GENERIC_DISABLED, "Faction Inspection"); + return; + } + if (context.fPlayer.isInspectMode()) { context.fPlayer.setInspectMode(false); context.msg(TL.COMMAND_INSPECT_DISABLED_MSG);