You are previewing Building Minecraft Server Modifications.
O'Reilly logo
Building Minecraft Server Modifications

Book Description

Discover how to program your own server plugins and augment your Minecraft server with Bukkit

  • Create your own Minecraft server mods

  • Set up a Bukkit server that all your Minecraft friends can play on

  • Set up a Bukkit server that all your Minecraft friends can play on

  • Step by step instructions guide you through the creation of several unique mods

In Detail

If you have ever played Minecraft on a public server then the chances are that the server was powered by Bukkit. Bukkit plugins allow a server to be modified in more ways than you can imagine. Learning to program your own server mods will allow you to customize the game to your own liking.

Building Minecraft Server Modifications is a complete guide that walks you through the creation of Minecraft server mods. From setting up a server, to testing your newly made plugins, this book teaches you everything you need to know. With the help of this book you can start practising for a career in software development or simply create something awesome to play with your friends.

This book walks you through installing your own Minecraft server for you and your friends. Once your server is running, it will aid you in modifying the game by programming Bukkit plugins. You will learn how to program simple plugin features such as player commands and permissions. You will also learn more complex features including listening for events, creating a configurable plugin, and utilizing the Bukkit scheduler. All of this will be accomplished while writing your own server mods.

You will become familiar with the most important aspects of the Bukkit API. Additional API features will become a breeze to learn after tackling these more complicated tasks.

Table of Contents

  1. Building Minecraft Server Modifications
    1. Table of Contents
    2. Building Minecraft Server Modifications
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    8. 1. Deploying a CraftBukkit Server
      1. Installation
      2. Setup
      3. Minecraft/Bukkit server commands
      4. Port forwarding
      5. Summary
    9. 2. Learning the Bukkit API
      1. Introduction to APIs
      2. The Bukkit API documentation
      3. Navigating the Bukkit API documentation
      4. Understanding the Java documentation
      5. Exploring Bukkit API
      6. Summary
    10. 3. Creating Your First Bukkit Plugin
      1. Installing an IDE
      2. Creating a new project
      3. Adding Bukkit as a library
      4. The essentials of a Bukkit plugin
        1. The plugin.yml file
        2. The plugin's main class
      5. Making and calling new methods
      6. Expanding your code
      7. Summary
    11. 4. Testing on the CraftBukkit Server
      1. Building the JAR file
      2. Installing your plugin
      3. Testing your plugin
      4. Testing new versions of your plugin
      5. Summary
    12. 5. Plugin Commands
      1. Adding a command to plugin.yml
      2. Programming the command actions
      3. Assigning the executor for the command
      4. Summary
    13. 6. Player Permissions
      1. The benefits of permissions
      2. Understanding permission nodes
      3. Adding a permission node to plugin.yml
      4. Assigning a permission node to a plugin command
      5. Testing player permissions
      6. Using a third-party permissions plugin
      7. Using permission nodes throughout your plugins
      8. Summary
    14. 7. The Bukkit Event System
      1. Choosing an event
      2. Registering an event listener
      3. Listening for an event
      4. Canceling an event
      5. Communicating among events
      6. Modifying an event as it occurs
      7. Creating more plugins on your own
      8. Summary
    15. 8. Making Your Plugin Configurable
      1. Configurable data types
      2. Writing a config.yml file
      3. Saving, loading, and reloading the config file
      4. Reading and storing the configured values
      5. Using configured settings within your plugin
      6. ItemStack within a configuration
      7. YAML configuration hierarchy
      8. Storing configuration values as variables
      9. Accessing variables from another class
      10. Summary
    16. 9. Saving Your Data
      1. Types of data that can be saved
      2. Which data to save and when
      3. A sample teleportation plugin
      4. Writing a ConfigurationSerializable class
      5. Saving data to a YAML configuration
      6. Loading data from a YAML configuration
      7. Summary
    17. 10. The Bukkit Scheduler
      1. Creating a BukkitRunnable class
      2. Synchronous versus asynchronous tasks
      3. Running a task from a BukkitRunnable class
      4. Running a task later from a BukkitRunnable
      5. Running a task timer from a BukkitRunnable class
      6. Writing a repeating task for a plugin
      7. Adding a delayed task to a plugin
      8. Executing a code asynchronously
      9. Summary
    18. Index