October 2014
Beginner to intermediate
285 pages
6h 24m
English
Let’s look at a plugin that will encase a player in solid rock (the full plugin is in code/Stuck). When you issue the command stuck with a player’s name, that player will suddenly be encased in a pile of blocks. (If you’re alone on the server, your player name might be the wonderfully descriptive name “player.”)
We’ll start by looking at pieces of this plugin, and then put it all together.
All the interesting parts are in a separate helper function named stuck. The main part of the plugin should look pretty familiar by now:
| Stuck/src/stuck/Stuck.java | |
| | package stuck; |
| | |
| | import net.canarymod.plugin.Plugin; |
| | import net.canarymod.logger.Logman; |
| | import net.canarymod.Canary; |
| | import net.canarymod.commandsys.*; |
| | import ... |
Read now
Unlock full access