- IntelliJ IDEA (tested with 2019.2.3 version).
- Spigot v1.3.1.
- Minecraft client (v1.3.1).
- Web server accepting PUT requests at http://raspberrypi:1880/bulb/color.
- (optional) MQTT server running at tcp://raspberrypi:1883
- Open project in IntelliJ IDEA.
- In the "Maven" panel on the top right choose "package"
- Copy
target/AlicePlugin-1.0-SNAPSHOT.jar
to the Spigot'splugins
folder and run the server.
- On right-clicking block of wool, will send RGB color of the wool by
PUT
tohttp://raspberrypi:1880/bulb/color
with body of{"rgb_color": [10, 200, 50]}
kind. - On pulling any lever up, will
PUT
tohttp://raspberrypi:1880/bulb/color
with body{"rgb_color": [255, 0, 0]}
. - On pulling any lever down, will
PUT
tohttp://raspberrypi:1880/bulb/color
with body{"rgb_color": [0, 255, 0]}
. - On
POST
tolocalhost:4567/command
with body{"command": "<some minecraft command>"}
will execute it. Can be used to e.g. place and remove blocks (e.g.{"command": "setblock 39 16 204 minecraft:redstone_torch"}
and
{"command": "setblock 39 16 204 air"}
.
Following will work only MQTT server is present.
- On right-clicking block of wool, will publish RGB color of the wool to
minecraft/bulb/color
in JSON format. E.g.{"rgb_color": [10, 200, 50]}
. - On pulling any lever up, will publish to
minecraft/bulb/color
message{"rgb_color": [255, 0, 0]}
. - On pulling any lever down, will publish to
minecraft/bulb/color
message{"rgb_color": [0, 255, 0]}
. - Will listen to
minecraft/command
. If message containing JSON withcommand
field is published, will execute that command (e.g. publishing{"command":"stop"}
will stop server).