Everything in Minecraft Is an Object

The Minecraft world is filled with blocks. Every location in the game has a block, which might be made of air or another material. Blocks can exist in the world and in a player’s inventory. Anything in a player’s inventory is represented by an item.

In this world of blocks you have entities, which includes players, creepers, and cows. Items in motion are also entities—an arrow in flight or a snowball or a potion that’s being flung. And all of these are objects.

Everything in our plugins is an object: locations, blocks, entities, cows, creepers, players, and even the plugin itself. All objects, all the time.

So now the real fun starts! You have variables holding data, and you have instructions expressed ...

Get Learn to Program with Minecraft Plugins, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.