forked from ChomeNS/chomens-bot-java
add a config for it
This commit is contained in:
parent
096a013ebd
commit
ee2fdcd8bd
3 changed files with 4 additions and 1 deletions
|
@ -163,7 +163,7 @@ public class Bot {
|
|||
|
||||
// this replicates the minecraft behavior of not resolving SRV records.
|
||||
// some servers check for this, so that's why i have it here
|
||||
session.setFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, false);
|
||||
session.setFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, options.resolveSRV);
|
||||
|
||||
session.addListener(new SessionAdapter() {
|
||||
// fard
|
||||
|
|
|
@ -171,6 +171,7 @@ public class Configuration {
|
|||
public boolean useCore = true;
|
||||
public boolean useChat = false;
|
||||
public boolean coreCommandSpy = false;
|
||||
public boolean resolveSRV = true;
|
||||
public int reconnectDelay = 2000;
|
||||
public boolean removeNamespaces = false;
|
||||
public int chatQueueDelay = 125;
|
||||
|
|
|
@ -133,6 +133,7 @@ bots:
|
|||
# useCore - if enabled it just sends the command using chat instead of using core. recommended to enable useChat too when this is enabled
|
||||
# useChat - when the bot tellraws it will chat instead of using the core to run tellraw
|
||||
# coreCommandSpy - set to true if server supports enabling player's commandspy though command block
|
||||
# resolveSRV - whether to resolve SRV records on the server. the notchian minecraft doesn't resolve them
|
||||
# removeNamespaces - when the bot sends a command it will remove like `minecraft:` for example if set to true
|
||||
# coreRateLimit - will ignore commands if reached the ratelimit
|
||||
|
||||
|
@ -144,6 +145,7 @@ bots:
|
|||
useCore: true
|
||||
useChat: false
|
||||
coreCommandSpy: false
|
||||
resolveSRV: true
|
||||
reconnectDelay: 2000
|
||||
removeNamespaces: false
|
||||
chatQueueDelay: 125
|
||||
|
|
Loading…
Reference in a new issue