Programming doesn’t have to be boring! Write your own Minecraft plugins and watch your code come to life with flaming cows, flying creepers, teleportation, and interactivity. Follow along with the book and add your own features to the Minecraft game by developing Java code that “plugs in” to the server. You’ll manipulate and control elements in the 3D graphical game environment without having to write tons of code or learn huge frameworks. You don’t need programming experience to get started—-this book will teach you everything you need to know!

SPECIAL GIFT NOTE: If you’re planning on giving the ebook as a present, you might consider putting it on a USB stick and wrapping it up. If you do, please note that there will be several updates between now and when the book is completed.

Printed in full color.

Buy Now

Select a DRM-free Format:

In Stock
In Stock
Buy the eBook and get these DRM-free formats delivered immediately:
  • epub (for iPhone/iPad, Android, eReaders)
  • mobi (for Kindle)
  • PDF
We can automatically send them to your Kindle or Dropbox, and for a social reading experience we can link the book to your Readmill account. (You'll need to log in to enable these options.)

This title is currently available in Beta. Buy the eBook now, and you'll be able to download successive releases of the eBook as the authors add material and correct mistakes. You'll get the final eBook when the book is finished.

If you buy the combo pack (Beta eBook + finished Paper Book) now, you'll get the Beta eBook immediately. You'll get the finished paper book when it's released (we're currently estimating 2014-05-10, but these dates can change).


About this Book

  • 200 pages (est)
  • Published:
  • Release: B6.0 (2014-04-10)
  • ISBN: 978-1-93778-578-9

Expand your Minecraft experience! You’ll learn how to write Java code and build plugins for your own Minecraft servers using the popular Java programming language and the Minecraft Bukkit library.

You’ll create plugins that can change blocks from air to stone, or spawn cows and creepers. You’ll write plugins that react to game events, and even schedule tasks that will run later in the game. Readers from age 9 to 99 will learn how to use variables and functions to build plugins that fling players into the sky, create flying creepers, and of course, shoot flaming cows.

Along the way you’ll learn real programming using Java, from classes, objects, and data structures (including arrays and hashes) to exception handling and threads. You’ll even learn how to backup your code (and go back in time!) using Git, and set up and run your own server at home or in the cloud. A running progress bar shows you how far you’ve come in each chapter, and by the end of the book you’ll be able to design and code your own plugins from scratch.

Put your gaming to good use, and learn real programming skills today.

What You Need

A modern PC running any of Windows, Mac OS X or Linux operating systems. You’ll see how to download Java, the Bukkit library, and all the tools you’ll need.

User Level

Beginners with no previous programming experience.

Contents and Extracts

This book is currently in beta, so the contents and extracts will change as the book is developed.

  • Start Here
    • Getting Started
    • Swimming in the Deep End
    • Getting Help
  • Command your Computer
    • Use the Command Line
    • Move Around in Directories of Files
    • Next Up
  • Add an Editor and Java
    • Install an Editor to Write Code
    • Install the Java Programming Language
    • If the java Command Is Not Found
    • Other Reasons it Didn’t Work
    • Install Minecraft Client and Server
    • Common Commands
    • Next Up
  • Build and Install A Plugin excerpt
    • Plugin: HelloWorld
    • Configure with plugin.yml
    • Build and Install with
    • Run the Minecraft Server
    • Next Up
  • Code is Variables, Functions, and Keywords
    • Keep track of Data with Variables
    • Organize Instructions into Functions excerpt
    • Compare stuff with Booleans
    • Control Code with Keywords
    • Next Up
  • Code is Objects!
    • Why use Objects?
    • Combine Data and Instructions Together into Objects
    • Plugin: PlayerStuff
    • Next Up
  • How to Construct a Plugin
    • What’s in a Minecraft Plugin?
    • Plugin: SkyCmd
    • Add a Command
    • Use Minecraft Coordinates
    • Next Up
  • Use Piles of Variables
    • Variables and Objects live in Blocks
    • Array
    • ArrayList
    • Plugin: FlashMob
    • HashMap
    • Keep Things Private or Public
    • Next Up
  • Modify, Spawn, and Listen in Minecraft
    • Modify Blocks
    • Plugin: Stuck
    • Modify Entities
    • Spawn Entities
    • Listen for Events
    • Plugin: BackCmd
    • Check Permissions
    • Next Up
  • Schedule Tasks for Later
    • What Happens When?
    • Put Code In a Class by Itself
    • Make a Runnable Task
    • Schedule to Run Later
    • Schedule to Keep Running
    • Plugin: CowShooter
    • Next Up
  • Use Configuration Files and Store Game Data
    • Use a Configuration File
    • Plugin: CowBombConfig
    • Store Game Data in Local Files
    • Use PermaMap
    • Plugin: SaveLocations
    • Use One Java Package
    • Next Up
  • Keep Your Code Safe
    • Install Git
    • Remember Changes
    • An Easy Undo
    • Visit Multiple Realities
    • Backup to the Cloud
    • Share Code
    • Next Up
  • How to Let Your Friends In
  • Glossary
  • Cheat Sheet
    • Data type conversions:
    • Error Messages and likely causes
    • Player Basic API
    • Server Basic API
  • Common Imports
  • How to Install a Desktop Server
  • How to Install a Cloud Server
  • Bibliography

About the Author

Andy Hunt has written and co-written over a half-dozen previous titles, including the classic The Pragmatic Programmer, Practices of an Agile Developer, and Pragmatic Thinking & Learning, and regularly speaks at conferences on software development around the world. He’s used Minecraft to help teach his son programming. When not wrangling bits, he’s an avid musician and sometimes woodworker.

Upcoming Author Events

  • 2013-03-25: Andrew Hunt
    Pragmatic Agility (Agile Triad, Winston-Salem NC)
  • 2013-04-27: Brian P. Hogan
    JRuby - Imagine mixing the easy syntax, powerful language features, and rapid development of Ruby with the speed, power, and flexibility of the Java Virtual Machine? Ruby and the JVM go together like chocolate and peanut butter, and you'll see some examp (Twin Cities Code Camp, Minneapolis, MN)
  • 2013-05-14: Andrew Hunt
    Pragmatic Agility (Triangle.rb, Raleigh NC)
  • 2013-05-24: Andrew Hunt
    Keynote (Path to Agility, Columbus OH)
  • 2013-06-10: Andrew Hunt
    Three talks (Norwegian Developer Conference, Oslo, Norway)
  • 2013-08-13: Brian P. Hogan
    Testing Client Side Code with Jasmine and CoffeeScript With more logic moving from the client-side to the server-side, we've got to get better at testing code. In this talk you'll learn about writing tests for client-side code that help drive the d (ThatConference, Wisconsin Dells, Wisconsin)
  • 2013-10-23: Andrew Hunt
    Opening Keynote (All Things Open, Raleigh)
  • 2014-04-05: Brian P. Hogan
    Automate with Grunt (Twin Cities Code Camp, Minneapolis, MN)

Comments and Reviews

  • Learn to Program with Minecraft Plugins explains things very well; no programming experience required. It’s very helpful for new programmers. And so far, it’s been an excellent vehicle for some quality Father-Son bonding.

    —Mel and Noah Riffe (Age 12, 7th Grade)
  • Phenomenal. Approachable and simple, without talking down to the audience. I could see anyone at any age reading this.

    —David Bock Ruby and Rails Developer and Consultant
  • I really liked making the server plugins. My favorite was the Cow Shooter.

    —Young Reader, Age 13
  • Go you, this book is awesome!

    —Stina Qvarnström, Sweden
  • I’m definitely going to get a copy for the techie kids of some friends of ours.

    —Ian Dees Author Cucumber Recipes