boolean to toggle f inspect on and off

This commit is contained in:
Driftay 2020-03-18 14:37:23 -04:00
parent 36c8d53a85
commit 323dce1c4f
3 changed files with 9 additions and 1 deletions

View File

@ -105,6 +105,9 @@ public class Conf {
//AUDIT //AUDIT
public static boolean useAuditSystem = true; public static boolean useAuditSystem = true;
//INSPECT
public static boolean useInspectSystem = true;
//GUI's //GUI's
public static boolean useDisbandGUI = true; public static boolean useDisbandGUI = true;

View File

@ -52,7 +52,6 @@ import java.io.*;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;

View File

@ -1,5 +1,6 @@
package com.massivecraft.factions.cmd; package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
@ -21,6 +22,11 @@ public class CmdInspect extends FCommand {
@Override @Override
public void perform(CommandContext context) { public void perform(CommandContext context) {
if(!Conf.useInspectSystem){
context.fPlayer.msg(TL.GENERIC_DISABLED, "Faction Inspection");
return;
}
if (context.fPlayer.isInspectMode()) { if (context.fPlayer.isInspectMode()) {
context.fPlayer.setInspectMode(false); context.fPlayer.setInspectMode(false);
context.msg(TL.COMMAND_INSPECT_DISABLED_MSG); context.msg(TL.COMMAND_INSPECT_DISABLED_MSG);