Chapter 1. Deploying a Spigot Server

The first step to modifying Minecraft with the Bukkit API is to install a multiplayer server on your Windows PC. A multiplayer server is essentially the same as the single-player Minecraft server, but it allows for more customization and is not limited to the people in your home network. Spigot is a modified version of a Minecraft server, which will be used to load the plugins that you create. A plugin is a piece of software that hooks or plugs into another piece of software. The code that you will develop in this book will be in the form of plugins. These plugins will hook into the Minecraft code and change how Minecraft operates. We will set up a Spigot server and use it to test the plugins that you will write. By the end of this chapter, all of your friends will be able to log on to your modified Minecraft server and play together. By working through the following segments of this chapter, we will deploy a Spigot server, which will be modified in the later chapters:

  • An introduction to Spigot
  • Installing a Spigot server
  • Understanding and modifying the server's settings
  • Using the console and in-game Minecraft and Bukkit server commands
  • Port forwarding

Introduction to Spigot

As you set up your own server and begin to create plugins, you will encounter a few terms that may be new to you. The terms are Vanilla, Bukkit, CraftBukkit, and Spigot.

Vanilla refers to the normal Minecraft game developed by Mojang/Microsoft. The Vanilla Server is the official version of the game. It can be downloaded from minecraft.net and is typically named minecraft_server.jar or minecraft_server.exe. The vanilla server currently does not support any sort of mods or plugins. This is where Bukkit comes in.

Bukkit is an API that helps us to develop plugins. We will discuss this in detail in Chapter 2, Learning the Bukkit API. Until then, it is sufficient to know that when you hear the phrase bukkit plugins, it is referring to the plugins that are built against the Bukkit API.

The Bukkit API was originally developed by the CraftBukkit team. This brings us to the next term. CraftBukkit is a modified Minecraft server that replaces the vanilla server. CraftBukkit and vanilla Minecraft provide us with essentially the same game. The difference is that CraftBukkit has the ability to load Bukkit plugins and execute the code within the game. CraftBukkit translates the Bukkit methods and variables into Minecraft code, which was developed by Mojang. CraftBukkit also includes additional code to aid plugin developers with completing certain tasks, such as saving/loading data, listening for server events, and scheduling the code that needs to be executed. We will not mention CraftBukkit much in this book, because it has been replaced with a project named Spigot.

Spigot completely replaces the vanilla Minecraft server, just as CraftBukkit does. Spigot was built on top of the CraftBukkit project. Therefore, they share a lot of the same code. However, Spigot is more configurable via its settings; in many ways, it is much faster. The Spigot team now maintains all three of the projects, namely Bukkit, CraftBukkit, and Spigot. You will be able to use either CraftBukkit or Spigot to run a server, since the Spigot team has been kind enough to provide us with both. I recommend running the Spigot server for the reasons mentioned earlier.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.129.100