1.0.19 • Published 6 years ago

minecraft-be-ban v1.0.19

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

How it works?

It will pipes to bedrock server terminal
And watch log
And write kick command automatically
It made to target Bedrock Dedicated Server@1.12 but you can modify it to fit for anything

How can I run it?

Run with binary

  1. Download binary release from here
  2. Move binary to Bedrock Server directory
  3. Run it. it will run ./bedrock_server
    This will copys triggers.txt to working directory
    If you use linux, you can run it with LD_LIBRARY_PATH=. minecraft-be-ban
  4. Modify triggers.txt to ban some XUIDs

Run with npm

  1. Run npm install -g minecraft-be-ban command with console
  2. Go to Bedrock Server directory with console
  3. Run minecraft-be-ban command. it will run ./bedrock_server
    This will copys triggers.txt to working directory
    If you use linux, you can run it with LD_LIBRARY_PATH=. minecraft-be-ban
  4. Modify triggers.txt to ban some XUIDs

Extra Command

  • update-triggers: Reload triggers.txt. but it reloads automatically if file watch works correctly
  • ban [XUID]: add XUID to triggers.txt. Working in progress...

Help

Question or Report: https://github.com/karikera/minecraft-be-ban/issues
Discord: https://discord.gg/uBA4eSz
My mothertongue is korean, My english is bad ´ㅡ`

Commands

  • minecraft-be-ban check: It will copies and validates triggers.txt
  • minecraft-be-ban: It will runs ./bedrock_server
  • minecraft-be-ban [commands]: It will runs [commands]

Triggers.txt

Comment

  • //: Comment line, Right text of line is comment
  • /*: Comment open, All is comment till */
  • */: Comment close

Label & Data

If line has colon, line must be label: value style
If line has not colon, line is data
label: value sets behaviors of data. and data makes actual activity

Labels for Line Matching

  • data is target word to match
  • capture: /Regular expression/: Set log capture rule.
  • compare: [mathematical expressions]: Comparation with data, Run command if comparation is passed. It will uses javascript operations.
    Variables can be used
    x = XUID or whatever your writed in bottom
    $[0-9] = regular expression capture
    ex) x == $1 // If data is same with first capture
  • command: [minecraft server command]: Set command to run when captured, It can use regular expression capture
  • command+: [minecraft server command]: Add next command
  • delay: [milliseconds]: default = 0, Waiting duration before run command
  • post-delay: [milliseconds]: default = 0, Waiting duration after run command, it needs for fail detection
  • fail-detection: /Regular expression/: Repeat command if this message is detected
  • repeat-count: [count]: default = -1(infinite), It limits fail detection repeat count
  • stop: [true or false]: default = false, Do not check other data if matched
  • mute-command: [true or false]: default = false, Mute auto writed command
  • mute-output: [true or false]: default = false, Mute captured outputtrue
  • add-command: [command]: It will insert data to bottom when use command it needs to contains parameter. It can use variable from capture.
  • add-data: [data]: Inserted data by add-command.
  • remove-command: [command]: Remove data. But only works against what is inserted by add-command .
  • ex)
capture: /] Player connected: (.+),/
delay: 5000 // After 5sec. cannot see text if loading is not completed
command: say Hello $1!

Labels for Repeating

  • data is minecraft command
  • repeat-duration: [milliseconds]: Interval of commands
  • repeat-mute-command: [true or false]: default = false, Mute echo of command
  • repeat-count: [true or false]: default = false, Mute echo of command
  • ex)
repeat-duration: 3000
say foo!
wait 1000 // triggers.txt only command
say bar!

Labels for WebSocket Server

WebSocket Server for extenal accesss. It simply receives command and sends message

  • data is minecraft command
  • ws-port: [port number]: Port number of WebSocket Server
  • ws-capture: /Regular expression/: Command match rule
  • ws-no-match: [message]: default=Command not found, Message reply when command not found
  • ex)
ws-port: 8080
ws-no-match: $1> Command not found
ws-capture: /[^>]+> tp ([0-9]+) ([0-9]+) ([0-9]+)/
tp $1 $2 $3 $4

Examples & Predefined sets

<name> indicates predefined settings

  • <Ban>: Kick entered player if matched
// You can write these properties instead of <Ban> and you can modify it!
capture: /] Player connected: (.+), xuid: (.+)$/
compare: x == $2  // x = XUID
command: kick "$2"
delay: 500
fail-detection: /^Could not find player $2$/
repeat-count: 10
stop: true
add-command: ban $1
add-command+: ban $2
add-data: $2 // $1
remove-command: unban $1
remove-command+: unban $2
  • <Advanture>: Set advanture mode to player if matched
// [capture,compare,repeat-count] are same with <Ban>
command: gamemode a "$1"
delay: 2000
post-delay: 2000 
fail-detection: /^No targets matched selector$/    // gamemode can set after loading, Need to retry
stop: false

Internal Extra Command for triggers.txt only

  • wait [milliseconds]: wait milliseconds to wait next command
  • reply [message]: send message to websocket client ex)
repeat-command-duration: 3000
say foo!
wait 1000 // triggers.txt only command
say bar!
1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago