-
-
Notifications
You must be signed in to change notification settings - Fork 38
Development Assistance Plugin
The Visual Bukkit plugin provides various features to assist plugin development with Visual Bukkit. The plugin jar can be found in the directory where you installed Visual Bukkit or it can be downloaded directly from the release page. The default configuration assumes that the Visual Bukkit app and the server with the plugin are running on the same machine, but it can be configured to work when the app and server are running on different machines/networks.
The permission to use Visual Bukkit commands is vb.command
(defaults to ops).
Command | Executable By | Description |
---|---|---|
/vb help | console/player | Lists the available commands. |
/vb reload | console/player | Reload the config. |
/vb ping | console/player | Ping the Visual Bukkit app. Use this to confirm the Visual Bukkit plugin is able to communicate with the Visual Bukkit app. |
/vb export item | player | Export the item that the player is holding. |
/vb export loc | player | Export the player's current location. |
/vb export block-loc | player | Export the location of the block at which the player is looking. |
/vb export chest-inv | player | Export the inventory of the chest at which the player is looking. |
/vb export error | console/player | Find the component in the Visual Bukkit project which caused the last exception to occur. |
/vb deploy | console/player | Deploy the plugin jar to the server. The plugin jar will be copied into the plugin update folder (this is "plugins/update" unless you changed it in bukkit.yml). If there is a jar with the same name in the plugins folder it will be replaced by the jar in the update folder when you restart the server. Otherwise, you need to manually move the jar from the update folder to the plugins folder before restarting the server. |
Debug mode is used to find the cause of exceptions that occur in your plugin.
- Click the "Plugin Settings" button at the bottom.
- Click the "Build" tab
- Click the checkbox for enabling debug mode.
- Build the plugin and add it to your server.
- After an exception occurs run
/vb export error
. - The Visual Bukkit app will navigate to the component that caused the exception.
By default, the Visual Bukkit plugin attempts to communicate with the Visual Bukkit app on localhost port 50051 with no encryption.
Default plugin configuration: config.yml
grpc:
host: localhost
port: 50051
tls:
enabled: false
truststore:
file: C:\Users\Example\Desktop\VisualBukkit-Certs.p12
password: password
client-auth:
enabled: false
keystore:
file: C:\Users\Example\Desktop\VisualBukkit-Plugin-Private.p12
password: password
key:
password: password
Default app configuration: grpc.properties
(located in the VisualBukkit6 directory in your home directory)
port=50051
tls.enabled=false
tls.keystore.file=C:\\Users\\Example\\Desktop\\VisualBukkit-Private.p12
tls.keystore.password=password
tls.key.password=password
tls.client_auth.enabled=false
tls.client_auth.truststore.file=C:\\Users\\Example\\Desktop\\VisualBukkit-Plugin-Certs.p12
tls.client_auth.truststore.password=password
If the app and plugin are on different networks:
- Enable port forwarding for TCP port 50051.
- Set
grpc.host
to your public IP inconfig.yml
.
Enabling TLS is highly recommended if the app and plugin aren't on the same machine.
On your computer which has the Visual Bukkit app, use the Java keytool to generate a key pair and a self-signed cert:
keytool -genkeypair -keystore VisualBukkit-Private.p12 -alias VisualBukkit -storetype PKCS12 -keyalg RSA -keysize 4096 -validity 365 -ext "SAN=IP:<PUT YOUR PUBLIC IP HERE>"
Follow the prompts, it will ask for information to include in the cert, most of the fields can be left blank. Note that the VisualBukkit-Private.p12
file contains the private key so it should never be shared with anyone.
Update grpc.properties
:
- Set
tls.enabled
totrue
- Set
tls.keystore.file
to the file path ofVisualBukkit-Private.p12
- Set
tls.keystore.password
to the password for the keystore. - Set
tls.key.password=password
to the password for the private key (it's the same as the keystore password if you didn't set it)
Export the cert from the keystore:
keytool -exportcert -keystore VisualBukkit-Private.p12 -alias VisualBukkit -rfc -storetype PKCS12 -file VisualBukkit-Cert.pem
Import the exported cert into a new keystore:
keytool -importcert -keystore VisualBukkit-Certs.p12 -alias VisualBukkit -file VisualBukkit-Cert.pem -storetype PKCS12
Transfer VisualBukkit-Certs.p12
to the server which has the Visual Bukkit plugin.
Update config.yml
:
- Set
grpc.tls.enabled
totrue
- Set
grpc.tls.truststore.file
to the file path ofVisualBukkit-Certs.p12
- Set
grpc.tls.truststore.password
to the password for the keystore.
On the server which has the Visual Bukkit plugin, use the Java keytool to generate a key pair and a self-signed cert:
keytool -genkeypair -keystore VisualBukkit-Plugin-Private.p12 -alias VisualBukkit -storetype PKCS12 -keyalg RSA -keysize 4096 -validity 365"
Follow the prompts, it will ask for information to include in the cert, most of the fields can be left blank. Note that the VisualBukkit-Plugin-Private.p12
file contains the private key so it should never be shared with anyone.
Update config.yml
:
- Set
grpc.tls.client-auth.enabled
totrue
- Set
grpc.tls.client-auth.keystore.file
to the file path ofVisualBukkit-Plugin-Private.p12
- Set
grpc.tls.client-auth.keystore.password
to the password for the keystore. - Set
grpc.tls.client-auth.key.password=password
to the password for the private key (it's the same as the keystore password if you didn't set it)
Export the cert from the keystore:
keytool -exportcert -keystore VisualBukkit-Plugin-Private.p12 -alias VisualBukkit -rfc -storetype PKCS12 -file VisualBukkit-Plugin-Cert.pem
Import the exported cert into a new keystore:
keytool -importcert -keystore VisualBukkit-Plugin-Certs.p12 -alias VisualBukkit -file VisualBukkit-Plugin-Cert.pem -storetype PKCS12
Transfer VisualBukkit-Plugin-Certs.p12
to your computer which has the Visual Bukkit app.
Update grpc.properties
:
- Set
tls.client_auth.enabled
totrue
- Set
tls.client_auth.truststore.file
to the file path ofVisualBukkit-Plugin-Certs.p12
- Set
tls.client_auth.truststore.password
to the password for the keystore.
GMOD || Fuzio SCP : https://discord.gg/KBdNp3DCgj