<<

The Ultimate Guide to ® SERVER

Timothy L. Warner

800 East 96th Street, Indianapolis, Indiana 46240 USA ii The Ultimate Guide to

The Ultimate Guide to Minecraft Server Editor-in-Chief Greg Wiegand

Copyright © 2016 by Que Publishing Executive Editor All rights reserved. No part of this book shall be reproduced, stored in Rick Kughen a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from Development Editor the publisher. No patent liability is assumed with respect to the use of William Abner the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume Managing Editor no responsibility for errors or omissions. Nor is any liability assumed for Sandra Schroeder damages resulting from the use of the information contained herein. Project Editor ISBN-13: 978-0-7897-5457-8 Seth Kerney ISBN-10: 0-7897-5457-6 Library of Congress Control Number: 2015939394 Copy Editor Cheri Clark Printed in the of America Indexer First Printing: July 2015 Erika Millen

Trademarks Proofreader All terms mentioned in this book that are known to be trademarks or Jess DeGabriele service marks have been appropriately capitalized. Que Publishing cannot Technical Editor attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. John Baichtal Minecraft is a trademark of Mojang Synergies / Notch Development AB. Editorial Assistant This book is not affi liated with or sponsored by Mojang Synergies /Notch Cindy Teeters Development AB. Book Designer Warning and Disclaimer Mark Shirar Every effort has been made to make this book as complete and as accurate Compositor as possible, but no warranty or fi tness is implied. The information provided Bronkella Publishing is on an “as is” basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book

Special Sales For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at [email protected] or (800) 382-3419. For government sales inquiries, please contact governmentsales@ pearsoned.com. For questions about sales outside the U.S., please contact international@ pearsoned.com. iii

Contents at a Glance Introduction 1

CHAPTER 1 Minecraft Multiplayer from the ’s Perspective 5

CHAPTER 2 Building a Vanilla Minecraft Server 25

CHAPTER 3 Operating a Vanilla Minecraft Server 45

CHAPTER 4 Understanding Networking as It Relates to Minecraft 71

CHAPTER 5 Installing a Custom Minecraft Server 93

CHAPTER 6 Integrating Mods into Your Minecraft Server 113

CHAPTER 7 Exploring Minecraft Realms 137

CHAPTER 8 Taking Control of Minecraft with Third-Party Hosting 159

CHAPTER 9 Giving Your Players the Best Gaming Experience 185

CHAPTER 10 Monetizing Your Minecraft Server 209

APPENDIX Tim’s “Top 10” Lists 237

Index 247 iv The Ultimate Guide to Minecraft Server

Table of Contents

Introduction 1 Who Should Read This Book 1 How This Book Is Organized 2 Conventions Used in This Book 3 Follow Me! 3 About the Bitly Hyperlinks 3 System Requirements 4

Chapter 1 Minecraft Multiplayer from the Gamer’s Perspective 5 Understanding Minecraft Multiplayer 6 Minecraft Demo Mode Versus Minecraft Premium 7 Please Avoid Cracked Launchers 8 The Three Types of Minecraft Multiplayer 10 Finding “Good” Minecraft Servers 10 Understanding Minecraft Server Lists 11 A Word on Minecraft Minigames 14 About Connection Addresses 15 Public Versus Whitelist Servers 15 Joining an Online Server 16 Minecraft Multiplayer Netiquette 19 The Importance of Help 19 Chatting with OPs and Other Players 20 Setting Chat Options 22 The Three Rules of Multiplayer Netiquette 23 Rule #1: Obey the Server Rules—Or Leave 23 Rule #2: Act in Accordance with the “Golden Rule” 23 Rule #3: Ask Without Fear 24 The Bottom Line 24 Table of Contents v

Chapter 2 Building a Vanilla Minecraft Server 25 Preparing the Java Environment 25 Verifying Your Java Version (Windows) 26 Verifying Your Java Version (OS X) 27 Downloading and Installing the JRE 27 Installing the Minecraft Server 28 The Windows Installation Process 29 The OS X Installation Process 31 An Interlude…Your Lab Environment 34 Buy Another Copy of Minecraft? Really? 34 First Run and Initial Configuration Steps 34 Understanding the Server Configuration Files 35 The Minecraft Server Console 37 Running More Than One Server Instance 42 Finding Vanilla Servers on the Internet 43 The Bottom Line 44

Chapter 3 Operating a Vanilla Minecraft Server 45 Understanding Our Test Environment 45 Configuring the Server’s World 47 Introducing Sublime Text 47 Understanding server.properties 48 Getting Your User(s) Connected 50 Scanning, Scanning… 51 Interacting with Your Users 53 /say, /tell, and /me 55 /tp and /give 59 Exerting Discipline on Your Server 59 /kick 60 /ban and /ban-ip 61 /pardon, /pardon-ip, and /whitelist 63 Adding a Management Layer to Your Server 65 Introducing McMyAdmin 65 Installation Notes 67 vi The Ultimate Guide to Minecraft Server

Configuration Notes 67 McMyAdmin Editions 68 Opening a Single-Player Game to the LAN 68 The Bottom Line 70

Chapter 4 Understanding Networking as It Relates to Minecraft 71 Revisiting Our Test Network 72 Learning as We Go: Basic Networking Terminology 73 IP Addresses 73 Private and Public Addresses 74 Network Address Translation 75 DHCP 75 Taking the Next Step: Preparing Our Network for Minecraft Server 76 Discovering Our Computer’s Networking Configuration 76 Viewing Our Router’s Configuration 78 Allowing Minecraft Traffic Through the Firewall 81 Ports 81 Configuring Port Forwarding 83 Testing the Connection 85 Let’s Play! 86 Using a Hostname Instead of an IP Address 88 Understanding DNS and DDNS 88 Setting Up No-IP 88 Sweeping Up the Shavings 90 The Bottom Line 91

Chapter 5 Installing a Custom Minecraft Server 93 Beginnings: It’s a Wild, Wild West 93 If Not Bukkit, Then What? 94 Installing SpigotMC 95 Starting SpigotMC Server 96 Configuring SpigotMC 97 server.properties 98 spigot.yml 98 Table of Contents vii

bukkit.yml 98 Testing the Player Experience 99 Introducing Bukkit Plugins 100 Describing the Most Popular Plugins 100 A Question of Balance 102 Installing, Configuring, and Using Bukkit Plugins 102 Obtaining Essentials: RTFM 102 Configuring Essentials 106 Testing the Gameplay Experience 108 The Bottom Line 112

Chapter 6 Integrating Mods into Your Minecraft Server 113 Introducing Cauldron 113 Minecraft Forge in a Nutshell 114 Installing the Forge Client 115 Getting Cauldron Up and Running 117 First, Our Plugin Proof of Concept 118 PermissionsEx Quick Start 118 Testing the Plugin 120 Now for the Good Stuff—Installing a 122 Installing RailCraft 122 Testing the Railcraft Player Experience 125 Experimenting with Integrated Modpacks and Launchers 129 Feed the Beast (FTB) 130 Installing FTB Server 132 Starting the FTB Launcher 134 ATLauncher and Other Options 134 Quality Client Mods 135 The Bottom Line 136

Chapter 7 Exploring Minecraft Realms 137 Understanding Cloud Services 137 Pros and Cons 139 Introducing Minecraft Realms 139 Let’s Sign Up! 140 viii The Ultimate Guide to Minecraft Server

Playing in a Minecraft Realms World 142 Inviting Players 145 Managing Players 148 A Brief Tutorial on Command Blocks 150 About Target Selectors 151 Programming Command Blocks 152 Configuring Minecraft Realms 154 Backup and Restore 154 Viewing Backups 154 Forcing a Backup 155 Downloading a World to Single-Player 155 Uploading a World to Realms 156 Restoring a World 157 The Bottom Line 157

Chapter 8 Taking Control of Minecraft with Third-Party Hosting 159 What to Look for in a Third-Party Minecraft Host 160 Minecraft Hosting Terminology 160 What’s Important in a Minecraft Host 161 Joining MCProHosting 163 Getting to Know the Control Panel 168 Configuring and Starting Our Minecraft Server 169 Logging In 170 Adding Some Plugins 172 Making Additional Tweaks to Your Server 175 Editing Your Config Files 175 Deploying a Resource Pack 177 Mapping Your Server to a Domain 180 Domain Name Mapping with GoDaddy 180 A Brief Roster of Other Well-Regarded Minecraft Hosting Companies 183 The Bottom Line 184 Table of Contents ix

Chapter 9 Giving Your Players the Best Gaming Experience 185 Protecting Your Server from Abuse 186 Distributed Denial-of-Service Attack 186 What to Do to Prevent DDoS Attacks 187 Griefing 188 Hack Yourself 189 Blocking 190 Tips for Addressing Griefers 194 Customizing the World Spawn 194 Setting the Server Spawn 195 Building a Spawn Lobby 196 Preparing the Land for a Lobby Schematic 197 WorldEdit—A More Flexible Terraforming Solution 199 Using WorldEdit to Drop in a Schematic 200 Supporting Multiple Worlds and Teleportation 202 Using Multiverse 202 Creating and Teleporting Between Worlds 203 Deploying Portals 203 Connecting the Two Worlds 206 The Bottom Line 208

Chapter 10 Monetizing Your Minecraft Server 209 Understanding Mojang’s Position on Minecraft Server Monetization 210 The New Minecraft EULA 210 The Backlash Against Mojang 211 Monetizing Minecraft While Maintaining EULA Compliance 212 Donations 212 In-Game Advertising and Sponsorship 216 Cosmetic Upgrade Sales 217 VIP Server Access or Subscriptions 219 Setting Up BuyCraft 220 Creating a Paid Package 223 Giving a Paid to All Players 225 Creating a Free Package 226 x The Ultimate Guide to Minecraft Server

Advertising Your Minecraft Server 228 Where to Advertise 228 The Importance of the Server Status Banner 229 Registering Your Minecraft Server 231 About Voting 232 Someplace to Compare Yourself 233 Creating a Custom Server Entry for the Minecraft Client 234 Customizing the MOTD 235 Final Thoughts 235

Appendix Tim’s “Top 10” Lists 237 Top 10 Minecraft Hosts 237 Top 10 Public Minecraft Servers 239 Top 10 Bukkit Plugins 240 Top 10 Modpacks 240 Top 10 Resource/Texture Packs 242 Top 10 Minecraft YouTubers 243 Top 10 Minecraft Minigames 243 Top 10 Minecraft Custom Maps 244 Top 10 Minecraft Seeds 245

Index 247 About the Author xi

About the Author

Timothy Warner is an IT professional and technical trainer based in Nashville, Tennessee. Tim became acquainted with information technology in 1982 when his dad bought the fam- ily a Timex Sinclair 1000 home computer and he taught himself BASIC programming. Today he works as an author/evangelist for Pluralsight and shares Windows PowerShell knowledge with anyone who’ll listen at his Two Minute PowerShell blog: http://2minutepowershell. com. You can reach Tim directly via LinkedIn: http://linkedin.com/in/timothywarner. xii The Ultimate Guide to Minecraft Server

Dedication

To my favorite Minecraft buddies: Xander, Xan, Luther, Daisy, and Zoey. Watch out for those Creepers!

Acknowledgments

Thanks to and the Mojang team for giving the world Minecraft. You guys must know in your hearts the huge impact the game has had on all of us. Thanks also to the entire third-party Minecraft community—you folks inspire me to be a better gamer, a better sysadmin, and a better programmer. It may take a village to raise a child, but I know that it takes a large office full of talented professionals to publish a book. To that end, I want to thank my editor Rick Kughen for never doubting my abilities even when I doubted them myself. Thanks to my publisher, Greg Wiegand, for being so willing to embrace my sometimes wacky ideas. Editorial and production staff rarely receive the credit they deserve. Thanks so much to John Baichtal, my technical editor, and to Cheri Clark, my copy editor, for making my writing as clean and accurate as it can be. I extend my gratitude as well to Seth Kerney, my production editor, and to the ever-helpful Kristen Watterson for streamlining the book publishing pro- cess. Thanks to my family and friends for your love and encouragement. Finally and most impor- tantly, thank you, my reader! I hope that this book takes your Minecraft gaming to the next level, and possibly serves as a springboard for new hobbies and career opportunities. Reader Services xiii

We Want to Hear from You!

As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way. We welcome your comments. You can email or write to let us know what you did or didn’t like about this book—as well as what we can do to make our books better. Please note that we cannot help you with technical problems related to the topic of this book. When you write, please be sure to include this book’s title and author as well as your name and email address. We will carefully review your comments and share them with the author and editors who worked on the book. Email: [email protected] Mail: Que Publishing ATTN: Reader Feedback 800 East 96th Street Indianapolis, IN 46240 USA

Reader Services

Visit our website and register this book at quepublishing.com/register for convenient access to any updates, downloads, or errata that might be available for this book. This page intentionally left blank Introduction

“Success is a journey, not a destination. The doing is often more important than the outcome.” –Arthur Ashe, legendary professional tennis player

Hello, and welcome to Minecraft server training! I invested dozens of hours in the Minecraft single- player game before I found the joy of multiplayer. Because I’ve been a fan of first-person shooter (FPS) games since 3D (remember that one?), I enjoy player vs. player (PvP) matches in shared Minecraft worlds. I’ve also been a bit of a nerd regarding role-playing games (RPGs); again, I can have this in Mine- craft multiplayer by exploring and building with friends from all over the world. This book, however, isn’t so much about the multiplayer player’s experience (although I devote a chapter to that subject). Instead, I’m going to teach you everything you need to know to build and maintain your very own Minecraft server, from soup to nuts. Are you excited? You should be!

Who Should Read This Book As an author, I always write with my three primary audiences in mind: ■ Potential Minecraft Server Admins: Perhaps you’ve experimented with hosting a Minecraft server and gotten bogged down in all the details. Hint: Most YouTube “instructors” don’t know how to instruct at all. You’re reading this book so that you can get clear, easy-to-follow direc- tions to set up an awesome Minecraft server. ■ Geeky Types: You’re the kind of person who digested my Hacking book (http://www. amazon.com/Hacking-Raspberry-Pi-Timothy-Warner/dp/0789751569) in one sitting. You intend to leverage your new Minecraft server skills to become familiar with computer networking and network security for other purposes (maybe building a new career!). 2 Introduction

■ Teachers and Students: I’m both a teacher and a student, so I know more than most about how useful Minecraft is as an educational tool. You can learn to do computer programming by building Minecraft mods and Bukkit plug-ins. You can learn how to set up and manage computer networks by hosting your own Minecraft server.

If you find that you don’t belong in any of the previous three classifications, don’t worry about it. Set your sights on learning as much as you can and, above all else, having fun, and you’ll be fine!

How This Book Is Organized I always write books in such a way that you’ll derive maximum benefit by reading the chap- ters in order. With no further buildup, allow me to present the chapter-by-chapter details on how I structured the content: ■ Chapter 1, “Minecraft Multiplayer from the Gamer’s Perspective,” brings new Minecraft multiplayer up to speed with how the game works and how to navigate within its worlds. ■ In Chapter 2, “Building a Vanilla Minecraft Server,” you learn how to use Mojang’s own authorized Minecraft server. I give you instructions for both Windows and OS X systems. ■ In Chapter 3, “Operating a Vanilla Minecraft Server,” you take your understanding of the official Minecraft server to the next level. Although the platform is limited, take heart because you’ll apply all your newfound skills to custom servers later in the book. ■ In Chapter 4, “Understanding Networking as It Relates to Minecraft,” you master the fundamentals of data networking. This is a huge subject, to be sure. However, I give you what you need to host your own Minecraft server with confidence. ■ In Chapter 5, “Installing a Custom Minecraft Server,” you move off the Mojang reserva- tion and embrace Minecraft server third-party development. You’ll get up to speed with what’s what in the often-confusing and ever-volatile world of Bukkit, Spigot, and other server platforms. ■ In Chapter 6, “Integrating Mods into Your Minecraft Server,” you begin to understand how we can broaden and deepen our Minecraft server’s feature set by deploying mods. Again, this can be a confusing subject to tackle on your own, but you’re in good hands with me! ■ In Chapter 7, “Exploring Minecraft Realms,” you learn how to use Mojang’s “other” officially licensed server. Realms is a cloud-based service, which means that you’re saved from most of the back-end configuration that you’re responsible for when you host your server inside your home. Conventions Used in This Book 3

■ In Chapter 8, “Taking Control of Minecraft with Third-Party Hosting,” you learn how you can combine the flexibility of third-party unofficial Minecraft servers with the stabil- ity, security, and reliability of a cloud server such as Realms. ■ In Chapter 9, “Giving Your Players the Best Gaming Experience,” you pick up best-prac- tice tips for staying focused on your player base, avoiding server damage through grief- ing, and ensuring that players want to stay on your server for a long time to come. ■ In Chapter 10, “Monetizing Your Minecraft Server,” you learn what options you have for recouping server costs while staying within the bounds of the Mojang end user license agreement (EULA).

Conventions Used in This Book In my experience as an author and a teacher, I’ve found that many readers and students skip over this part of the book. Congratulations for reading it! Doing so will pay off in big dividends because you’ll understand how and why we formatted this book the way that we did.

Follow Me! Throughout the book, you’ll find “Follow Me!” exercises, which are opportunities for you to apply what you’re learning right then and there in the book. I do believe in knowledge stack- ing, so you can expect that later “Follow Me!” exercises assume that you know how to do stuff that you did in previous exercises. Therefore, your best bet is to read each chapter in sequence and work through every “Fol- low me!” exercise.

About the Bitly Hyperlinks Whenever I want to point you to an Internet resource to broaden and deepen the content you’re learning, I provide a uniform resource locator (URL, also called an Internet address) in the following form: http://bit.ly/uaKpYD You might wonder what the heck this is. The way I look at it, if I were reading this title as a print book and needed to type out a URL given to me by the author, I would rather type in a “shortie” URL than some long, crazy URL with all sorts of special characters. The most important thing I have to tell you concerning the bit.ly short URLs is that the ending part is case sensitive. Therefore, typing the previous URL as, say, http://bit.ly/UaKpyD isn’t going to get you to the same page as what I intended. 4 Introduction

System Requirements You don’t need a heck of a lot, computer-wise, to work through all the procedures I provide in this book. Let me give you the run-down: ■ A Windows or Mac computer: As I’m sure you know, Minecraft runs on just about every hardware platform known to humankind. However, I’ve found the multiplayer experience in the “classic” Windows and OS X versions to be the most flexible and full- featured. As I said earlier, I give you all instructions for both Macs and Windows com- puters. ■ An Internet connection: This requirement should be a no-brainer. After all, how can you host an Internet-accessible Minecraft multiplayer server unless you have a live con- nection to the Internet! ■ Basic computer navigational skills: If you’re worried about having to know Java pro- gramming to learn Minecraft server, don’t be. We aren’t developing Minecraft mods here, after all. That said, you’ll need to know how to move around your computer, cre- ate folders, copy files, and create, edit, and save text files.

Okay—that’s enough of the preliminaries. It’s time to learn how to do Minecraft multiplayer! 4

“Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it.” –Alan Perlis, American computer scientist and first recipient of the

Understanding Networking as It Relates to Minecraft

What You’ll Learn in This Chapter: ■ How TCP/IP networking relates to Minecraft multiplayer ■ How to view your computer and router IP settings ■ How to put your home-based Minecraft server on the Internet ■ How to use a friendly hostname for your server instead of an unfriendly IP address

I’m not sure if you’re aware of it, but Minecraft is being used all over the world, every day, as an educational tool. Gaming as a teaching and learning method isn’t exactly new; however, Minecraft is such a rich and varied game that you can approach not only gameplay, but the game itself in many different directions. One of my goals in writing this book is to generate interest in my readers, especially my younger readers, in systems administration. The IT field has been spectacular to me since I entered it in 1997, and there’s room for you too! If you’re interested in discovering the magic of computer programming, developing Minecraft mods might be just the ticket to get you started. In this chapter we cover computer networking (a huge topic) in the space of only a couple dozen pages. By the end of the chapter, you not only will understand what you need to do to put your Minecraft LAN server on the public Internet to host external players, but also will know the “hows” and “whys” behind your configuration. And who knows—you might discover that you have enough passion and aptitude for server administration that you might want to make a career of it! Let’s begin! 72 CHAPTER 4: Understanding Networking as It Relates to Minecraft

Revisiting Our Test Network I want to share another network diagram with you that shows the topology we’ll be work- ing with. “Topology” is a networking term that simply refers to the physical arrangement of computers and associated devices on a single network. You can see the topology in Figure 4.1. Let me describe the major working parts: ■ Workpc1 is a .1 desktop computer that hosts a vanilla Minecraft server. The computer receives its IP address from the cable modem. ■ Win8 is a Windows 8.1 laptop computer that, like Workpc1, obtains its IP address from the cable modem. ■ The cable modem is directly connected to the Internet. The device has an Internet- connected IP address and an internal, private interface that connects to Workpc1 and Win8. The router (because that’s actually what the cable “modem” is) performs Network Address Translation (NAT) and Dynamic Host Configuration Protocol (DHCP) services on behalf of Workpc1 and Win8.

FIGURE 4.1 The home-based network that we’ll use as a case study in this chapter. Learning as We Go: Basic Networking Terminology 73

Learning as We Go: Basic Networking Terminology Rather than give you dry, boring explanations of the basic networking vocabulary terms, we’ll simply use the terms in context as we work with our network devices. You’ll notice that I use the term network devices (or hosts) instead of computers. I do this because on a TCP/IP network, any electronic device that has a network interface card (NIC) installed is considered a node, or device, on that network. By this definition, any of the fol- lowing pieces of hardware can be considered to be network hosts: ■ Laptop computer ■ Smartphone ■ Tablet (iPad, Surface, and so on) ■ Wi-Fi router ■ Smart TV ■ Raspberry Pi ■ Smart watch

TCP/IP stands for Transmission Control Protocol/Internet Protocol, and it describes a whole bunch of networking protocols, of which TCP and IP are only two. TCP/IP has been the standard networking protocol in the world for the past 20 years or so.

IP Addresses For our purposes as Minecraft server administrators, the Internet Protocol (IP) address is the most important concept to master. A networking protocol, such as IP, is simply a set of rules that a TCP/IP host uses to communicate with another host. The sending and receiving of data, in other words. Specifically, a host’s IP address serves to uniquely identify that device on its network. In Figure 4.1, for instance, the cable modem has the IP address 10.1.10.1, Workpc1 has 10.1.10.16, and Win8 has 10.1.10.19. How do we know that these IP addresses exist on the same network? Besides the fact that the devices are all physically (or wirelessly) connected to the cable modem router, we can take a look at their subnet mask. The subnet mask is a combination of decimal 255s and 0s that separates the network por- tion of the address from the host (device) portion. Look at Figure 4.2 to illustrate. 74 CHAPTER 4: Understanding Networking as It Relates to Minecraft

FIGURE 4.2 TCP/IP hosts use their subnet mask to differentiate their network address as well as host ID.

In Figure 4.2, we have computer A, with IP address 10.1.10.16, attempting to exchange data with computer B, with IP address 10.1.20.33. Computer A “examines” its subnet mask, which “covers” up three of the four parts of an IP address, and determines that 10.1.10 is its own network. Because the target IP address is on network 10.1.20, com- puter A “decides” it needs to send its traffic to its default gateway (router). The purpose of the router is to serve as a “traffic director” between different IP networks. To be frank, we don’t need to worry about subnet masks too much for what we’re doing; I just want to make sure that you have a well-rounded understanding.

Private and Public Addresses Let’s return to Figure 4.1. If we install Minecraft server on Workpc1, we should have no trouble connecting to the game from Workpc1 because, as we already discussed, the two computers have the same IP network address. I’ll go so far as to say that if our cable modem had another interface connected to a net- work address of, say, 10.1.20, then those computers still could connect to our game. However, if our friend from across town (or on the other side of the world) tries to connect to your Minecraft server with a 10. IP address, then he or she will never connect. Not ever. What’s going on? It’s a long story, but suffice it to say that the world has run short of public IP addresses that are visible across the Internet. Because of this shortage, routers/cable modems/wireless access points use private IP addresses and two more protocols to bridge the gap. Learning as We Go: Basic Networking Terminology 75

First, about private IP addresses: You might have noticed that whenever you connect to somebody’s Wi-Fi network you receive an IP address from one of the following ranges: ■ 10.0.0.0–10.255.255.255 ■ 172.16.0.0–172.32.255.255 ■ 192.168.0.0–192.168.255.255

Those IP addresses are called private network addresses because the world has agreed never to route them. You simply cannot send or receive data across the Internet by using a pri- vate IP address. Remember what I said about the shortage of public IP addresses; private addresses were developed as a workaround.

Network Address Translation You’re probably wondering, “If my computer can’t communicate on the Internet with a private IP address, then how the heck am I able to surf the Web in the first place?!” The answer is one of those “two additional protocols” I mentioned that your cable modem has: Network Address Translation, or NAT (pronounced like the tiny flying insect). Your cable modem (or whatever device you use to access the public Internet) has only one public IP address. That’s all you get from your Internet service provider (ISP). When I started in IT back in 1997, all computers received public IP addresses from their ISP; those days are long gone now. With NAT, a router can “share” a single public IP address with more than one device on the internal network. Do you see the beauty here? We can have as many devices inside our network as we want because we’re using private IP addressing. All devices connect to the router, and the router serves as a proxy, or go-between, for the Internet and your internal devices. Of course, some of you are now likely wondering, “How do my internal devices get their pri- vate IP addresses? Do they come from the router, my ISP, both, or neither?” That’s actually a great question.

DHCP Dynamic Host Configuration Protocol (DHCP) is a service for dispensing and managing a range of IP addresses to one or more client devices. It’s standard nowadays for your router to serve as a DHCP server. In fact, most routers enable you to edit how DHCP behaves by allowing you to log in to the router directly. Let’s now apply our newfound networking know-how to what’s really important: making our Minecraft server available to players from all over the world! 76 CHAPTER 4: Understanding Networking as It Relates to Minecraft

Taking the Next Step: Preparing Our Network for Minecraft Server I need to issue a word of warning, especially if you’re following along with these procedures in your home network environment. Advertising a vanilla Minecraft server to the Internet from home isn’t something you want to do long-term. The reason for this centers on privacy—you likely have more than just Minecraft data on that box. Do you really want to allow connections from all over the world into your home network and home computer? I didn’t think so. Sure, for testing and learning the technology it’s fine, but if you want to do anything more than host a few close friends for some Minecraft fun, then I suggest that you consider not only using an honest-to-goodness Minecraft host, but also using a third-party server instead of the vanilla one. I already mentioned the security and privacy issue as a “deal breaker” for most home-based Minecraft installations. As you work through the rest of this book I’ll make an excellent case for using an online hosting service—be patient!

Discovering Our Computer’s Networking Configuration You can quickly and easily find out what your computer’s TCP/IP configuration is either by using graphical tools built directly into the operating system, or by using command-line tools. I’ll focus on GUI tools so that we can spend more time analyzing the data and less horsing around with command-line arguments. On Windows computers, follow this procedure: 1 Press Windows+R to bring up the Run dialog box. 2 Type ncpa.cpl and press Enter. This command opens your network connections folder and in my experience is much faster than monkeying around with Control Panel. 3 In the Network Connections folder, double-click the appropriate network interface. 4 In the Ethernet Status window, click Details. 5 In the Network Connection Details window, shown in Figure 4.3, scan the output, pay- ing attention to the following fields: IPv4 Address IPv4 Subnet Mask IPv4 Default Gateway (this is the router’s internal IP address) IPv4 DHCP Server (this should also point to your router’s internal IP address) Taking the Next Step: Preparing Our Network for Minecraft Server 77

FIGURE 4.3 The Windows Control Panel gives us access to all computer TCP/IP configuration settings.

On OS X computers, try the following: 1 Open the Apple menu and click System Preferences. 2 In the System Preferences pane, click Network. 3 In the Network window, shown in Figure 4.4, select your Internet-connected network and scan the results. Pay attention to the following fields: IP Address Subnet Mask Router (this is called “default gateway” in Windows, but the two terms are synonymous) 78 CHAPTER 4: Understanding Networking as It Relates to Minecraft

FIGURE 4.4 Viewing our network connection details in Apple OS X Mavericks.

NOTE IPv4 Versus IPv6 Do you remember when I mentioned the scarcity of IP addresses? Specifically, I’m referring to IP version 4 (IPv4) addresses, which consist of four decimals between 0 and 255. IP version 6 (IPv6) is the next generation of the IP protocol, and has almost infinitely more public addresses available—the addresses themselves are 128 bits long as compared to 32 bits in IPv4, and the numbers are hexadecimal in IPv6 as opposed to decimal in IPv4. We don’t need to be concerned with IPv6 in this chapter, but since I’m sure you saw plenty of references to IPv6, I thought the subject was worth mentioning.

Viewing Our Router’s Configuration Now this is the tricky part because there exists a huge variety of router hardware. Are you a cable Internet subscriber, or do you use DSL? Or satellite? Does your Internet router have a Taking the Next Step: Preparing Our Network for Minecraft Server 79 built-in Wi-Fi access point, or have you “daisy-chained” a Wi-Fi router behind your Internet router? Sheesh—so potentially confusing. Let’s assume that our internal network devices connect to a single Comcast cable modem router. With very few exceptions, you’re allowed to log in to your router directly to make configuration changes. You already know the router’s private IP address; this is your com- puter’s default gateway address. Therefore, open a web browser and navigate to that address by using the web standard Hypertext Transfer Protocol (HTTP). For instance, here’s what I need to type in my brows- er’s address bar to reach my cable modem router: http://10.1.10.1

My router’s web-based console and logon screen is shown in Figure 4.5.

FIGURE 4.5 Most residential routers allow you to log in directly to make configu- ration changes. 80 CHAPTER 4: Understanding Networking as It Relates to Minecraft

TIP

If you neither know nor remember your router’s login details, one thing you can do before filing a support ticket with your ISP is to check the Web. Sites such as RouterPasswords.com enable you to search on your router’s manufacturer and dis- cover the device’s default administrative username and password. It’s for this reason that you should change your router’s password sooner rather than later! Any settings left at their default values are easy targets for malicious users.

After you’re in the router’s web interface, you can browse around to check settings and make changes. Here are some of the high points: ■ Summary of the router’s public and private IPv4 addresses ■ Details concerning its DHCP setup (shown in Figure 4.6) ■ Ability to forward specific traffic to the private internal network from the public Internet

FIGURE 4.6 Your router’s administrative interface tells you exactly how the device operates. Here we see the router’s public and private IPv4 addresses. Allowing Minecraft Traffic Through the Firewall 81

Allowing Minecraft Traffic Through the Firewall Your Internet-facing router acts as a firewall to protect your private internal network. A physical firewall is a divider that separates the passenger compartment from the engine compartment in an automobile; here the word “firewall” takes on a literal meaning. In a TCP/IP computing context, a firewall is hardware and/or software that by default blocks all incoming Internet traffic to internal devices. The firewall is a good thing, believe me. The problem, if you want to call it that, is that your router’s firewall will block any Internet-based player from accessing your internal Minecraft server. That is, unless you for- ward the appropriate port(s).

Ports TCP/IP ports are cool because they allow your computer, which typically has a single IP address, to participate in all sorts of communication and not get “confused.” This is even more important for your router, which is handling different traffic for different internal devices. Think of it: You’re browsing minecraftforum.net from your laptop, while your mom streams YouTube clips to her iPad, while your sister uploads files to her WordPress blog. That’s a lot of network traffic, and it’s all different. Here’s the deal: Different network services use different default port numbers. Here’s a run- down of some of the most popular, well-known port numbers: ■ HTTP (web browsing): 80 ■ HTTPS (secure HTTP): 443 ■ FTP (File Transfer Protocl): 21 ■ SMTP (e-mail): 25 ■ Minecraft (yeah, buddy!): 25565

Of the previously given ports, the only one I want you to memorize is 25565, because that is Minecraft’s default port number. What we want to do is forward inbound traffic on port 25565 to our Minecraft server that’s located on the private internal network. Figure 4.7 summarizes port forwarding. You might be wondering, “How can an Internet player get Minecraft traffic to me when my server has a private IP address? The router has NAT and a public IP address, but the router isn’t the Minecraft server!” We will give our Internet-based friends our router’s public IP address, and they’ll use that to connect to our Minecraft server. The router’s NAT capability takes care of routing the port 25565 traffic to our server. 82 CHAPTER 4: Understanding Networking as It Relates to Minecraft

FIGURE 4.7 Schematic diagram showing how port forwarding works.

Let me walk you through Figure 4.7, because I packed a lot of information into that picture: ■ Notice that the router has a port-forwarding rule defined such that it allows traffic on port 25565 and forwards it to IP 10.1.10.16, which is our Minecraft server. ■ The Internet-based Minecraft client adds a server with the connection address 71.228.251.55:25565 (adding the colon and the port number shouldn’t be neces- sary, but it’s wise to use just to be safe) and is successful in connecting to the Workpc1 server. ■ The FTP client, also Internet based, is unsuccessful in his or her attempt to establish a File Transfer Protocol (FTP) connection to an internal network resource because (a) the router blocks the traffic because it has no firewall exceptions defined; and (b) we don’t have any FTP servers listening for connections in the first place.

I mentioned this in passing, but it bears repeating: You don’t have to include the port num- ber to the IP address if the service uses the default port. This is why you can type http://yahoo.com Allowing Minecraft Traffic Through the Firewall 83 to reach yahoo.com, instead of this: http://yahoo.com:80

Likewise, if your Minecraft server listens on its default port (whose value, you’ll recall, is stored as the server-port property in your server.properties configuration file), then you shouldn’t have to include the port. However, those who want to host more than one Minecraft server on the same box will indeed need to concern themselves with port numbers. For instance, if I configured port forwarding for a second Minecraft server instance and I used port 25566, then I’d give this address to my Internet-based friends: 71.228.251.55:25566

Configuring Port Forwarding Now let’s configure our router for port forwarding!

TIP

Although the concept of port forwarding is identical no matter what router brand you have, each router manufacturer has a unique web-based management graphical user interface (GUI). Thus, I suggest that you hit up portforward.com to search for your router brand and receive detailed, step-by-step port-forwarding instructions. If you have a Linksys router, you can visit ui.linksys.com to play with fully functional router management console simulators.

FOLLOW ME! Configuring Port Forwarding for Our Internal Minecraft Server In this exercise we’ll configure my Comcast cable modem to forward Minecraft traffic to my Workpc1 computer at IP address 10.1.10.16. You’ll need to modify these steps slightly to conform to your particular router and IP addresses. 1 Log in to your router as an administrator and navigate to the page on which you can do port forwarding. In Figure 4.8, you can see the home page for my Comcast cable modem. I can click the handy-dandy Port Configuration button to jump directly to the port-forwarding page, or I can click Firewall and then Port Configuration to arrive at the same web page. 84 CHAPTER 4: Understanding Networking as It Relates to Minecraft

FIGURE 4.8 Router management interfaces sometimes place shortcuts to popu- lar items such as port forwarding right on the home page.

2 On my router’s Port Forwarding page, we click Add New to define a new port- forwarding rule. 3 On the Port Forwarding Add/Edit page, shown in Figure 4.9, I define my rule with the following properties: Name: Minecraft (the name doesn’t matter; this is just for your own reference). Public: 25565-25565 (the range is to allow you to include more than one contiguous port number in one port-forwarding rule). Private: 25565-25565. Protocol: Both (the two choices here are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP); Mojang recommends that you forward both protocols). IP Address: 10.1.10.16 (you’ll substitute your Minecraft server’s private IP address). 4 Click Apply to make the change go into effect. 5 On my router, you also have to check the Enable option to activate the port-forwarding rule. Allowing Minecraft Traffic Through the Firewall 85

