📜 ⬆️ ⬇️

Explore platforms for minecraft server. Creating your own Minecraft server

Content


1. Content
2. Goals and objectives
3. Choosing a server platform
4. Project Description
5. Conclusions and perspectives
6. Instructions for users
7. References

Targets and goals


purpose
Create a popular game server for the minecraft gaming program.
Choose a more convenient and functional platform for the game server.
Supplement the server with unique functions.

Tasks
1. To determine the platform.
2. Come up with a "highlight" for the server.
3. Learn the java programming language.
4. To study the syntax of configuration files.
5. Learn how to store information on the server.
6. Pick up third-party plug-ins.
7. Customize plugins.
8. Create a website for the server.
9. Implement additional features by creating your own plug-ins and mods.
')

Choosing a server platform


Most often, when creating any server, it is most difficult to choose a platform for activity. In the world, no matter how we decided to create a server, a lot of developers and their software pops up. But not every person can make a choice, and choose a software package that is really worthy of the functions that he is looking for.

Having decided to create a server for the popular minecraft game developed by Mojang, which is the leader of the gaming industry in indie games, first of all I set a goal to “Choose a more convenient and functional platform for the game server”.

Starting to solve this problem, I studied in detail most of the directions and examples of server programs. The preference was given to the strongest: "Spout", "Bukkit" and "Vanilla" (server from official developers).

Each of the directions has its pros and cons. Let's start with the analysis of each direction separately.
"Vanilla" is a server from the official developers of the game. It supports all sorts of mods that users can install in a single game. Thus, the administrator can choose a set of unique mods, to the point that will change the game beyond recognition. Also, if there are mods, then they must also be installed in the client to the players, for this purpose you need your own launcher or installation file, this can be considered both a plus and a minus. T.K. Many players simply do not want to download anything else to play on your server, on the other hand, this allows you to control the presence of players' cheats. The server file structure, procedures, and functions are identical to the client, making it easy to add or change it. This server has a number of significant drawbacks:

1. To make a server suitable for a game, you need to strongly complement it with mods.
2. Minecraft server cannot work with a large number of players, at first the server takes up little memory, but with each player the amount of memory needed for operation grows by about 50MB. Thus, not allowing the server to work normally already with 50 players.

image

Benefits

1. It has an attractive and convenient console for management.
2. Put the mod on such a server is much easier than the rest.
3. Used as a basis for all servers, bukkit and spout changed it to fit their needs and made their own improvements.
4. There are a lot of references on setting up a minecraft server and writing mods for it, both in the English and Russian versions.

“Bukkit” is a server from a group of enthusiasts who wanted to make minecraft servers better. It allows you to connect plugins and mods, but it is quite difficult to connect mods to it, you first need to port them to the minecraft server, and then try to port them to bukkit. If you install mods as well as when working with a minecraft server, you need to develop your own launcher. And the plugins, on the contrary, work on the server side and do not require client modifications. There are more and more plug-ins now, it allows you to make the server unique by simply installing different plug-ins and setting them up. Installing small plugins is not difficult, and for this reason, there are a lot of servers on the Internet right now. Server files are divided into folders and it is convenient to work with them if you need to change something. But the functions and procedures are very different from the client and the minecraft server, which makes programming very difficult.

disadvantages
1. At startup, it immediately takes a lot of RAM.
2. The longer the server runs, the more RAM it needs, even if there are few players.
3. It's hard to add mods
4. When migrating minecraft to a new version, they slowly update their shell.

Benefits

1. When a player enters the server, not so much RAM is allocated for him as when working with a minecraft server, approximately 5-10 MB per person.
2. It is convenient to use plugins in combination with mods.
3. Plugins are very good, they allow you to change a minor thing, but at the same time they greatly simplify any game moments.

“Spout” is a server more similar to a bukkit than a minecraft server. There is also a special client and launcher for servers of this type. New features have been added to the client, such as:

1. The ability to assign keys to the action.
2. List of servers (only by spout servers).
3. Improved graphics settings, detailed settings for all parameters.

Also in the client added a set of unique libraries that allow you to download the necessary updates when you log on to a specific server.

Plugins are being developed for spout servers as well as for bukkit. The advantage of these plug-ins is that they are endowed with gui (the action with the plugin takes place with the mouse, everything is beautifully decorated in the game window), that is, these are already visual plug-ins, not console ones.
imageimage
disadvantages
1. Does not support Modloader, and without it, any mods written for other platforms will not work. To put a mod on a spout, you need to work hard and describe a huge number of events, parameters and procedures.
2. You can log in to the server only through the spout client (the official spout launcher) or a specially created server client based on spout.
3. Does not support plug-ins for bukkit, which forces you to program your own.
4. There are no Russian descriptions.

Benefits

1. Visual management of plugins
2. Just like the bukkit, the RAM consumption is rather low.
3. Own launcher and functional client

VanillaBukkitSpout
The game requires a special launcher.Official launcherOfficial launcherSpout launcher required
The ability to add mods to the serverSimply port client modsRequired to reprogram mods from minecraft serverOnly writing mods from scratch using your library of procedures and functions
Occupied RAM when using the standard assembly, without players~ 150Mb~ 1Gb~ 1Gb
Memory allocated for each new player~ 50Mb~ 10-15Mb~ 10-20Mb
Server works with pluginsNotIndividual plugins. There are a huge number of plug-ins for this type of servers, they are constantly updated and supplemented. Work with plugins occurs via chat / consoleIndividual plugins. Interaction is visual using buttons, pictures, text fields.
Customer changesIf the server requires it (any mods installed)If the server requires it (any mods installed)Required individual client server.
There is a reference materialThere are, in large numbers, both in English and in Russian.There are a lot of materials, but most of them are in English.All materials are exclusively in English.
Console AdministrationThe visual console with the list of players, the schedule of the selected memory.The usual console from the operating system.The usual console from the operating system.
Version updateWith the release of a new version of minecraftAfter the release of the new version of minecraft, versions with errors come out, but they can be used, usually the “recommended” version by developers comes out 1-3 weeks after the release of the new version of minecraftThe new version comes out 0.5-2 weeks after the release of the new version of minecraft.


To create a popular, functional minecraft server on the Vanilla platform, you will need to port mods or take already ported, configure, create a website, run an advertising campaign, create a launcher. To complete all these tasks, you need not a lot of time from a week to two weeks of work on the server.

At the same time to create a server on bukkit without using mods, given the creation of the site and the configuration of plug-ins, it will take at least one week.
But if you need to add your own modifications, plug-ins, then you have to develop a launcher, and then server development can take from 3 weeks to half a month. But taking into account all the efforts expended, it will turn out to be a wonderful individual server, on which a lot of enthusiastic players will play, which you will not be able to run away from there.

Creating a spout server with the addition of its modifications, setting up plug-ins, creating your own and other works will take the most time, because There are not enough materials for development and basically everything will have to be investigated by yourself And there is also a lot of programming to be done independently, because there is no compatibility with libraries for other platforms.

The most optimal option for a novice server is bukkit, it is quite simple to learn, it is open source, but with mods you will have to tinker with it, because There is no literature of this type, and information can be “scooped” only from forums where good people become their own groundwork.
I, as a novice server administrator, chose bukkit, but in the future I plan to transfer my server to the highest level and continue development on the spout platform.

Project Description



Minecraft has been around for more than a year, but until November 18, 2011, it was in the beta version. The game is a cubic world that you can build yourself, place and break blocks. In the summer, I myself began to play this game and bought a license, but soon decided to create my own server.

Initially, all servers are the same and almost the same.

• All servers have the same functionality.
• Users are only divided into administrators and players.
• Players have the same opportunity.

Differences

• Servers differ in gaming space (map).
• The attitude of administrators to players and to the server.
• The power of the equipment on which the server is located.

Each administrator wants to make his server unique, this can help plugins and mods.
That is why I undertook to change and modify the game code in order to improve it and make my server unique.

Define the concepts. For the server we will take a program that allows players to interact in the game with each other over the Internet.

Plugins are add-ons for the main standard server, adding new features or improving old ones. Plug-ins are installed only on the server, you do not need to install them on the client.

There is a plugin that adds subgroups for players (player / moderator), allowing you to create many different groups with different rights. Each additional plugin, in addition, has its own configuration of permissions that allow to execute a certain command. In configuring groups, you can register these configurations, thereby breaking down users into various categories.

Mods on the contrary, must be installed on the server and on the client. Mods also add new features, but more often are connected with the game world: they add new blocks, objects, and opportunities.
We also implemented the relationship of the server and the site.

