O'Reilly logo

A Beginner’s Guide to Writing Minecraft Plugins in JavaScript by Walter Higgins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Your First Minecraft Plugin

In this chapter you’ll dive in and create your first Minecraft plugin. A plugin is a small program that is loaded and executed by a larger program. The larger program you’ll be using is, of course, your Minecraft server. This first plugin will be short—just a couple of lines of code—so you won’t have to type too much, but you should read through this first chapter and try to understand the code and the notes. You’ll build on the knowledge learned here when creating more sophisticated plugins in later chapters.

Hello World

Launch your editor and open the helloWorld.js file you created in Chapter 4. Once opened, you can remove the comment entered previously and type the following text:

console.log('Hello ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required