FIGURE 4.9 It’s not as difficult as most Minecraft fans think to forward ports through your router or firewall.

Testing the Connection Before we hand out our router’s public IP address to our Minecraft buddies, we should check to verify that our router is actually forwarding port 25565 as expected.

CAUTION

Make sure that you start the Minecraft server on your internal network, or the port- forwarding test will fail. You actually need to have a service online and listening for connections for traffic to make it through your router/firewall.

TIP

The best way to test port forwarding is to use a computer from outside your home network. Many websites exist that can test port forwarding, but I recommend PortCheckTool.com , shown in Figure 4.10, because it both gives us our public IP address and tests port forwarding. 86 CHAPTER 4: Understanding Networking as It Relates to Minecraft

FIGURE 4.10 PortCheckTool.com serves a double duty of (a) giving you your router’s public IP address; and (b) verifying that you configured port forwarding correctly .

To use PortCheckTool, simply plug in your router’s public IP address in the Your IP field, enter 25565 in the What Port field, and click Check Your Port. As you can see in Figure 4.10, you’ll get a “Success!” message if the website can get port 25565 traffic through your router. If you get a failure, (a) make sure your Minecraft server is indeed running on your internal network; and (b) log in to your router and verify that the port-forwarding rule is present and enabled.

Let’s Play! Now run over to one of your Minecraft friends’ homes, fire up the Minecraft client, and add your newly published Minecraft server as shown in Figure 4.11. If all goes well, the newly added server will appear in the server list (see Figure 4.12), and you can join the server’s world as usual. Awesomesauce! Allowing Minecraft Traffic Through the Firewall 87

