By Developers, For Developers

Historical errata for Learn to Program with Minecraft Plugins

PDF PgPaper PgTypeDescriptionFixed onComments
2317TYPO

“Your run the java…” should be “You run the java…”

2013-12-11
2923TYPO

“named something like craftbukkit-1.6.4-R1.0.jar, but your numbers will probably larger.” should be “named something like craftbukkit-1.6.4-R1.0.jar, but your numbers will probably [be] larger.”

2013-12-11
24ERROR

Text says: “In the example code for this book, there’s a subdirectory named runtime. In the runtime directory you’ll see a startup script for each operating system… Copy the appropriate file to your server directory.” However, the runtime subdirectory in both the .tar and .zip is empty.

2013-12-06Oops -- sorry about that. It's up now.
11ERROR

The footer has an incorrect download link. It is missing the media subdomain.

2013-12-11
23ERROR

It is about the section: “Make a directory named server on your Desktop (that means it would be located in a directory named something like /Users/yourname/Desktop/server).”

“/Users/yourname/Desktop/server” is Mac OS X style and doesn’t work on other Unix systems (and in other countries). For example on a German Ubuntu (12.04) system the path is “/home/USER/Arbeitsfläche” or “$HOME/Arbeitsfläche”.

Actually putting all the stuff on the “Desktop” (even if located within a subdirectory called “server”) isn’t a good idea. Especially beginners should learn how to organize projects.

Either a base of “/usr/local” or “/opt” should be considered for the setup. I myself prefer to put projects under “/opt/PROJECT”, and put this path in an environment variable, that is used by the build script.

2013-12-11I agree, however, the advantage of having the directory(s) visible on the desktop for beginners is more important, so I made a conscious decision to try and keep things as visible and as obvious as possible.
0ERROR

Example Source Code: “clean.sh”

Running “clean.sh” in a fresh project fails, because of “find | rm” construct.

On Ubuntu Linux the easiest fix would be to use:
find [A-Z]* -name ‘.class’ -o -name ’.jar’ -delete

Or use “| xargs –0 rm”.

2013-12-11That was actually just a script for my own use, and isn't referenced from the book ;). But I'll spruce it up.
0OK

“mkplugin.sh” and “build.sh” in existing projects:

In the step:
# 3. Copy to server
echo “Deploying jar to $SERVER/plugins…”
cp dist/$NAME.jar $SERVER/plugins || exit 1

There should be an additional step to check if “plugin” is an existing directory, or all “$NAME.jar” will end up in the file “plugins”:

# 3. Copy to server
echo “Deploying jar to $SERVER/plugins…”
test ! -d “$SERVER/plugins” && mkdir -p “$SERVER/plugins”
cp “dist/$NAME.jar” “$SERVER/plugins/$NAME.jar” || exit 1

2013-12-11Well, running the server creates the directory for you, but just in case, I've added the test to create the directory.
0ERROR

A better “fix” for “clean.sh” (on Ubuntu Linux), because not all files were delete, because of missing braces:

find . -type f \\( -name ‘.class’ -o -name ’.jar’ \\) -delete

2013-12-11
32SUGGEST

The importance of the white space is stressed on this page, but you should also make mention of the need to use spaces rather than tabs, which was my first way of doing it.

2013-12-11
51ERROR

The “multiplyByThree()” function on the bottom of page 51 uses double for the result variable, but returns a float. This will generate a type mismatch error. Going with what you suggested earlier, the float should be a doube.

2013-12-11
55SUGGEST

This sentence is awkward to read: “If you are aged >= 16, you are allowed to drive.”

How about: “If your age is >= 16, you are allowed to drive.”

2013-12-11
68ERROR

Line 26 of the code for PlayerStuff.java ends with a +, which, of course, would throw an error. Looking at the example output, I think you intended to put “and you are on the ground.” at the beginning of line 27.

2013-12-11
69TYPO

“but setting the weather to DOWNFALL”. The “but” should be “by”.

2013-12-11
72TYPO

