A lightweight, fast and extensible game server for Minecraft
Go to file
Bond-009 f2c41d1227
Fix tools build on FreeBSD (#5525)
Regession from #5085

```
[ 79%] Building CXX object Tools/ProtoProxy/CMakeFiles/ProtoProxy.dir/Connection.cpp.o
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:337:26: error: use of undeclared identifier 'AF_INET'
        m_ServerSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                                ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:337:35: error: use of undeclared identifier 'SOCK_STREAM'
        m_ServerSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                                         ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:337:48: error: use of undeclared identifier 'IPPROTO_TCP'
        m_ServerSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                                                      ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:342:2: error: unknown type name 'sockaddr_in'
        sockaddr_in localhost;
        ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:343:25: error: use of undeclared identifier 'AF_INET'
        localhost.sin_family = AF_INET;
                               ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:346:53: error: unknown type name 'sockaddr'
        if (connect(m_ServerSocket, reinterpret_cast<const sockaddr *>(&localhost), sizeof(localhost)) != 0)
                                                           ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:362:29: error: use of undeclared identifier 'recv'
        int res = static_cast<int>(recv(m_ServerSocket, Buffer, sizeof(Buffer), 0));  // recv returns int on windows, ssize_t on linux
                                   ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:402:29: error: use of undeclared identifier 'recv'
        int res = static_cast<int>(recv(m_ClientSocket, Buffer, sizeof(Buffer), 0));  // recv returns int on Windows, ssize_t on Linux
                                   ^
/home/bond/dev/cuberite/Tools/ProtoProxy/Connection.cpp:451:29: error: use of undeclared identifier 'send'
        int res = static_cast<int>(send(a_Socket, reinterpret_cast<const char *>(a_Data.data()), a_Data.size(), 0));  // Windows uses int for a_Size, Linux uses size_t; but Windows doesn't complain. Return type is int on Windows and ssize_t on Linux
                                   ^
[ 79%] Building CXX object CMakeFiles/Cuberite.dir/Unity/unity_38_cxx.cxx.o
9 errors generated.
```
2023-08-12 14:41:52 +00:00
.github
android
CMake
dev-docs
lib Update to libdeflate 1.9 2022-01-26 22:04:24 +00:00
Server cTCPLink and cUrlClient accept list of trusted root CAs for TLS. 2023-05-19 16:25:12 +02:00
src Fix tools build on FreeBSD (#5525) 2023-08-12 14:41:52 +00:00
tests UrlClientTest: Added tests for root CA verification. 2023-05-19 16:25:12 +02:00
Tools Removed all Printf-family functions from StringUtils. 2023-05-16 23:50:37 +02:00
.clang-format
.clang-tidy
.editorconfig
.gitattributes
.gitignore rework of the color code with & and standard codes (#5416) 2022-10-25 13:42:04 +02:00
.gitmodules
app.yml
appveyor.yml
BACKERS
CheckLua.cmake
cibuild.sh
clang-tidy.sh Update clang-tidy.sh (#5477) 2023-06-05 20:37:47 +00:00
cloc-exclude.txt
CMakeLists.txt Updated LTO Check to new standard. (#5476) 2023-05-19 16:52:35 +02:00
compile.sh
COMPILING.md Changed Windows instructions to build out-of-source. 2022-12-26 16:54:25 +01:00
CONTRIBUTING.md
CONTRIBUTORS Replaced hand-escaped JSON (#5508) 2023-06-08 08:13:08 +02:00
Doxyfile
easyinstall.sh
GETTING-STARTED.md Remove Travis from GETTING-STARTED.md 2022-11-15 22:48:44 +00:00
Jenkinsfile Try a timeout for jobs. 2023-04-17 20:35:53 +00:00
LICENSE Changing Copyright Years (happy 11) 2022-04-14 22:53:03 +00:00
nightlybuild.sh
README.md Added small embedded devices to README 2023-03-08 09:23:42 +01:00
SetFlags.cmake Disable u8 prefix C++20 warning since we need it 2022-02-17 18:41:24 +00:00
stats.cmd
TESTING.md

Cuberite

Jenkins Build Status AppVeyor Build Status

Cuberite is a Minecraft-compatible multiplayer game server that is written in C++ and designed to be efficient with memory and CPU, as well as having a flexible Lua Plugin API. Cuberite is compatible with the Java Edition Minecraft client.

Cuberite runs on Windows, *nix and Android operating systems. This includes Android phones and tablets as well as Raspberry Pis; support for small embedded devices is experimental.

Currently we support Release 1.8 - 1.12.2 Minecraft protocol versions.

Subscribe to the newsletter for important updates and project news.

Installation

There are several ways to obtain Cuberite.

Binaries

  • The easiest method is downloading for Windows or Linux from the website.
  • You can use the EasyInstall script for Linux and macOS, which automatically downloads the correct binary. The script is described below.

The EasyInstall script

This script will download the correct binary from the project site.

curl -sSfL https://download.cuberite.org | sh

Compiling

  • You can compile automatically for Linux, macOS and FreeBSD with the compile.sh script. The script is described below.
  • You can also compile manually. See COMPILING.md.

Compiling may provide better performance (1.5-3x as fast) and it supports more operating systems.

The compile.sh script

This script downloads the source code and compiles it. The script is smart enough to notify you of missing dependencies and instructing you on how to install them. The script doesn't work for Windows.

Using curl:

sh -c "$(curl -sSfL -o - https://compile.cuberite.org)"

Or using wget:

sh -c "$(wget -O - https://compile.cuberite.org)"

Hosted services

  • Hosted Cuberite is available via Gamocosm.

Contributing

Cuberite is licensed under the Apache License V2, and we welcome anybody to fork and submit a Pull Request back with their changes, and if you want to join as a permanent member we can add you to the team.

Cuberite is developed in C++ and Lua. To contribute code, please check out GETTING-STARTED.md and CONTRIBUTING.md for more details.

Plugins are written in Lua. You can contribute by developing plugins and submitting them to the plugin repository or the forum. Please check out our plugin introduction guide for more info.

If you are not a programmer, you can help by testing Cuberite and reporting bugs. See TESTING.md for details.

You can also help with documentation by contributing to the User's Manual.

Other Stuff

For other stuff, check out the homepage, the Users' Manual, the forums, and the Plugin API.

Support the Cuberite development team on Liberapay