During the existence of my server, many versions of the game have changed, in connection with this, I had to update the server and plug-ins on it many times. Plug-ins need to be configured, plug-ins have parameters that affect their work, you can configure these settings in a special configuration file for each specific plug-in.

The minecraft game was created and developed through the java programming language; therefore, to edit it and create my add-ons, I independently learned from java using textbooks on the Internet, learned how to create mods and plug-ins, and now I am actively complementing and changing the game.

So, today, together with my colleagues, I created a minecraft game server, a website for the server, a launcher, set up plug-ins, developed my own plug-ins and mods.

In my workings out, I tried to “weave” the server and the site as best I could. The number of violations is indicated by the parameter - percentages on the site, which is very clear and convenient. During the login procedure, the launcher sends a request to the site, which in turn confirms or denies the login for this user. Also the launcher checks the client and compares it with the sample on the site, if they are different, then it downloads a new one.

We have a great team of administrators and moderators for our server. They solve inside the game problems and help the players in any situations, maintain the normal atmosphere in the game, make sure that the players do not violate the established rules.

I also perform the functions of the administrator. And also constantly add news to the site so that players are always up to date.

We created a system linking the site and server: blocking the player’s entry into the game is implemented by the number of violations displayed by percentages. Suppose if you have more than 10% of violations, then you can not enter the game, while per day the percentage of each player decreases by 2%. The number of percent users can see on the site, they are entered into the database using a plugin, right in the game.

If the administrator writes a certain command, the plugin will read the parameters and send them to the script on the site, which will already transfer them to the database.

Also, when a player enters the server, a player verification script is invoked, and if the player has a% violation, he will not let him.

I developed a launcher for my server. A launcher is a program that downloads and launches the game itself. You can only access my server through my launcher and client. At the same time in the launcher built auto update and auto login to the server. If I upload a new version of the game to the site, the launcher will automatically download it after authorization of the user.

Launcher features
a. setting the allocated RAM to the client;
b. enable / disable update;
c. game selection: - on the server, - in a single game;
d. the entrance to the launcher occurs through the scripts on the site, and only by the login and password from the site;
e. client update at startup occurs from my site, and the entire client is loaded, along with all configuration files, unlike the standard launcher.

I changed minecraft quite a lot
• added the transformation of one block into another, if a certain condition is fulfilled,
for example, gravel, being under water, turn into lime (the “lime” block was added by me);
• a block “white brick block” was added; to obtain it, it is necessary to melt the lime in the furnace.
If you leave the “white brick block” in the sun, then after some time it will turn into a “cracked white brick block”, and if placed under water, it will be covered with moss;
• flowers received property to spread on the map;
• new types of flowers were added, as well as the ability to multiply;
• in a standard minecraft, if you use fertilizer on the ground, then tall grass grows and, with some probability, two kinds of flowers. I added to this probability - the probability of sprouting colors made by me.
• All the textures of the blocks were created in graphic editors Paint, Paint.NET, a free online analogue of Photoshop.

For development I use the java language in the Eclipse environment. “Java SE 6 Update 31” should be installed on the computer for the game to work. My experience gained in writing programs in Pascal helps me a lot. I can easily navigate the huge code of the game and easily change it to fit my needs.

Plugin configuration file “permissions”.
Admins: -
default: false
info:
prefix: '&f[&cAdmin&f]&f ' -
suffix: '&f'
build: true –
inheritance:
- Moderator -
permissions:
- commandbook.* - «commandbook»
- lwc.*
- lc.level.* -
- lc.shout-
- itembank.use –
- towny.wild.* -
- commandbook.spawn –
….
- lc.admin.setexp
- falsebook.blocks.* - falsebook
- worldedit.* - worldedit
- citizens.healer.use.heal – .
- citizens.wizard.use.interact –
- banper.banplayer – ,


Configuration file of the “worldGuard” plugin.

fire: .
disable-all-fire-spread: true
disable-fire-spread-blocks: []
disable-lava-fire-spread: true
lava-spread-blocks: []
mobs:
block-creeper-explosions: false –
block-creeper-block-damage: false
disable-enderman-griefing: true – enderman'a
block-creature-spawn: []
anti-wolf-dumbness: false


I developed mods and plugins in java in eclipse. Were used standard libraries java 1.6, as well as additional.

The mod is a 52 file, almost each of which is responsible for its unit. Used a lot of events, procedures and functions.

