feat,refactor: add useCorePlaceBlock in config and refactor default config
This commit is contained in:
@@ -169,6 +169,7 @@ public class Configuration {
|
||||
public boolean creayun = false;
|
||||
public String serverName;
|
||||
public boolean useCore = true;
|
||||
public boolean useCorePlaceBlock = false;
|
||||
public boolean useChat = false;
|
||||
public boolean coreCommandSpy = false;
|
||||
public boolean resolveSRV = true;
|
||||
|
||||
@@ -171,6 +171,11 @@ public class CorePlugin extends PositionPlugin.Listener {
|
||||
if (!ready || command.length() > 32767) return;
|
||||
|
||||
if (bot.options.useCore) {
|
||||
if (bot.options.useCorePlaceBlock) {
|
||||
runPlaceBlock(command);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isRateLimited() && hasRateLimit()) return;
|
||||
|
||||
forceRun(command);
|
||||
@@ -185,6 +190,11 @@ public class CorePlugin extends PositionPlugin.Listener {
|
||||
public CompletableFuture<Component> runTracked (String command) {
|
||||
if (!bot.options.useCore) return null;
|
||||
|
||||
if (bot.options.useCorePlaceBlock) {
|
||||
runPlaceBlock(command);
|
||||
return null;
|
||||
}
|
||||
|
||||
final Vector3i coreBlock = block;
|
||||
|
||||
run(command);
|
||||
|
||||
Reference in New Issue
Block a user