At the top of page 72, it says “and since that’s now your parent, ” should that be “your plugin’s parent”?

2013-12-11
88SUGGEST

“The reason for that is… because Java.” I know what you are getting at, but the “because Java” part doesn’t make sense. Because it’s Java?

2013-12-11It's a joke. See http://www.theatlantic.com/technology/archive/2013/11/english-has-a-new-preposition-because-internet/281601/
95SUGGEST

In discussing HashMaps, you have the HashPlay.java where you modify currentScores by adding points to them through a function.

Then you say “Note that we’re not returning any particular value from this function as it’s declared to be ​void​, just like ​main​ is.” You might want to note that the function will modify the currentScores HashMap (since the variable is not local), even though you don’t return it through the method call.

2013-12-11
100SUGGEST

You note in the first footnote that you can get details on org.bukkit.block.Block from the Bukkit documentation. It might be helpful to new users to give a brief introduction on how to use JavaDocs in general. Then when you reference things like finding out about ​org.bukkit.Material, they’ll know where to go.

2013-12-11I'm planning on adding an appendix in a later beta that will do exactly that. \n
107TYPO

lightening should be lightning.

2013-12-11
106SUGGEST

I have no idea what this definition means or does :)

“getTargetBlock (HashSet transparent, int maxDistance) returns a Block that the entity has targeted. Instead of passing in a HashSet of transparent block id’s, you can pass in a null to indicate air.”

2013-12-11
112TYPO

I think “we” was left out of this sentence:
“That means generated this event ourselves, and we don’t want our…”

2013-12-11
115TYPO

“to give permissions to jack37 to our /nomagic command” this should be /nofirebow instead.

2013-12-11
49ERROR

Code for adding strings together uses wrong variable name. It says “list” instead of “last” on this line: String name = first + " " + middle + " " + list

2013-12-11
53TYPO

States: Where do you in and make the changes?

How about: Where do you go in and make the changes?

2013-12-13
24ERROR

on page 24 the code that copies the start up script is not in the code i downloaded from the books site. The runtime folder is empty.
$ cd Desktop
$ cp code/runtime/start_minecraft server/

2013-12-15Argh, that's a problem in the upload process. Should be there now.
6TYPO

“Where do you in and make the changes?”

perhaps “go in” or some other verb

Context: discussing need for functions using cake recipe.

2013-12-20
12SUGGEST

For unzipping under Windows I would recommend 7-Zip rather than winzip since it is completely free.
www.7-zip.org

2014-01-09
67ERROR

fred.performCommand(“/tell mary179 I love you”)

This produces an “unknown command” error in the game. Removing the ‘/’ causes it to run correctly.

(craftbukkit-1.6.4-R2.0.jar)

2014-01-09
31SUGGEST

The book never covers the “Usage:” field of plugin.yml.

commands:
hello:
description: Say Hello to everyone!
usage: /hello [optional message]

When you type “/help hello” in-game, both description and usage are shown, even if usage was never set. Plugin developers rarely give enough useful usage information in-game, and this is a good place to encourage the next generation.

2014-01-09
86ERROR

“…use the array’s .length() function…”

Arrays don’t have a .length() function, just a .length property. Calling foo.length() causes a compile error. (And it is done correctly in the code example that follows.)

2014-01-09
121SUGGEST

“You need the PermissionsBukkit.”

This is not entirely accurate. PermissionsBukkit hasn’t been maintained (its last beta was for v1.5.2), and it isn’t necessary for setting and checking permissions. (You can set permissions in permissions.yml.) It’s a convenience tool for admins managing permissions. Recommending it as useful for development is good, saying it is necessary steers in the wrong direction if it’s not made clear that PermissionsBukkit just hooks into the existing superperms framework to add convenience commands in-game.

And appendix on the permission system, or pointers to more information, would be really good.

2014-01-17I spruced up the text a little to make that clearer. I might talk more about permissions when we get to the 'setting up a server' part, thanks. \n \n/\\ndy
1TYPO

Second paragraph of Chapter 1, second sentence.
“I think a big reason for it’s success …”
The word it’s should be its (possessive).

Also, the semicolon in “You get a chance to build; to create.” should be an ellipses, I think.

2014-01-15
3TYPO

In section 1.2, second paragraph, “I could even build my own desk lamp with out understanding …” Without needs to be closed up as one word.

2014-01-15
5TYPO

Paragraph 1, “You’re going to issue commands to the computer is very much the same way …”
Change the word “is” to “in”

2014-01-15
8TYPO

The paragraph near the bottom that says “Under code there are a bunch of plugin directories, one for …”

The font change for the word “code” goes on too far in the sentence.

2014-01-15
10TYPO

The graphic shows the file name plugin.xml. Should be plugin.yml.

Also, what we’ve downloaded has bin.sh rather than bin.xml. We’re rolling with it, but it strays from the book and confused her a bit.

2014-01-16
1TYPO

Throughout the book I keep seeing the phrase “try and ” … these should all be “try to

You don’t try and avoid those people. You try TO avoid them.

(You hate me, don’t you?)

2014-01-15
11TYPO

You reference the plugins directory here before having the reader create their own plugins directory on their desktop. This threw Elisabeth a curve ball as she was trying to follow along and do what you were doing in the book.

2014-01-16
11TYPO

“lamp with out understanding” — should be: lamp without understanding

2014-01-22
13TYPO

And hey, we got use the single dot! —> And hey, we got to use the single dot!

2014-01-22
19TYPO

… and how you do it in next section —> … and how you do it in the next section

2014-01-22
34TYPO

(1) Now you’ve got a complied plugin —> Now you’ve got a compiled plugin

(2) … should look something like this: [blank/missing]

2014-01-22
43TYPO

… it does not know the different between —> … it does not know the difference between

2014-01-22
44TYPO

… so the the result is a another —> … so the result is another

2014-01-22
51TYPO

Now there a bit more noise here than in the cake example, let’s see … —> Now there is a bit more noise here than in the cake example. Let’s see …

2014-01-22
52TYPO

You’re going to write a function name howlong() … —> You’re going to write a function named howlong() …

2014-01-22
58TYPO

… what happens when you packages variables and functions … —> what happens when you package variables and functions

2014-01-22
65TYPO

(1) Player fred = getPlayer(“fred1024”) —>
Player fred = getPlayer(“fred1024”);

(2) You have to declare this recipes in import statements … —> You have to declare this package in import statements …

2014-01-22
66TYPO

So with fred in hand, you can get—and set—data for that player, using the
period ( . ) to indicate which function or a variable you want inside that object.
Here are a few snippets of code that shows what that looks like:

—>

So with fred in hand, you can get—and set—data for that player, using the
period ( . ) to indicate which function or variable you want inside that object.
Here are a few snippets of code that show what that looks like:

2014-01-22
67TYPO

As you might you guess —> As you might guess

2014-01-22
8276SUGGEST

I have a suggestion. For people with no prior programming experience (like me) it could be a good thing to explain a bit more about how to add a new command to the plugin.yml configuration file. Specially since i cant cheat and get it from your example, since you made a new plugin of it instead of adding the code to the SkyCmd one.

2014-02-04
65TYPO

You have to declare this recipes in import statements —>
You have to declare this recipe in import statements

2014-02-04
72TYPO

We saw a description of this back in on page 31 —> We saw a description of this back on page 31

2014-02-10
79TYPO

You can use class-level global variables can be accessed from anywhere in the
class —> Class-level global variables can be accessed anywhere in the class

2014-02-18
85TYPO

Array s are mostly used when you’ve got a small list of value —> Array s are mostly used when you’ve got a small list of values

2014-02-18
85TYPO

Array’s are usually used when you want to access it’s values by an index, or
run through all the values and do something to them with a for loop. —> An array is usually used when you want to access its values by an index, or run through all the values and do something to them with a for loop.

2014-02-18
86TYPO

[Footnote 1] Text is missing.

2014-02-18
112OK