FIGURE 4.11 You can try leaving the :25565 off the server address if you know that the target Minecraft server listens on the default port address.

FIGURE 4.12 It feels pretty good to see your own Minecraft server in the Minecraft client’s server list! 88 CHAPTER 4: Understanding Networking as It Relates to Minecraft

Using a Hostname Instead of an IP Address Let’s face it—dealing in “raw” IP addresses is tedious. Under the hood, your home router is itself a DHCP client of one of your ISP’s DHCP servers. This means that your router’s public IP address is likely to change at any time, which will immediately break your home-based Minecraft server. I would much rather share the Minecraft server connection name timwarner.ddns.net

than share this: 71.228.251.55:25566

Believe it or not, it is both easy and free to make this happen for your home-based Mine- craft server. To do this, we need to create an account with a Dynamic Domain Name Sys- tem (DDNS) service. These are the two companies I recommend: ■ No-IP (http://noip.com) ■ Dyn (http://dyn.com)

Understanding DNS and DDNS DNS is a TCP/IP network service that translates user-friendly hostnames into IP addresses. For example, if you type http://servers.minecraftforum.net into your browser’s address bar, the DNS server with which your computer is associated attempts to resolve the fully qualified domain name (FQDN), servers.minecraftforum.net, into the IP address of that particular web server. The hostname part of the previous FQDN is “servers”; the domain name is “minecraft- forum.net.” The specifics of DNS name resolution are far outside the scope of this book; for our purposes, all you need to know is that companies like No-IP and Dyn will map an FQDN to your router’s public IP address, and even adjust the mapping on the fly when your router’s public IP changes.

Setting Up No-IP We’ll use No-IP in this example, but all the services work about the same.

FOLLOW ME! Associate Your Minecraft Server By Hostname Instead of IP Address In this exercise, we’ll create a free No-IP account and then map our router’s public IP address to an easy-to-remember hostname. Using a Hostname Instead of an IP Address 89

1 Point your web browser to https://www.noip.com/sign-up and register a new No-IP user account. Ignore or decline any “premium” offers; these DDNS companies make their money by adding features beyond what we need. If you’re reading this while you’re away from your computer, I show you the website in Figure 4.13. 2 Part of the signup involves choosing a domain name; as of this writing, ddns.net is the free option, so I’d suggest you choose that one. As a premium member, you get much more flexibility in your domain names. You also can choose your own hostname; this is where I plugged in “timwarner.” After all, if my Minecraft friends know me, they know my name and will always remember the name of my Minecraft server! 3 After you confirm your account via email and are all logged in, click Hosts/Redirects from the top navigation bar and then Manage Hosts from the side navigation. 4 Verify that your custom FQDN matches your router’s public IP address. There’s no magic going on here, by the way. No-IP discerned your public IP address by querying your current default gateway address. Therefore, you might need to manually modify the mapping if you created your account at school but need the mapping to hit your home router. 5 If you want, click Dynamic Update Client from the side navigation and download/ install this software to your Minecraft server. What it does is check your router’s public IP address every five minutes, and as soon as the client detects a change, it will update your No-IP mapping. Pretty cool, eh?

FIGURE 4.13 It’s amazing that companies such as No-IP offer their dynamic DNS services free. 90 CHAPTER 4: Understanding Networking as It Relates to Minecraft

In Figure 4.14 you see that your players can now add your public Minecraft server to their client’s server list by using a DNS name instead of a clunky IP address.

FIGURE 4.14 Your users will appreciate you for advertising your online Minecraft server with a hostname instead of an IP address.

CAUTION

Please understand that your players might still have to add the :port suffix to your hostname if you aren’t running your Minecraft server by using the default port address.

Sweeping Up the Shavings If you set up a home-based online Minecraft server for experimentation and/or educational purposes, then cool beans. Just be sure to take the proper steps to clean up your environ- ment to maximize your online safety: ■ Issue /stop in the Minecraft server console to halt the server and prevent it from listen- ing for incoming connection requests. ■ Log in to your router and disable your port-forwarding mapping when you no longer need it. ■ Delete your No-IP mapping if you aren’t using it anymore. The Bottom Line 91

In IT, the security principle of “least service” says that if you don’t need a service running on your network, turn it off and/or uninstall it. This way a malicious user can’t abuse or exploit the service, because it simply isn’t turned on in the first place.

The Bottom Line I hope that you feel better about networking than you did before reading this chapter. To be sure, the knowledge and skills you have accrued by now will keep you in excellent stead as we proceed to the next phase of the book. What is that phase, you ask? Well, it’s time for us to say goodbye to the trusty Mojang “vanilla” Minecraft server and say hello to custom Minecraft servers in general, and the Bukkit platform in particular. See you then! This page intentionally left blank INDEX

A AdF.ly Skipper extension, 189 The Advanced to Minecraft @a target selector, 151 (O’Brien), 122 Absolute Beginner’s Guide to Minecraft Mods Adventure mode, 6 Programming (Cadenhead), 26 Adventurize web portal, 217 accessing multiplayer game, 6 advertising, 228 accounts, BuyCraft, 220-223 in-game advertising and sponsorship, Adams, Scott, 25 216-217 AdCraft, 217 on Minecraft server lists, 228-229 addresses server registration, 231 connection addresses, 15 server status banners, 229-231 IP addresses voting, 232 banning, 62 Agrarian Skies 2, 241, 245 DHCP (Dynamic Host Confi guration agreeing to EULA, 34-35 Protocol), 75 Alexander, Scott, 209 explained, 73-74 allow-fl ight property, 50 fi nding, 39 allow-nether property, 49 hostnames versus, 88 Anarchy minigame, 14 IPv4 versus IPv6, 78 Angelou, Maya, 93 mapping to hostnames, 88-90 Announcement, 213-214 NAT (Network Address Translation), 75 announce-player-achievements property, 49 public versus private addresses, 74-75 AntVenom, 243 248 %appdata% variable

%appdata% variable, 123 /ban command, 61-63, 192 (application programming /ban-ip command, 61-63, 192 interfaces) banners, server status banners, 229-231 BukGet, 172 basic servers. See vanilla servers Minecraft Forge BeastNode, 183, 238 explained, 114 Berra, Yogi, 45 installing, 115-116 BisectHosting, 183, 238 application programming interfaces. blacklist (Essentials plugin), 108 See APIs blocking griefers, 190-194 Assassin’s Creep, 244 blocks (command) Asterion Minecraft, 135 explained, 150 ATLauncher, 134-135 programming, 152-153 Atonement: Sins of the Past, 241 target selectors, 151 attacks BuildCraft, 122 DDoS (distributed denial-of-service) BuildTools instructions, 95 attacks, 186-188 BukGet, 172 DoS (denial-of-service) attacks, 186 Bukkit grief protection history of, 93-94 blocking griefers, 190-194 plugins. See plugins hacking yourself, 189 BukkitWiki, 98 overview, 188 bukkit.yml fi le, 98 tips for addressing griefers, 194 BungeeCord, 208 auto-afk (Essentials plugin), 107 BuyCraft, 212, 220 auto-afk-kick (Essentials plugin), 107 creating BuyCraft account, 220-223 autocomplete, 57 creating free packages, 226-227 availability of third-party hosts, 162 creating paid packages, 223-225 giving paid item to all players, 225 B buying Minecraft license, 7-8, 34 Buy Realms Subscription page backups, Minecraft Realms (Minecraft Realms), 140 forcing, 155 viewing, 154 console commands 249

C Minecraft Realms backups, 154-155 Cadenhead, Rogers, 26 creating realms, 142-144 CaptainSparklez, 243 explained, 139-140 Capture the Flag minigame, 14 inviting players, 145-147 Cauldron managing players, 148-150 explained, 113-114 restoring worlds, 157 installing, 117 subscribing to, 140-141 chat uploading worlds to, 156-157 chat window, clearing, 57 Combat Pack, 241 console commands for, 55-58 command blocks, 57 MCProHosting, 174 explained, 150 in multiplayer game, 20-23 programming, 152-153 chat window, clearing, 57 target selectors, 151 choosing third-party host, 161-162 command-costs (Essentials plugin), Chrome, 100, 189 107 City minigame, 14 console commands clearing chat window, 57 /ban, 192 ClearLagg, 101, 240 /ban-i, 192 client mods, 135 for chat messages, 55-58 clients Essentials plugin, 112 client mods, 135 /gamerule, 148 client/server applications, 22 /give, 150 defi ned, 22 for giving items, 59 Forge client /kick, 192 explained, 114 /list, 148 installing, 115-116 list of, 56 client/server applications, 22 /mvp, 205 Close-Together Biomes, 245 pl, 120 CloudFlare, 188 for player discipline, 59-64 cloud services /setworldspawn, 148 advantages/disadvantages, 139 explained, 137-139 250 console commands

in SpigotMC, 96 Creative mode, 6 /summon, 148 CreeperHost, 183, 238 for teleportation, 59 Cube Craft Games, 239 /time, 148 CubedHost, 238 /toggledownfall, 148 Cubeville, 233-234 for vanilla servers, 37-42 currency-symbol (Essentials plugin), confi g fi les 107 editing on MCProHosting, 175-176 custom-join-message (Essentials plugin), 107 for vanilla servers, 35-37 custom maps, 244-245 Confi gure Realm screen (Minecraft Realms), 145 custom-quit-message (Essentials plugin), 107 confi guring custom server entries, creating, 234 Essentials plugin, 106-108 custom servers. See plugins Minecraft server on MCProHosting, 169-170 Bukkit/CraftBukkit, 93-94 port forwarding, 83-85 Cauldron SpigotMC, 97-98 explained, 113-114 confi g.yml fi le, 106-108 installing, 117 connecting multiple worlds, 206-207 SpigotMC connection addresses, 15 changing version numbers, 104-105 console commands. See commands confi guring, 97-98 Control Panel (MCProHosting), installing, 95-96 168-169 reasons for using, 94 Cops & Robbers, 14, 244 starting, 96-97 CoreProtect, 192 testing player experience, 99-100 cosmetic upgrade sales, 217-219 cracked launchers, avoiding, 8-9 D CraftBukkit, 93-94 CraftBukkitUpToDate, 240 day/night cycle, 40 Crash Landing, 241 DDNS (Dynamic Domain Name Create Realm button (Minecraft System), 88 Realms), 144 DDoS (distributed denial-of-service) attacks, 186-188 Essentials Wiki 251 debug window, opening, 59 Dreamcraft, 239 dedicated servers, 161 Dropbox, 177 Default HD, 242 Dynamic Domain Name System default port numbers, 81-83 (DDNS), 88 demo copy limitations, 7 Dynamic Host Confi guration Protocol (DHCP), 75 denial-of-service (DoS) attacks, 186 Dyn (hostname service), 88 deploying portals, 203-205 resource packs with MCProHosting, E 177-180 DHCP (Dynamic Host Confi guration @e target selector, 151 Protocol), 75 Economy, 14, 244 Diamond Desert Temple, 245 editing confi g fi les on MCProHosting, diffi culty property, 49 175-176 Direwolf20, 241 editions of McMyAdmin, 68 Direwolf server, 132 enable-command-block property, 49 disciplining players, console commands enable-query property, 49 for, 59-64 enable-rcon property, 50 distributed denial-of-service (DDoS) end user license agreement (EULA), 11, attacks, 186-188 210-211 Diversity 2, 244 agreeing for vanilla servers, 34-35 DNS (Domain Name System), 88 for Minecraft servers, 10 domain name mapping, 180-182 Engineering with Minecraft (Kelly), 196 Domain Name System (DNS), 88 EnviousHost, 238 DonationCraft, 240 Equanimity, 242 donations, soliciting, 212-216 errors. See troubleshooting DoS (denial-of-service) attacks, 186 Essentials, 101, 240 downloading confi guring, 106-108 FTB (Feed the Beast), 130 installing, 102-105 JRE (Java Runtime Environment), testing player experience, 108-112 27-28 Essentials Wiki, 112 PEX (PermissionsEx) plugin, 118 252 EULA (end user license agreement)

EULA (end user license agreement), 11, Forge client 210-211 explained, 114 agreeing for vanilla servers, 34-35 installing, 115-116 for Minecraft servers, 10 FQDN (fully qualifi ed domain name), extensions for Google Chrome, 100 88 Fragnet, 238 F free packages, creating, 226-227 FTB (Feed the Beast), 14, 241 Faction, 14, 244 downloading, 130 FadeCloud, 239 installing FTB server, 132-133 Faithful 32x32, 177, 242 setting up, 130-131 Feed the Beast (FTB), 14, 241 starting FTB launcher, 134 downloading, 130 fully qualifi ed domain name (FQDN), installing FTB server, 132-133 88 setting up, 130-131 starting FTB launcher, 134 G fi le extensions, viewing, 31 fi nding gamemode property, 49 IP addresses, 39 /gamerule console command, 40 item IDs, 59 /gamerule doDaylightCycle false command, 148 online servers gaming experience, improving, 185 connection addresses, 15 multiple worlds EULA stipulations, 10-11 connecting, 206-207 Minecraft Forum, 11-14 Multiverse Core, 202-203 public versus whitelist servers, 15-16 Multiverse Portals, 202 vanilla servers online, 43-44 portal deployment, 203-205 version numbers in SpigotMC, 99-100 teleporting between, 203 fi rewalls, 81 server protection fl exibility of third-party hosts, 162 DDoS (distributed denial-of-service) Floating Island, 245 attacks, 186-188 force-gamemode property, 49 grief protection, 188-194 forcing Minecraft Realms backups, 155 motivations of server abusers, 186 improving gaming experience 253

world spawn, 194 hardcore property, 49 building spawn lobbies, 196-198 Hardcore PvP minigame, 14 setting server spawn, 195 /help console command, 19-20, 37 WorldEdit, 199-201 help system in multiplayer game, 19-20 Gandhi, Mahatma, 185 Herobrine’s Mansion, 244 generate-structures property, 50 Hexxit, 241 generator-settings property, 49 history of Bukkit/CraftBukkit, 93-94 generic servers. See vanilla servers hostnames, 88 Get Realms button (Minecraft Realms), DNS (Domain Name System), 88 140 No-IP confi guration, 88-90 GGServers, 183, 238 hosts, top 10 Minecraft hosts, 237-238 GigaTech, 135 Hotel Paradise, 245 /give command, 59, 150 Hunger Games minigame, 14 GiveAllItems Bukkit plugin, 225 , 239 giving items console commands for, 59 giving paid items to all players, 225 I GoDaddy, 180-182 identity theft, 186 Google Chrome, 100, 189 improving gaming experience, 185 griefi ng, 15, 59-60 multiple worlds grief protection connecting, 206-207 blocking griefers, 190-194 Multiverse Core, 202-203 hacking yourself, 189 Multiverse Portals, 202 overview, 188 portal deployment, 203-205 tips for addressing griefers, 194 teleporting between, 203 GroupManager, 240 server protection DDoS (distributed denial-of-service) H attacks, 186-188 grief protection, 188-194 hacking yourself, 189 motivations of server abusers, 186 hacktivism, 186 Hardcore mode, 6 254 improving gaming experience

world spawn, 194 explained, 73-74 building spawn lobbies, 196-198 fi nding, 39 setting server spawn, 195 hostnames versus, 88 WorldEdit, 199-201 IPv4 versus IPv6, 78 IndustrialCraft2, 122 mapping to hostnames, 88-90 in-game advertising and sponsorship, NAT (Network Address Translation), 216-217 75 installing public versus private addresses, 74-75 Cauldron, 117 IPv4 addresses, 78 Forge client, 115-116 IPv6 addresses, 78 FTB (Feed the Beast) server, 132-133 item IDs, fi nding, 59 JRE (Java Runtime Environment), item-spawn-blacklist (Essentials 27-28 plugin), 107 McMyAdmin, 66 Minecraft, 8 mods, 122-123 plugins Java environment preparation, 25 Essentials plugin, 102-105 JRE installation, 27-28 MCProHosting, 172-173 verifying Java version, 26-27 number to install, 102 Java Runtime Environment (JRE), 27-28 Railcraft, 122-123 JavaScript Object Notation (JSON), 37 SpigotMC, 95-96 java - version command errors, 27 vanilla servers JeromeASF, 243 on Mac OS X, 31-33 John Smith Legacy, 242 on Windows, 29-30 joining Internet Protocol (IP) addresses. See IP MCProHosting, 163-168 addresses online servers, 16-19 Intreppid, 186 JRE (Java Runtime Environment), 27-28 inviting players in Minecraft Realms, JSON (JavaScript Object Notation), 37 145-147 IP addresses banning, 62 DHCP (Dynamic Host Confi guration Protocol), 75 McMyAdmin 255

K location coordinates, 59 logfi les, reading, 52-54 Kelly, James Floyd, 196 logging in to MCProHosting, 170-171 /kick command, 60-61, 192 kit:tools (Essentials plugin), 108 M kits (Essentials plugin), 107 Mac OS X L fi nding IP addresses, 39 startup scripts, 96 LAN (local area network) servers TCP/IP confi guration settings, 77 defi ned, 10 vanilla server installation, 31-33 opening single-player game to, 68-70 verifying Java version, 27 user connections, 50-52 viewing fi le extensions, 31 launchers Magic Farm 3: Harvest, 241 Asterion Minecraft, 135 managing ATLauncher, 134-135 players in Minecraft Realms, 148-150 avoiding cracked, 8-9 vanilla servers with McMyAdmin, FTB (Feed the Beast) launcher, 134 65-68 GigaTech, 135 Manneh, Carl, 137, 157 TechnicPack, 135 mapping VoidLauncher, 135 hostnames to IP addresses, 88-90 level-name property, 50 servers to domains, 180-182 level-seed property, 50 maps, top 10 Minecraft custom maps, level-type property, 49 244-245 license for Minecraft, buying, 7-8, 34 MarioKart, 242 Lichcraft, 239 max-build-height property, 50 /list command, 21, 148 max-players property, 49 lists, advertising on, 228-229 max-tick-time property, 49 lobbies (spawn), building, 196-198 max-world-size property, 49 local area network (LAN) servers MCEdit, 197-198 defi ned, 10 MC-Legends, 239 opening single-player game to, 68-70 McMyAdmin, 65-68 user connections, 50-52 256 MCProHosting

MCProHosting, 238 restoring worlds, 157 chat, 174 subscribing to, 140-141 confi guring and starting Minecraft uploading worlds to, 156-157 server, 169-170 Minecraft Schematics, 197 Control Panel, 168-169 Minecraft seeds, 245-246 deploying resource packs, 177-180 Minecraft server lists, advertising on, domain name mapping, 180-182 228-229 editing confi g fi les, 175-176 Minecraft Wiki, 56 installing plugins, 172-173 , 239 joining, 163-168 Minevolution, 245 logging in, 170-171 minigames, 14-15, 243-244 MCSchematics, 197 modpacks /me console command, 58 BuildCraft, 122 Mega Mountains, 246 FTB (Feed the Beast), 14, 241 message of the day (MOTD), 235 downloading, 130 Micro Cubes, 245 installing FTB server, 132-133 Microsoft’s purchase of Mojang, 211 setting up, 130-131 Minecraft EULA (end user license starting FTB launcher, 134 agreement), 210-211 IndustrialCraft2, 122 Minecraft Forge launchers, 134-135 explained, 114 Pixelmon, 122 installing, 115-116 Railcraft Minecraft Forum, 11-14, 184 explained, 122 Minecraft hosts, 237-238 installing, 122-123 Minecraftopia, 59 testing, 125-129 Minecraft Realms, 10 Tinkers Construct, 122 backups top 10 modpacks, 240-241 forcing, 155 mods, 113, 122 viewing, 154 BuildCraft, 122 creating realms, 142-144 Cauldron project, 113-114 explained, 139-140 client mods, 135 inviting players, 145-147 managing players, 148-150 multiple worlds 257

FTB (Feed the Beast), 14, 241 cosmetic upgrade sales, 217-219 downloading, 130 Cubeville example, 233-234 installing FTB server, 132-133 custom server entries, 234 setting up, 130-131 donations, 212-216 starting FTB launcher, 134 in-game advertising and sponsorship, IndustrialCraft2, 122 216-217 launchers, 134-135 Minecraft EULA (end user license agreement), 210-211 Minecraft Forge Mojang’s position on, 210 explained, 114 MOTD (message of the day), 235 installing, 115-116 overview, 209 Optifi ne, 135 VIP server access/subscriptions, Pixelmon, 122 219-220 plugins versus, 100 MOTD (message of the day), 235 programming, 26 motd property, 50 Railcraft motivations of server abusers, 186 explained, 122 Multicraft, 162 installing, 122-123 multiplayer game testing, 125-129 accessing, 6 Rei’s Minimap, 135 chatting in, 20-23 Tekkit, 122 defi ned, 10 Tinkers Construct, 122 game types, 10 TooManyItems, 135 help system, 19-20 monetizing Minecraft server minigames, 14-15 advertising your server netiquette, 19, 23-24 on Minecraft server lists, 228-229 opening single-player game as, 68-70 server registration, 231 multiple server instances, running, server status banners, 229-231 42-43 voting, 232 multiple worlds BuyCraft connecting, 206-207 creating BuyCraft account, 220-223 Multiverse Core, 202-203 creating free packages, 226-227 Multiverse Portals, 202 creating paid packages, 223-225 giving paid item to all players, 225 258 multiple worlds

portal deployment, 203-205 NAT (Network Address Translation), 75 teleporting between, 203 public versus private addresses, 74-75 Multiverse, 240 NAT (Network Address Translation), Multiverse Core, 102, 202-203 75 Multiverse Portals, 202 port forwarding /mvp command, 205 confi guring, 83-85 MythCraft, 239 explained, 81-83 testing, 85-87 port numbers, 81-83 N router confi guration settings, 78-80 NAT (Network Address Translation), 75 security issues, 90-91 Nether Fortress, 246 TCP/IP confi guration settings, 76-78 netiquette in multiplayer game, 19, terminology, 73 23-24 topology, 72 Network Address Translation (NAT), 75 Nitrous Networks, 238 network-compression-threshold NoCheatPlus, 190 property, 49 NodeCraft, 238 networks Nodus, 188 DHCP (Dynamic Host Confi guration No-IP (hostname service), 88-90 Protocol), 75 fi rewalls, 81 hostnames O DNS (Domain Name System), 88 O’Brien, Stephen, 122 No-IP confi guration, 88-90 online-mode property, 50 IP addresses online servers banning, 62 defi ned, 10 DHCP (Dynamic Host Confi guration fi nding Protocol), 75 connection addresses, 15 explained, 73-74 EULA stipulations, 10-11 fi nding, 39 Minecraft Forum, 11-14 hostnames versus, 88 public versus whitelist servers, 15-16 IPv4 versus IPv6, 78 vanilla servers, 43-44 mapping to hostnames, 88-90 joining, 16-19 plugins 259 on-premises services, 137 PEX (PermissionsEx) plugin, 240 /op console command, 38 downloading, 118 opening quick start, 118-120 debug window, 59 testing, 120-121 single-player game as multiplayer, Pixelmon, 122, 241 68-70 PixelmonCraft, 239 op-permission-level property, 49 Pixel Perfection, 242 OPs, 22 player connections to vanilla servers, ops-name-color (Essentials plugin), 107 86-87 Optifi ne, 135 player experience, testing OS X. See Mac OS X Essentials plugin, 108-112 Ownage Hosting, 183 in SpigotMC, 99-100 player-idle-timeout property, 49 P player interactions chat messages, 55-58 @p target selector, 151 disciplining players, 59-64 packages, creating giving items, 59 free packages, 226-227 inviting in Minecraft Realms, 145-147 paid packages, 223-225 managing in Minecraft Realms, paid items, giving to all players, 225 148-150 paid packages, creating, 223-225 teleportation, 59 /pardon console command, 63-64 player list, viewing, 56 /pardon-ip console command, 63-64 Player versus Environment (PvE) minigame, 15 Parkour, 14, 243 (PvP) minigame, 14 passwords, 80 pl command, 120 Perlis, Alan, 71 plugins PermissionsEx (PEX) plugin, 240 AdCraft, 217 downloading, 118 Announcement, 213-214 quick start, 118-120 BuyCraft. See BuyCraft testing, 120-121 confi guring, 106-108 PermissionsEx plugin, 101 defi ned, 100 GiveAllItems, 225 260 plugins

installing, 102-105 grief protection MCProHosting, 172-173 blocking griefers, 190-194 mods versus, 100 hacking yourself, 189 most popular, 100-102 overview, 188 NoCheatPlus, 190 tips for addressing griefers, 194 number to install, 102 motivations of server abusers, 186 PEX (PermissionsEx) proxies, 208 downloading, 118 public IP addresses, 74-75 quick start, 118-120 public servers testing, 120-121 top 10 servers, 239 testing player experience, 108-112 whitelist servers versus, 15-16 top 10 Bukkit plugins, 240 purchasing Minecraft license, 7-8, 34 VIP, 219-220 PvP, 244 Popular MMOs, 243 pvp property, 49 portals, deploying, 203-205 PortCheckTool.com, 85 Q-R port forwarding confi guring, 83-85 @r target selector, 151 explained, 81-83 Railcraft testing, 85-87 explained, 122 port numbers, 81-83 installing, 122-123 prevent:spawn (Essentials plugin), 107 testing, 125-129 Prison, 15, 244 rain, starting/stopping, 40 privacy issues, 76 RAM (random access memory) system private IP addresses, 74-75 requirements, 34 programming mods, 26 reading logfi les, 52-54 programming command blocks, Realms, 10 152-153 backups protecting servers, 186 forcing, 155 DDoS (distributed denial-of-service) viewing, 154 attacks, 186-188 creating realms, 142-144 explained, 139-140 inviting players, 145-147 server monetization 261

managing players, 148-150 preparing land for, 197 restoring worlds, 157 with MCEdit, 197-198 subscribing to, 140-141 with WorldEdit, 199-201 uploading worlds to, 156-157 security, 186 Realm Templates screen (Minecraft DDoS (distributed denial-of-service) Realms), 144 attacks, 186-188 MinecraftSchematics, 197 grief protection registering servers, 231 blocking griefers, 190-194 Rei’s Minimap, 135 hacking yourself, 189 repositories overview, 188 Bukkit plugins, 100 tips for addressing griefers, 194 Essentials plugin, 102 motivations of server abusers, 186 reputation of third-party hosts, 161 network services, 90-91 resource-pack-hash property, 49 routers, 80 resource-pack property, 50 vanilla servers, warning about, 76 resource packs seeds, 245-246 deploying with MCProHosting, Select Template button (Minecraft 177-180 Realms), 144 top 10 resource packs, 242 server console, 53 restoring worlds in Minecraft Realms, server-ip property, 50 157 server monetization router confi guration settings, 78-80 advertising your server routers, port forwarding on Minecraft server lists, 228-229 confi guring, 83-85 server registration, 231 testing, 85-87 server status banners, 229-231 Runescape Pack, 242 voting, 232 running multiple server instances, 42-43 BuyCraft Russell, Bertrand, 113 creating BuyCraft account, 220-223 creating free packages, 226-227 S creating paid packages, 223-225 giving paid item to all players, 225 /say console command, 40, 55 cosmetic upgrade sales, 217-219 schematics, 197-198 Cubeville example, 233-234 popular schematic sites, 197 262 server monetization

custom server entries, 234 monetization donations, 212-216 advertising your server, 228-232 in-game advertising and sponsorship, BuyCraft, 220-227 216-217 cosmetic upgrade sales, 217-219 Minecraft EULA (end user license Cubeville example, 233-234 agreement), 210-211 custom server entries, 234 Mojang’s position on, 210 donations, 212-216 MOTD (message of the day), 235 in-game advertising and sponsorship, overview, 209 216-217 VIP server access/subscriptions, Minecraft EULA (end user license 219-220 agreement), 210-211 server-port property, 50 Mojang’s position on, 210 server.properties fi le MOTD (message of the day), 235 confi guring SpigotMC, 98 overview, 209 settings, 48-50 VIP server access/subscriptions, 219-220 server registration, 231 online servers servers connection addresses, 15 custom servers defi ned, 10 Bukkit/CraftBukkit history, 93-94 EULA stipulations, 10-11 Cauldron, 113-114, 117 fi nding, 11-14 changing version numbers, 104-105 joining, 16-19 installing SpigotMC, 95-100 public versus whitelist servers, 15-16 dedicated servers, 161 protecting defi ned, 22 DDoS (distributed denial-of-service) Direwolf, 132 attacks, 186-188 FTB (Feed the Beast) server, installing, grief protection, 188-194 132-133 motivations of server abusers, 186 LAN servers registering, 231 defi ned, 10 system requirements, 34 opening single-player game to, 68-70 top 10 public Minecraft servers, 239 mapping to domains, 180-182 uptimes, 13 Minecraft Realms, 10 vanilla servers advantages/disadvantages, 28-29 agreeing to EULA, 34-35 spawn-npcs property 263

chat messages, 55-58 on-premises services, 137 confi guration fi les, 35-37 third-party hosting console commands, 37-42 BeastNode, 183 fi nding online, 43-44 Bisect Hosting, 183 giving items, 59 choosing hosts, 161-162 installing on Mac OS X, 31-33 Host, 183 installing on Windows, 29-30 dedicated servers, 161 Java environment preparation, 25-28 GGServers, 183 logfi les, 53-54 MCProHosting, 163-182 managing with McMyAdmin, 65-68 overview, 159 mapping IP address to hostname, 88-90 Ownage Hosting, 183 meaning of term, 28, 34 VPSs (virtual private servers), 160 player connections, 86-87 /setworldspawn command, 148 player discipline, 59-64 showing. See viewing port forwarding confi guration, 83-85 signing up with Minecraft Realms, running multiple instances, 42-43 140-141 security, 90-91 signs (Essentials plugin), 107 security issues, 76 single-player game server console UI, 53 modes of play, 6 server.properties fi le settings, 48-50 opening to multiplayer, 68-70 teleportation, 59 Skyblock, 15, 243 test environment, 45-46 SkyDoesMinecraft, 243 testing port forwarding, 85-87 Skywars, 244 user connections via LAN, 50-52 snooper-enabled property, 49 UUIDs, 53-55 Soartex Fanver, 242 VPSs (virtual private servers), 160 Soartex Invictus, 242 server specifi cations (third-party hosts), soliciting donations, 212-216 161 spawn-animals property, 50 server status banners, 229-231 Spawn Beside Jungle Temple, 245 services spawn lobbies, building, 196-198 cloud services. See also Minecraft spawn-monsters property, 49 Realms spawn-npcs property, 50 advantages/disadvantages, 139 explained, 137-139 264 spawn-protection property

spawn-protection property, 48 /summon command, 148 Spectator mode, 6 Sun Tzu, 5 SpigotMC Survival Games, 244 changing version numbers, 104-105 , 6 confi guring, 97-98 Swamp and Witch Hut, 246 installing, 95-96 The Syndicate Project, 243 reasons for using, 94 system requirements starting, 96-97 for McMyAdmin, 67 testing player experience, 99-100 for Minecraft, 7 SpigotMC Wiki, 98 for servers, 34 spigot.yml fi le, 98 Spleef, 244 T sponsorship, 216-217 SSundee, 243 Tab key Stampy, 243 autocomplete, 57 Stampy Cat, 209 viewing player list, 56 stampylonghead YouTube channel, 209 target selectors, 151 Stampy World, 245 TCP/IP (Transmission Control starting Protocol/Internet Protocol), 73, FTB (Feed the Beast) launcher, 134 76-78 Minecraft server on MCProHosting, TechnicPack, 135 169-170 Tekkit, 15, 122, 241 SpigotMC, 96-97 teleportation starting-balance (Essentials plugin), console commands for, 59 107 teleporting between worlds, 203 startup scripts, creating, 96 teleport-cooldown (Essentials plugin), status banners, 229-231 107 /stop console command, 40-42 /tell console command, 20, 57 Stronghold in Ravine, 245 terminology for networks, 73 Sublime Text, 47-48 testing subnet masks, 73-74 Essentials plugin, 108-112 subscribing to Minecraft Realms, PEX (PermissionsEx) plugin, 120-121 140-141 universally unique identifiers (UUIDs) 265

player experience in SpigotMC, /time set day 1000 command, 148 99-100 Tinkers Construct, 122 port forwarding, 85-87 /toggledownfall command, 40, 148 Railcraft, 125-129 TolkienCraft II, 244 test environment for vanilla servers, TooManyItems, 135 45-46 Top 10 lists, 237 text editors, Sublime Text, 47-48 Bukkit plugins, 240 texture packs, 242 custom maps, 244-245 TheArchon, 239 Minecraft hosts, 237-238 TheBajanCanadian, 243 Minecraft seeds, 245-246 TheDiamondMinecart, 243 Minecraft YouTubers, 243 third-party hosting minigames, 243-244 BeastNode, 183 modpacks, 240-241 Bisect Hosting, 183 public Minecraft servers, 239 choosing hosts, 161-162 resource packs, 242 Creeper Host, 183 topology of networks, 72 dedicated servers, 161 TownCraft, 194 GGServers, 183 /tp console command, 59 MCProHosting Transmission Control Protocol/Internet chat, 174 Protocol (TCP/IP), 73 confi guring and starting Minecraft server, troubleshooting 169-170 java - version command errors, 27 Control Panel, 168-169 port forwarding errors, 86 deploying resource packs, 177-180 SpigotMC console commands, 96 domain name mapping, 180-182 typos, 33 editing confi g fi les, 175-176 typos, 33 installing plugins, 172-173 joining, 163-168 logging in, 170-171 U overview, 159 UI (user interface) for server console, Ownage Hosting, 183 53 VPSs (virtual private servers), 160 Underwater Temple, 245 /time console command, 40 universally unique identifi ers (UUIDs), 53-55 266 uploading worlds to Minecraft Realms

uploading worlds to Minecraft Realms, player discipline, console commands 156-157 for, 59-64 uptimes for servers, 13 port forwarding confi guration, 83-85 user connections via LAN, 50-52 running multiple instances, 42-43 user interface (UI) for server console, security, 90-91 53 security issues, 76 UUIDs (universally unique identifi ers), server console UI, 53 53-55 server.properties fi le settings, 48-50 teleportation, console commands for, V 59 test environment, 45-46 vanilla servers testing port forwarding, 85-87 advantages/disadvantages, 28-29 user connections via LAN, 50-52 agreeing to EULA, 34-35 UUIDs, 53-55 chat messages, console commands verifying Java version, 26-27 for, 55-58 version numbers (SpigotMC) confi guration fi les, 35-37 fi nding, 99-100 console commands, 37-42 changing, 104-105 fi nding online, 43-44 view-distance property, 50 giving items, console commands for, viewing 59 fi le extensions, 31 installing Minecraft Realms backups, 154 on Mac OS X, 31-33 player list, 56 on Windows, 29-30 router confi guration settings, 78-80 Java environment preparation, 25 TCP/IP confi guration settings, 76-78 JRE installation, 27-28 Village with Lots of Loot, 245 verifying Java version, 26-27 VIP plugin, 219-220 logfi les, 53-54 VIP server access/subscriptions, managing with McMyAdmin, 65-68 219-220 mapping IP address to hostname, virtual private servers (VPSs), 160 88-90 VoidLauncher, 135 meaning of term, 28, 34 Votifi er, 240 player connections, 86-87 voting, 232 VPSs (virtual private servers), 160 YouTubers, top 10 Minecraft YouTubers 267

W worlds restoring in Minecraft Realms, 157 weather, starting/stopping rain, 40 uploading to Minecraft Realms, WesterosCraft, 244 156-157 white-list property, 50 world spawn, 194 /whitelist console command, 63-64 building spawn lobbies, 196-198 whitelist servers, 15-16 setting server spawn, 195 Windows WorldEdit, 199-201 fi nding IP addresses, 39 Wurst, 188 java - version command errors, 27 McMyAdmin installation, 66 X-Y-Z startup scripts, 96 TCP/IP confi guration settings, 76 Xray Ultimate, 242 vanilla server installation, 29-30 verifying Java version, 26 YAML fi le format, 98 viewing fi le extensions, 31 YouTubers, top 10 Minecraft WorldEdit, 102, 197-201, 240 YouTubers, 243 WorldGuard, 101, 240