Here's how to share your world with friends around the globe by creating your own Minecraft . This method relies on either a static IP address for your home network, or the use of a dynamic DNS service.
If you wish to share the world with your friends on the same network, this is not necessary and you can just give your friends the IP address of your Raspberry Pi, which you can find out by running ifconfig in a terminal.
If you are connected via ethernet, look for eth0; if connected wirelessly, look for wlan0. Once you have found either of these, the IP address should be visible, and this is what your friends need to join your server.
Overclock your Raspberry Pi to Medium. Change the memory split to 16MB. Reboot your Raspberry Pi. Download and install Java. Download and install Minecraft Server. Run the Minecraft Server using a bash script called start.sh. In a terminal, type nano start.sh. In nano, type:
/opt/jdk1.8.0/bin/java -Xms256M -Xmx496M
-jar /home/pi/spigot.jar nogui