For example, consider a part of one of the fifty-two mod files, the code of which I wrote. And this code of the server part of the flower is responsible for distributing the flower on the map:

public void a(World world, int i, int j, int k, Random random) update block, , 2-20 . .
{
byte byte0 = 4;
int l = 5;
for(int i1 = i - byte0; i1 <= i + byte0; i1++)
{
for(int k1 = k - byte0; k1 <= k + byte0; k1++) -
{
for(int i2 = j - 1; i2 <= j + 1; i2++)
{
if(world.getTypeId(i1, i2, k1) == id && --l <= 0)
{
return;
}
}
}
}
int j1 = (i + random.nextInt(3)) - 1;
int l1 = (j + random.nextInt(2)) - random.nextInt(2);
int j2 = (k + random.nextInt(3)) - 1; - ( 2 ).
for(int k2 = 0; k2 < 4; k2++)
{
if(world.isEmpty(j1, l1, j2) && f(world, j1, l1, j2))
{
i = j1;
j = l1;
k = j2;
}
j1 = (i + random.nextInt(3)) - 1;
l1 = (j + random.nextInt(2)) - random.nextInt(2);
j2 = (k + random.nextInt(3)) - 1;
}
if(world.isEmpty(j1, l1, j2) && f(world, j1, l1, j2) && random.nextInt(8) == 0) - .
{
world.setTypeId(j1, l1, j2, mod_decor.fltul.id); -
}


It was especially difficult to transfer the mod to the server, then on the server the names of the procedures, functions and events are completely different from the client ones.

Conclusions and perspectives


I achieved my goals. I conducted a study, chose the platform most appropriate for my purposes and means. Created a game server, set up plug-ins, linked the server to the site, wrote a unique launcher for playing on my server, added new features, blocks and items to the game, available only on my server. Developed a user-friendly website. Now there are 267 users registered on the site. Of these, 194 are active, the number of users is growing rapidly, so these numbers may not be exact.

Perspectives
I am going to develop my server. The site will be much more intertwined with the server than it is now, a bonus system is being developed. There is an active writing of a new server engine:
• new plug-in connection system;
• new libraries (Netty), different from the standard (which will increase the performance by 40%);
• new gaming features.

Instructions for users


1. Launch a launcher
2. Enter login: testtest and password: testtest
image
3. Put a tick near "Offline"
4. Settings
4.1. Change depending on memory on PC 1024 standard for 2Gb memory
4.2. Auto login to the server - if you do not want to visit the server itself and want to test only the mods, then set this parameter to “NO”
image
5. Press the input
image
6. After downloading, enter the "single player"
7. Choose an already created world
image


Bibliography


[Electronic resource] // [Server site] time-work-mc.ru
[Electronic resource] // [Forum] bukkit.org
[Electronic resource] // [Forum] rubukkit.org
[Electronic resource] // [WIKI] ru.minecraftwiki.net/%D0%A1%D0%BE%D0% B7% D0% B4% D0% B0% D0% BD% D0% B8% D0% B5_%D0% B8_% D0% BD% D0% B0% D1% 81% D1% 82% D1% 80% D0% BE% D0% B9% D0% BA% D0% B0_% D1% 81% D0% B5% D1% 80% D0% B2% D0% B5% D1% 80% D0% B0
[Electronic resource] // [WIKI] ru.wikibooks.org/wiki/Java
[Electronic resource] // [Forum] minecraft.su/forum/topic/742-modloadermodding-%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D1%8B-%D0%BF % D1% 80% D0% BE% D0% B3% D1% 80% D0% B0% D0% BC% D0% BC% D0% B8% D1% 80% D0% BE% D0% B2% D0% B0% D0 % BD% D0% B8% D1% 8F-% D0% B4% D0% BB% D1% 8F-minecraft-allguide
[Electronic resource] // [Forum] www.minecraftforum.net
[Electronic resource] // [Forum] www.mcportcentral.co.za/index.php?board=3.0
[Electronic resource] // [Electronic textbook] articles.org.ru/docum/java/index.php
Arnold K., Gosling J. Java Programming Language; progbook.net/java/2013-jazyk-programmirovanija-java.html;1997 , 304 pp.
[Electronic resource] // [Java Tutorial] books.net-soft.ru/java.htm

If you are interested in development, you can contact in a personal or skype (xkelxmc) for source codes or the mods / plugins themselves.

Source: https://habr.com/ru/post/140731/


All Articles