You can do anything in code that you could do in the game, and then some. >> You can do anything in code that you could do in the game, and then some more(or whatever you ment to put here).

2014-02-21"and then some.": A slang expression used to humorously imply that the preceding statement was an understatement.
98TYPO

You can then put text on anyone of the sign posts by name.
—> You can then put text on any one of the sign posts by name.

2014-03-05
101TYPO

Notice we’re using a param-
eter from onCommand that we haven’t use before: the String[] args . These are any arguments that the player type in with the command in the chat window. For example, if I just type in:

—> Notice we’re using a param-
eter from onCommand that we haven’t used before: the String[] args . These are any arguments that the player types in with the command in the chat window. For example, if I just type in:

2014-03-05
101TYPO

So safe if the knowledge that … —> So safe in the knowledge that …

2014-03-05
102TYPO

Yes they are, but it’s lot easier to read …
—> Yes they are, but it’s a lot easier to read …

2014-03-05
105TYPO

Now you’ve got most of the basic tools you need, you can alter the world and react to in-game events.

—> Now you’ve got most of the basic tools you need; you can alter the world and react to in-game events.

2014-03-05
105TYPO

… setting cows on fire … —> … dropping squid bombs …

Every location in the game has a block, which might be made or air… —> Every location in the game has a block, which might be made of air …

2014-03-05
106TYPO

… and we’ve spawned more than a few Cows.
—> … and we’ve spawned more than a few squids.

2014-03-05
108TYPO

And how are going to do that exactly? —> And how are we going to do that exactly?

2014-03-05
46TYPO

You’re server will show up on the pick list => Your …

2014-03-20
42TYPO

That SERVER= setting is how the script knows where the find the server. => where to find

2014-03-20
20TYPO

Here I have an shell script, with an .sh Suffix => I guess this should be: “a” shell script, with “a” .sh suffix

2014-03-20
53TYPO

… problem. in Java, you write Division … => In Java … (uppercase “In”)

2014-03-20
53TYPO

so the the result is => so the result is

2014-03-20
49TYPO

object, like System.out.println or player.getLocation() : one function is written with parenthesis, the other one without. Maybe it’s intended to omit the parameter of println, just wanted to mention it…

2014-03-20
48TYPO

Each of the those odd characters you see has a special meaning, and are used for different things.
1. “the those”
2. Being no native speaker I am not sure about this, but I guess the second part should be “and they are used”

2014-03-20
54TYPO

Java has libraries with all of that ready for you use. => probably: “for you to use”

2014-03-20
54OK

or “Notch.” => or “Notch”. (Position of “.”)

2014-03-20Correct typographical style puts the punctuation within the quotation mark.
54TYPO

String name = first + " " + middle + " " + last => missing semicolon at end

2014-03-20
31TYPO

…and you should see you new entry that includes Java’s bin.
=> guess it should be “your new entry”

2014-03-20
55TYPO

I’ve made a shell script named "mkplugin.sh" => "mkplugin.sh" (no )

2014-03-20
60TYPO

Now there a bit more noise here than in the cake example. =>
Now there is… (“is” is missing, was already reported by Scott Lyden for B3 but together with another issue)

2014-03-20
112TYPO

getHealth() Returns an double … —> getHealth() Returns a double

2014-03-20
112TYPO

We used this to spawn cows previously. —> We used this to spawn squids previously.

2014-03-20
114TYPO

We’ll see some more examples of modifying and spawning entries in the next section … —-> We’ll see some more examples of modifying and spawning entities in the next section …

2014-03-20
114TYPO

You know how to write code for commands the user types in, and you know how to do things to affect the world, now it’s
time to see … —> You know how to write code for commands the user types in, and you know how to do things to affect the world. Now it’s time to see …

2014-03-20
115TYPO

(1) … (you’d add this around 4). —> … (you’d add this around line 4).

(2) Next, you need to add some code to your onEnable() function as shown 9. —> Next, you need to add some code to your onEnable() function as shown starting on line 9.

2014-03-20
116TYPO

(1) Finally we come to the event listener itself, starting 15. —> Finally we come to the event listener itself, starting on line 15.

(2) The function for the listener itself can by named anything you want … —> The function for the listener itself can be named anything you want …

2014-03-20
119TYPO

… and add this location as it’s first entry. —> … and add this location as its first entry.

2014-03-20
119TYPO

… stored in an Stack … —> … stored in an Stack …

2014-03-20
122TYPO

… to give permissions to jack37 to our /firebow …
—> … to give permission to jack37 to use our /firebow …

2014-03-20
125TYPO

Think about some of the plugins we’ve look at so far. —> Think about some of the plugins we’ve looked at so far.

2014-04-07
126TYPO

Normally you think of the computer running though your code once, as in the part if the diagram on the left. —> Normally you think of the computer running through your code once, as shown in the diagram on the left.

2014-04-07
127TYPO

(1) Then you’ve got two bits of code reading and writing from at it at the same time … —> Then you’ve got two bits of code reading and writing from it at the same time …

(2) First, let’s be little more precise … —> First, let’s be a little more precise …

2014-04-07
129TYPO

You can take look at the full code … —> You can take a look at the full code …

2014-04-07
130TYPO

plugin should be variable that’s set to your main plugin. —> plugin should be a variable that’s set to your main plugin.

2014-04-07
131TYPO

new ExampleTask(plugin); —> BukkitTask task = new ExampleTask(plugin);

2014-04-07
132TYPO

… so first we’ll need to check and see if this a left click … —> … so first we’ll need to check and see if this is a left click …

2014-04-07
133TYPO

It won’t stay on fire for long, it will burn up and die. —>
It won’t stay on fire for long; it will burn up and die.

2014-04-07
99TYPO

in this case we want to to multiply the random 0..1 by 5 =>
in this case we want to multiply the random 0..1 by 5

2014-04-22
99TYPO

Bukkit provides a very handy thing feature in org.bukkit.util.BlockIterator => I guess it should be either thing or feature

2014-04-22
106TYPO

The log is good example of that; => The log is a good example of that; (maybe also a : instead of ; ?)

2014-04-22
110TYPO

LinkedLlist => LinkedList

2014-04-22
ixTYPO

Also a special thanks to the beta readers, especially Carl Cravens, and Scott Lyden. —> Also a special thanks to the beta readers, especially Carl Cravens and Scott Lyden. :-)

2014-04-22
157TYPO

A look at Java Exceptions and annotations —> A look at Java exceptions and annotations

2014-04-22
157TYPO

… or maybe you just closed your laptop.And once the server stops … —> … or maybe you just closed your laptop. And once the server stops …

2014-04-22
158TYPO

We described these functions back in Chapter 7, Add a Chat Command, Locations and Targets, on page 83, and we’ve used onEnable , now we’re going to start using onDisable() as well. —> We described these functions back in Chapter 7, Add a Chat Command, Locations and Targets, on page 83. We’ve used onEnable(); now we’re going to start using onDisable() as well.

2014-04-22
159TYPO

In fact, you’ve been using it along … —> In fact, you’ve been using it all along …

2014-04-22
1SUGGEST

There are some problems with text flow in the .mobi version of the book. Most of the time the footnotes will not be displayed correctly if Im reading at the second smallest magnification level of my kindle device (Touch, not PW). The text will touch the right side of the display border or even will be rendered above the border and thus not fully readable/displayed.

When I switch to the smallest mag level the text will flow correctly with some space to the right hand side. The same happens to some code examples.

2014-04-25
175TYPO

a little more complicated that our simple LocationSnapshot.
=> a little more complicated than our simple LocationSnapshot. (that => than)

2014-04-22
102TYPO

how does Java store lists of things like that, and how do work with “piles” of data => not sure, should that be: how to work… ?

2014-04-22
105TYPO

and its very clear as to what line of code set a local variable’s value and is using it. (its => it’s , set => sets). The last part sounds a little strange to me, maybe “and it’s very clear what line of code sets a local variable’s value and where it is used.”?

2014-04-22
121TYPO

but it’s good habit to get into. => but it’s a good habit to get into.

2014-04-22
122TYPO

Add to their score by the amount you passed in as amount => not sure, is the “by” required/correct? (sorry if I’m raising false alarms…)

2014-04-22
123TYPO

There is another option, though, You can create functions… -> “though. You” ( , replaced with . )

2014-04-22
129TYPO

Finally we the set that block’s type to Material.SIGN_POST. => Finally we set that block’s type to Material.SIGN_POST.

2014-04-22
135TYPO

(remember we’re adding the px, py and pz offsets from the code above) : The code above does not use px, py, pz but either x, y, z in the comment on top of the offsets array or playerX, playerY, playerZ in the stuck() function.

2014-04-22
136TYPO

(px, py, and pz from up above.)
1. again, I assume it refers to: Block b = world.getBlockAt(x + playerX, y + playerY, z + playerZ);
2. I also assume it should be “above).” instead of “above.)”

2014-04-22
142TYPO

all listed in the BUkkit documentation : BUkkit => Bukkit

2014-04-22
161TYPO

IN the chapter we saw some Java mechanics => In…

2014-04-22
173TYPO

So we’ll keep in a string instead => maybe “So we’ll
keep it in a string instead” or “So we’ll keep the name in a string instead”

2014-04-22
174TYPO

and then check to see if there are online or not => and then check to see if they are online or not

2014-04-22
176TYPO

Don’t be shy about adding log message to help => log messages

2014-04-22
180TYPO

PermaMap: Saves and Load a Java HashMap =>
1. “Save and Load” or “Saves and Loads”
2. ist the uppercase Load intended?

2014-04-22
181TYPO

There a bunch of packages under java.io that we’ll Need => I’m not sure which one, but I guess it should be either “There are” or “There is”

2014-04-22
166TYPO

It turns out that to be a fair and reasonable limitation, because you really should not store player objects, worlds, locations, or other “live” elements in the game. —> This is a fair and reasonable limitation, because you really should not store player objects, worlds, locations, or other “live” elements in the game.

2014-04-22
166TYPO

All a player needs to do is disconnect and reconnect and bam. The old player object for them is no longer valid. —> All a player needs to do is disconnect and reconnect and bam: The old player object for them is no longer valid.

2014-04-22
38TYPO

There’s several issues here:
1. In the Plugin: HelloWorld section it instructs the reader to go to a file called “code/src/HelloWorld”. The actual location from your archive is ~/Desktop/code/HelloWorld/src/HelloWorld
2. The source code has the HelloWorld.java file in package “helloworld” but the file itself lives directly in “HelloWorld/src/HelloWorld.java”. So it might be best to either remove the “package” definition, or go ahead and in the downloadable archive, move the file into the package.

I’m reachable at mpegram3rd@hotmail.com if you have further questions or comments.

2014-04-23
38SUGGEST

Sorry.. It appears that the package definition which I pointed out as item 2 in my prior comment doesn’t impact building from the commandline (it definitely upsets Eclipse). - Macon Pegram

2014-05-05A lot of things upset Eclipse. \n \nI'm trying to avoid the deep directory structures and keep things flatter and simpler for beginners. \n \nHowever, I have gone in and moved all the source down into a directory named for its package.
182TYPO

After writing, you have have to call stream.close(). => After writing, you have to call stream.close().

2014-05-05
182TYPO

The lines from 10 to 11 ending up getting us a variable named stream that we can use to write to the file. => “ending up getting us” sounds strange to me, but it might also be that my english is just not good enough

2014-05-05
81OK

There is no page 70. Chapter 5 ends on page 69 and chapter 6 begins on page 71. It seems that all of the content is there despite there being no page 70.

2014-04-30That's correct. Page numbering is kept to coincide with the paper book, which would have blank page on the verso half of the chapter opening spread.
182TYPO

$ git config —global user.name “you@example.com”
$ git config —global user.email “Your Name”

==>

$ git config —global user.name “Your Name”
$ git config —global user.email “you@example.com”

2014-05-09
45ERROR

The error is within the sample code for the BuildAHouse plugin rather than a typo/error within the book itself (I have given P.45 as that is where the BuildAHouse plugin is first introduced).

At first use all seems well and I got a house 5 blocks by 5 blocks by 5 blocks. Naturally I wanted a bigger house so I set int height = 50; in MyHouse.java. I was quite surprised when I got a house 5 blocks wide by 5 blocks high by 50 blocks LONG!

Looking into the details of the makeCube() function in BuildAHouse.java it appears as though the height (as variable k) is being added the horizontal axis Z instead of the vertical axis Y:

// Base is i X j, k goes up for height
for (i=0; i< width; i) {
for (j=0; j<width; j) {
for (k=0; k< height; k) {
loc.setX(origin.getX() + offsetX + i);
loc.setY(origin.getY() + offsetY + j);
loc.setZ(origin.getZ() + offsetZ + k);
origin.getWorld().getBlockAt(loc).setType(what);
}
}
}

I switched around variables j and k between setY() and setZ():

// Base is i X j, k goes up for height
for (i=0; i< width; i) {
for (j=0; j<width; j) {
for (k=0; k< height; k) {
loc.setX(origin.getX() + offsetX + i); // Left-Right
loc.setZ(origin.getZ() + offsetZ + j); // Forwards-Backwards
loc.setY(origin.getY() + offsetY + k); // Up-Down
origin.getWorld().getBlockAt(loc).setType(what);
}
}
}

And now I get a building 5 blocks wide and 5 blocks long and 50 blocks high.

But I’m also curious: for a function called makeCube() why have width and height? In a cube all sides are the same length. makeCube() could just be:

makeCube(int offsetX, int offsetY, int offsetZ, int size, Material what)

Or allow setting all three dimensions to create cuboids of any size:

private static void makeCuboid(int offsetX, int offsetY, int offsetZ, int width, int length, int height, Material what)

2014-08-18Argh, you're right on the coordinates; I fat-fingered that one. \n \nExpanding the call to use all three dimensions was left as an exercise to the reader, but I never added the exercise itself. \n
9ERROR

There’s two Ha* directories in the code download! which causes H to not complete to HelloWorld. Correct code sample should be Ha.

2014-08-18That's true in the actual code directory, but not in the sample directory as given in the text, where H is correct. \n \nI'll clarify the description.
35ERROR

In the HelloWorld plugin.yml file, the “hello” command has usage of “/hello [optional message]”, but the HelloWorld.java doesn’t appear to do that.

2014-08-18
39TYPO

“AndyHunt issued seRver command”, not “sever command”.

2014-08-18
59OK

need to import org.bukkit.entity.Pig;

and call
me.getWorld().spawn(me.getLocation(), Pig.class);

inside the loop

2014-08-21As it says in the text, this is a "snippet" of code, not a complete piece of code itself. The point is to show a for loop, not declaring variables or imports. \n
5745TYPO

Example at the bottom of the page is:

$ cd Desktop
$ cd code/src/BuildAHouse
$ ./build.sh

The second line should read “cd code/BuildAHouse” the src directory is not there.

2014-08-18
40ERROR

Actually a problem with the build_lib.sh script (first mentioned on this page). On line 19:

if [ ! -r $MODS ]; then

$MODS needs to be wrapped in quotes as it includes $HOME, and on Windows the $HOME variable frequently contains spaces. For example, on my machine it is “$C:/Users/Steven Pickles”. ie:

if [ ! -r “$MODS” ]; then

ps. Thanks for drawing my attention to BusyBox for Windows. I’m normally a Linux person and having a POSIX environment around soothes me when having to work with Windows ;)

pix

41ERROR

Similar to my last error, code/HelloWorldEZ/build.sh, line 33

if [ ! -r $EZ ]; then

should quote $EZ as it contains $MCSERVER which contains $HOME which has spaces on Windows. ie,

if [ ! -r “$EZ” ]; then

pix

Categories: