(Please note as an example I use version 1.18.1, which at the time of this writing is the latest version of Spigot. You should replace 1.18.1
with whatever version you want to use)
Installation video: https://youtu.be/6-bqPcMoZ8M
- Download BuildTools.jar from this page
- Open a command window, run
java -jar BuildTools.jar --rev 1.18.1
- Some files will be created, among them we are interested in spigot-1.18.1.jar, copy it to a designated folder, rename it to just
spigot.jar
- Create a script/batch file, for example
run.bat
, with following content:java -Xms8G -Xmx8G -XX:+UseConcMarkSweepGC -jar spigot.jar
- Type
run
in command window. Spigot will try to start and shutdown. - Open
eula.txt
with a text editor, changeeula=false
toeula=true
- Re-run script, Spigot should start normally.
reference: https://www.spigotmc.org/wiki/spigot-installation/
- Download juicyraspberrypie-1.18.1.jar from https://github.com/wensheng/JuicyRaspberryPie/releases
- Move the file to
plugins
folder, the folder is at the same place where Spigot.jar is. - Start or reload Spigot. (To reload, just type
reload
in Spigot command window) - When juicyraspberrypie.jar is loaded for the 1st time, a folder
JuicyRaspberryPie
will be created under plugins folder.- Inside JuicyRaspberryPie, you need to modify the file
config.yml
to point pyexe to correct location where python.exe is actually located
- Inside JuicyRaspberryPie, you need to modify the file
Open command window(cmd or terminal), navigate to plugins/JuicyRaspberryPie folder, then start python. (Please note only Python3 is supported) Open Minecraft if you haven't already, choose "Multiplayer", then select the Spigot server.
Navigate away from Minecraft. On Windows, press Alt-Tab, or Win-Tab. If you game menu is on whenever you navigate away from Minecraft, see tips.
In Python window, issue following code:
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
mc
is the Minecraft connection object, you interact with Minecraft through mc
.
Find you place in Minecraft by:
pos = mc.player.getTilePos()
x, y, z = pos.x, pos.y, pos.z
pos
is player position in Minecraft, x, y, z are just for convenience. Now we want to spawn an animal, make sure you face east Minecraft (press F3 to find out your facing and more), then in Python:
mc.spawnEntity(x+2, y, z, 'panda')
A panda appears right in front of your eyes.
Explore API doc to find out more what you can do with JuicyRaspberryPie API.
(todo)
(todo)
- in %appdata%/.minecraft/options.txt change "pauseOnLostFocus" to false so Minecraft doesn't pause when you move away from Minecraft.
- issue
/gamerule doDaylightCycle false
to disable day/night cycle - If you don't use nether and the_end", set "allow-nether=false" in server.properties, set "allow-end: false" in bukkit.yml, so server starts up quickly.
- On windows, sometime you have error message when you start Spigot. This happen when your command window(cmd) was set to UTF-8 encoding. The error can be ignored. Or, do a
chcp
to check if it says 65001. Doing achcp 437
then starting Spigot again will get rid of the error.