Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Minecraft Server Modifications

You're reading from   Building Minecraft Server Modifications Discover how to program your own server plugins and augment your Minecraft server with Bukkit

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781849696005
Length 142 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Cody M. Sommer Cody M. Sommer
Author Profile Icon Cody M. Sommer
Cody M. Sommer
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Building Minecraft Server Modifications
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Deploying a CraftBukkit Server FREE CHAPTER 2. Learning the Bukkit API 3. Creating Your First Bukkit Plugin 4. Testing on the CraftBukkit Server 5. Plugin Commands 6. Player Permissions 7. The Bukkit Event System 8. Making Your Plugin Configurable 9. Saving Your Data 10. The Bukkit Scheduler Index

Setup


You will see the server folder populated with several files and folders. I will go over a few of them now, as shown in the following list, but most of these files will not concern you at this time:

  • The plugins folder: This folder is where you will place all of the Bukkit plugins that you wish to use on your server.

  • The folders that begin with world (world, world_nether, and so on): These folders have been created that include all of the information for the new world of your server. If you already have a Minecraft world that you wish to use, then replace these new folders with your old world folders. Do not attempt to do this while the server is running, as it will cause problems.

  • server.properties: This file holds several options which allow changing how a Minecraft server operates. You can open it with any text editor. There are many settings and most of them are pretty self explanatory. I will go over a few settings in the following list that you may want to modify. For a full list of property explanations, you can visit www.minecraftwiki.net/wiki/Server.properties.

    • pvp=true: The pvp property can be set to a boolean value. PvP stands for player vs. player and sets whether players can attack and harm each other. You will want to set this to true or false depending on whether you want PvP to be on or off, respectively.

    • difficulty=1: The difficulty property can be set to a number 0 to 3. 0 means Peaceful, 1 means Easy, 2 means Normal, and 3 means Hard. Everyone on the server will be playing at this difficulty.

    • gamemode=0: This property determines which game mode players will start in. 0 means Survival, 1 means Creative, and 2 means Adventure.

    • motd=A Minecraft Server: motd stands for Message of the day. This message will be displayed when viewing your server in the Minecraft multiplayer server list as shown in the following screenshot:

    • It is a good idea to set this to a short description of your server, for example, Bukkit plugin testing.

    • online-mode=true: This can be set to false to allow players to connect to the server while in offline mode. This can be useful if http://minecraft.net/ is unavailable or your computer is not connected to the Internet. Running your server in offline mode can cause security issues, such as other players logging in to your account.

  • bukkit.yml: This file contains many more server options. These are the options that a vanilla server does not offer and are only available through running a CraftBukkit server. You will notice that this file is a YMAL (.yml) file rather than a PROPERTIES (.properties) file. When you open it, you will see how the two file types are formatted differently. The first difference that you will notice is that certain lines are indented. You do not need to fully understand the YMAL formatting, as it will be explained further as we progress through making the Bukkit plugins. There are a few settings in this file that I will bring to your attention, as shown in the following list. For a full list of these Bukkit settings you can visit wiki.bukkit.org/Bukkit.yml:

    • allow-end: true: A vanilla Minecraft server allows you to disable the nether world from functioning. A Bukkit server allows you to disable the end world as well. Set this to false to prevent players from traveling to the end.

    • use-exact-login-location: false: Vanilla Minecraft contains a feature that will prevent players from spawning inside a block. The player will instead be spawned above the block, so they will not suffocate and die. This can easily be exploited to be able to climb onto blocks that a player could normally not reach. Bukkit can prevent this from occurring by spawning the player exactly where they logged out. Set this property to true if you wish to prevent this exploit.

    • spawn-limits: Bukkit allows a server admin to modify how many monsters and animals are allowed to spawn within any given chunk. If you are unfamiliar with the term chunk, it is a group of 16 x 16 blocks from bedrock to the highest point of the sky. The following is a picture of a single chunk in Minecraft:

      If you feel that there are too many (or too few) mobs, then you will want to adjust these values accordingly.

    • ticks-per: autosave: 0: Unlike vanilla Minecraft, a Bukkit server will not periodically save your player/world data. Automatically saving may prevent the server from losing any changes that were made within the game if it were to crash or shut down for any reason (such as the computer losing power). Vanilla defaults this setting to 6000. There are 20 ticks every second. We can determine how long 6000 ticks is with the following math: 6000 ticks / 20 ticks/second = 300 seconds and 300 seconds / 60 seconds/minute = 5 minutes. From the previous calculation you should be able to calculate an appropriate time period that you wish your server to autosave. If your server lags whenever it saves, then you may want to increase this number. A setting of 72000 would only cause lag once every hour; however, if the server crashes right before it saves, then you may lose any progress you have made in the past hour.

You have been reading a chapter from
Building Minecraft Server Modifications
Published in: Sep 2013
Publisher: Packt
ISBN-13: 9781849696005
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image