Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Add option to disable commands
Dieser Commit ist enthalten in:
Ursprung
4632f0d4f3
Commit
99c4c2f35d
@ -69,6 +69,13 @@ public class Settings extends Config {
|
|||||||
public PATHS PATHS;
|
public PATHS PATHS;
|
||||||
@Create
|
@Create
|
||||||
public REGION_RESTRICTIONS_OPTIONS REGION_RESTRICTIONS_OPTIONS;
|
public REGION_RESTRICTIONS_OPTIONS REGION_RESTRICTIONS_OPTIONS;
|
||||||
|
@Create
|
||||||
|
public ENABLED_COMPONENTS ENABLED_COMPONENTS;
|
||||||
|
|
||||||
|
@Comment("Enable or disable core components")
|
||||||
|
public static final class ENABLED_COMPONENTS {
|
||||||
|
public boolean COMMANDS = true;
|
||||||
|
}
|
||||||
|
|
||||||
@Comment("Paths for various directories")
|
@Comment("Paths for various directories")
|
||||||
public static final class PATHS {
|
public static final class PATHS {
|
||||||
|
@ -25,6 +25,7 @@ import com.boydti.fawe.command.CFICommand;
|
|||||||
import com.boydti.fawe.command.MaskBinding;
|
import com.boydti.fawe.command.MaskBinding;
|
||||||
import com.boydti.fawe.command.PatternBinding;
|
import com.boydti.fawe.command.PatternBinding;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.object.FawePlayer;
|
import com.boydti.fawe.object.FawePlayer;
|
||||||
import com.boydti.fawe.object.exception.FaweException;
|
import com.boydti.fawe.object.exception.FaweException;
|
||||||
import com.boydti.fawe.object.task.ThrowableSupplier;
|
import com.boydti.fawe.object.task.ThrowableSupplier;
|
||||||
@ -257,6 +258,7 @@ public final class CommandManager {
|
|||||||
* Initialize the dispatcher
|
* Initialize the dispatcher
|
||||||
*/
|
*/
|
||||||
public synchronized void setupDispatcher() {
|
public synchronized void setupDispatcher() {
|
||||||
|
if (Settings.IMP.ENABLED_COMPONENTS.COMMANDS) {
|
||||||
DispatcherNode graph = new CommandGraph().builder(builder).commands();
|
DispatcherNode graph = new CommandGraph().builder(builder).commands();
|
||||||
|
|
||||||
for (Map.Entry<Object, String[]> entry : methodMap.entrySet()) {
|
for (Map.Entry<Object, String[]> entry : methodMap.entrySet()) {
|
||||||
@ -324,6 +326,7 @@ public final class CommandManager {
|
|||||||
platform.registerCommands(dispatcher);
|
platform.registerCommands(dispatcher);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static CommandManager getInstance() {
|
public static CommandManager getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren