Java Reference
In-Depth Information
remember, and always add test commands so you can test each part
Remember to remove the test commands before shipping your plugin to your
friends. Or, for a bit of extra flash, set it up so that you need a special
“Developer” permission to run the tests, and give yourself that permission.
And that's it! Your toolbox is now complete:
Your Full Toolbox!
You now know how to:
Use the command-line shell
Modify Minecraft blocks
Build with Java, javac
Modify and spawn entities
Run a Minecraft server
Listen for and react to game events
Deploy a plugin
Manage plugin permissions
Connect to a local server
Create a separate class
Use Java variables for numbers and
Schedule a task to run later
•Schedule a task to run periodically
Use Java functions
Save and load configuration data
Use if , for , and while statements
•Use Java objects
Build up complex code from simple
Use imports for Java packages
Save and load plugin game data
Use new to create objects
Use DataAccess to use the database
Add a new command to a plugin
Catch and throw Java exceptions
Work with Location objects
Use Git to keep track of changes to code
Find blocks/entities
•Use local variables
Go back to earlier versions of code (an
“undo button”)
Use class-level global variables
•Use ArrayList s
Maintain multiple versions of code at the
same time
Use HashMap s
Back up your code to the cloud
Use private and public to control visibility
Use CRC cards to think about classes and
•Decompose responsibilities into functions
•Test as you go
Just the Beginning
It's been a fun trip, but we've barely scratched the surface. There is more
Java you need to learn, and there's a lot more to Canary than we've covered
here. Plus, there's a ton more to programming in general that you'll discover
as you go along.
Search WWH ::

Custom Search