Chapter 5Plugins Have Objects

In this chapter we’ll cover a bunch of new Java language tools:

  • Use objects: bundles of variables and functions

  • Use the right import for a package

  • Use new to create objects

You may have heard of object-oriented programming or that Java is an “object-oriented language.” That’s what we’re talking about in this chapter: using objects to represent elements of the Minecraft game, from players to cows.

You can do anything in code that you could do in the game, and then some. This comes down to working with mostly three kinds of things: blocks, items, and entities.

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.