A server software for Minecraft: Bedrock Edition in PHP

Overview


A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP

CI GitHub tag (latest semver) Docker image version (latest semver) Discord

Getting started

Discussion/Help

For developers

Donate

  • Bitcoin Cash (BCH): qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear
  • Bitcoin (BTC): 171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
  • Stellar Lumens (XLM): GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
  • Patreon

Licensing information

This project is licensed under LGPL-3.0. Please see the LICENSE file for details.

pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.

Comments
  • fixed entity movement leak

    fixed entity movement leak

    it said this boost server performance 20 %, so i copies changes to pmmp

    ( not tested yet, please merge so i can download src zip )

    i think it fixed entity movement leak

    Resolution: Invalid 
    opened by ghost 393
  • Level block cache doesn't get cleaned up properly when chunks are set/replaced

    Level block cache doesn't get cleaned up properly when chunks are set/replaced

    Issue description

    https://forums.pmmp.io/threads/weird-block-glitch-on-interact.4658/#post-44516

    Steps to reproduce the issue

    1. generate a new world
    2. TP to somewhere not generated yet
    3. click blocks around you and see if they vanish

    OS and versions

    • PocketMine-MP: 67a576722c778939baba5274fd9ec797588409fd
    • PHP: 7.2.0
    • Server OS: win
    Category: Core Resolution: Fixed 
    opened by dktapps 88
  • The world is infinitely unloading.

    The world is infinitely unloading.

    Issue description

    The server freezes without cause and other errors in the unloading of the world. Another strange thing is that the process no longer exists. im

    OS and versions

    • PocketMine-MP: 41592a04b7d0124d155ea6d99be8f11fe14d1de1
    • PHP: 7.2.1
    • Server OS: Linux Debian 8.6 jessie

    Plugins

    DevTools v1.12.7, ModalFormsAPI v1, clans v1, quests v1, DonateCases v1, RegionGuard v1.0.0, area v1, Kits v1.0.0, Shop v1, Economy v1, MineReset v3, PurePerms v1.4.0-INDEV, Evaluator v0.0.1, Horses v1.0.0, ToyBox v1, API v1.0.0, PureChat v1.4.0

    Category: PHP (extension) Resolution: Hack-fixed 
    opened by Frago9876543210 50
  • Console becomes unresponsive after several hours idle.

    Console becomes unresponsive after several hours idle.

    Issue description

    On both PocketMine-MP_1.6.1dev-73_794ff643_API-2.1.0 and PocketMine-MP_1.6.1dev-76_8214e50b_API-2.1.0, (Windows 10 Pro) after two or more hours of operation, unattended with no players in the game, upon returning to the console there is no response to commands. The game is still functioning, players may login and the world responds normally. However, at the console (the server terminal window), commands such as "list" or "version" are ignored. Characters typed appear on the screen, but without effect. Ctrl-C is recognized, terminating the program.

    Steps to reproduce the issue

    1. start.cmd
    2. verify operation of console (terminal window) by issuing "version" command.
    3. verify game operation by briefly logging in from Windows Phone 8.1 device.
    4. exit device from game.
    5. leave system idle for two hours.
    6. attempt "version" command again.
    7. verify game operation by logging in from gaming device.

    OS and versions

    [23:37:31] [Server thread/INFO]: This server is running PocketMine-MP 1.6.1dev-#76 「Unleashed」 implementing API version 2.1.0 for Minecraft: PE v0.16.0.5 alpha (protocol version 91)

    • Title Bar: PocketMine-MP 1.6.1dev-#76 | Online 0/20 | Memory 16.11/0/16.11/20 MB @ 6 threads | U 0 D 0 kB/s | TPS 20 | Load 0.28%

    • PocketMine-MP: PocketMine-MP_1.6.1dev-76_8214e50b_API-2.1.0

    • PHP: PHP7.0.13

    • Server OS: Windows 10 Pro

    • Game version: PE

    Crashdump, backtrace or other files

    • ...
    Category: PHP Resolution: Fixed 
    opened by KAGsundaram 43
  • Extreme FPS drop and weird chiseled stone brick texture

    Extreme FPS drop and weird chiseled stone brick texture

    Issue description

    When using the latest version of the api3/blocks branch, something extremely strange happened, which keeps occuring over and over again. So it may sound really weird, but here it goes. Sometimes, when walking around or joining the game, the client seems to be stuck in a chiseled stone brick block. Huge amounts of block sounds can be heard when this happens. Over the coming 5-10 seconds the client completely freezes because of the FPS lag. Teleporting does not seem to work. Kicking the player through console is the only way that seems to work.

    Now too badly I do not know how to reproduce this issue. It happens not very occasionally, and seem to occur most when teleporting and with walking on slabs and stairs. The chiseled stone bricks block always show up, even though there were absolutely none nearby.

    Steps to reproduce the issue

    1. Possible reproduction methods mentioned above.

    OS and versions

    • PocketMine-MP: api3/blocks: 7a3ee42bfa719ae5642e89672a0ab88112587890
    • PHP: 7.0
    • Server OS: Ubuntu
    • Game version: PE (possibly win10)

    Crashdump, backtrace or other files

    I also noticed the issue below. I do not know whether this has to do with it or not.

    [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\Player::sendPosition() must be an instance of pocketmine\math\Vector3, null given, called in phar:///
    home/blabla/PocketMine-MP.phar/src/pocketmine/Player.php on line 2189" (EXCEPTION) in "/src/pocketmine/Player" at line 3838
    
    Category: Gameplay Category: Core Resolution: Fixed 
    opened by Sandertv 37
  • Added title command and API for resetting title duration

    Added title command and API for resetting title duration

    What this adds

    • Title Command
    • Player->resetTitles()
    • Player->addSubTitle(string)

    If you need me to change anything please just ask.

    Apparently any translations with the same key as in MCPE displays as %ommands.(cmd).usage. Probably a client bug, or because im using 1.0.5 and theres already been an update.

    ~~There's currently an issue where settings the subtitle using the command doesnt set it. Maybe we need a seperate method in the Player class to set the subtitle?~~

    ~~EDIT: We definitely need a seperate method to set subtitle, i'll add it now~~

    Category: Gameplay Requires translations Type: Enhancement 
    opened by TheDiamondYT1 33
  • Crash when closing players during some events

    Crash when closing players during some events

    Issue description

    When I try to reconnect a player to a server, this happens:

    [02:15:50] [Server thread/CRITICAL]: Error: "Call to a member function addChunkPacket() on null" (EXCEPTION) in "/home/data/other/src/pocketmine/Player" at line 2147 [02:15:50] [Server thread/CRITICAL]: [Network] Stopped interface pocketmine\network\mcpe\RakLibInterface due to Undefined index: X.X.X.X:62724 (my ip was here)

    I let players reconnect to the server if they are stuck or something.

    Steps to reproduce the issue

    1. Transfer a player to the same server they're already on using code below.

    OS and versions

    • PocketMine-MP: ALPHA7 (is that enough info?)
    • PHP: 7.0
    • Server OS: ubuntu linux
    • Game version: irrelevant

    Plugins

    No it isn't reproducable without plugins. but this isnt a plugin error.. public function transfer(Player $player, string $identifier, $msg = ""){ $pk = new TransferPacket(); $pk->address = $this->getAddress(); //server ip $pk->port = $this->getPortByIdentifier($identifier); //server port $player->directDataPacket($pk); if($msg != "") $this->addTransferMessage($player, $msg); $player->close(); }

    UPDATE: It doesn't do this anymore with Player->kick(), but I still think this is unexpected behavior..? Shouldn't crash.

    Category: Core Resolution: Fixed 
    opened by sn3akrr 32
  • New Player Functions ?

    New Player Functions ?

    This isn't an issue but i don't know where i can contact you. Can you add or can you give me the permission to add new Player functions to get the OS of the player, the game edition and other new things discovered in the LoginPacket like $player->getDeviceOs() ? Thanks.

    Type: To Do Category: API 
    opened by MisteFr 29
  • Some players cannot connect to the server. (Again)

    Some players cannot connect to the server. (Again)

    Issue description

    The problem still exist. I think, that could be like a continuation of issue https://github.com/pmmp/PocketMine-MP/issues/1505. Now the problem appears so the player is connected in a console, but the game client displays “locating server” and afterwards “disconnected from server”

    Steps to reproduce the issue

    I'm sorry, but I don't know. This is manifested from half of my players.

    OS and versions

    • PocketMine-MP: https://github.com/pmmp/PocketMine-MP/commit/d728154e87b0383bba5814a72c1c3a0f60f2e3f5
    • RakLib: https://github.com/pmmp/RakLib/commit/998af685be51d6ee8a1e206066ccd96c21450bfd
    • PHP: 7.2.1
    • Server OS: CentOS 7.4.1708
    • Game version: PE/Win10

    Plugins

    • Server are tested without plugins.

    Crashdump, backtrace or other files

    [03:43:22] [RakLibServer thread/DEBUG]: Created session for 192.162.35.203 47772 with MTU size 1492
    [03:43:22] [Server thread/DEBUG]: RFulkren is logged into Xbox Live
    [03:43:34] [Server thread/INFO]: RFulkren[/192.162.35.203:47772] вошел с id сущности 23 на (survival, -2728.3154, 69.5387, 1688.4355)
    [03:44:12] [RakLibServer thread/DEBUG]: Closed session for 192.162.35.203 47772
    [03:44:12] [RakLibServer thread/DEBUG]: Ignored connected packet from 192.162.35.203 47772 due to no session opened (0xc0)
    [03:44:12] [RakLibServer thread/DEBUG]: Ignored connected packet from 192.162.35.203 47772 due to no session opened (0xa0)
    [03:44:12] [Server thread/INFO]: RFulkren[/192.162.35.203:47772] отключился: client disconnect
    
    Category: Gameplay Status: Unconfirmed 
    opened by zKoz210 27
  • RFC: New API versioning scheme

    RFC: New API versioning scheme

    Issue description

    It's well known by now that the API versioning introduced last year (as documented in #179) is not very good at properly describing the server API.

    Background

    expand

    Back at MCPE 1.0, API-breaking backwards-incompatible changes were made (due to the chunk handling rewrite). This necessitated a major version bump as described under the original SemVer API versioning.

    To recap, semver is composed of x.y.z, or major.minor.patch:

    • Major: Breaking changes that are not backwards compatible. ANY breaking change (regardless of how big or small it is) requires a major API bump.
    • Minor: New feature additions or other alterations which are backwards-compatible, but dependents using these additions cannot function on earlier versions.
    • Patch: Bug fixes which are not BC-breaking which should be a no-brainer to upgrade to.

    As of December 2016 we had come to the conclusion that there was a significant amount of work to be done on PocketMine-MP which would require freedom to make backwards-incompatible changes whenever necessary. This was a problem because it would require a major API version bump every time any backwards-incompatible change was made at all, which would probably put us on something like API version 700.0.0 by now. This is obviously not acceptable.

    This led to the introduction of the ALPHA and other suffix schemes, where any ALPHA may have breaking changes in between versions. This was an attempt to remove the need for major API bumps for the frequent breaking changes, while providing plugin developers with something to work against for a specific version.

    Problem

    expand This has self-evidently not worked as intended, and in hindsight the ALPHA API versioning is highly flawed. As stated by @SOF3 , the current system is no different from SemVer except for the fact the effective major version is constantly being bumped, and nothing else.

    The ALPHA system also does a poor job of describing addition of features and bugfixes. Any and all changes are aggregated into the next ALPHA release, resulting in large mixed changelogs. When users upgrade to a new ALPHA version, they have no idea if everything or nothing will break, which effectively renders the 3.point API version useless.

    As it stands with the current definition of an "ALPHA" we are likely to never make it out of "ALPHA" since breaking changes are frequently made to Minecraft PE, which then frequently result in breaking API changes necessary to the core code. A perpetual state of ALPHA becomes meaningless when everyone is using it in production and it's likely to never end. This situation is obviously unacceptable.

    Proposal

    After several months of discussions, I have come up with a proposal for a new, more sane way of versioning the API. This breaks away from SemVer, since SemVer is impractical to apply to MCPE-related things (as earlier discussed), and also because PocketMine-MP is not very modular (SemVer doesn't apply very well to projects with very large exposed API).

    The proposed new versioning scheme consists of a 3-point x.y.z system which is more rational to the user.

    • Major: This is bumped when big things change the entire API in a backwards-incompatible way, which will affect anything and everything. ALPHA7 is a good example of when this version might be bumped (the entire API was broken). This is locked to a single number (e.g. 4.0.0 is not compatible with 3.0.0)
    • Minor: This is changed when there are isolated backward-incompatible changes in one area of the API that might affect some plugins. This is also locked to a single number, so other numbers are not compatible (e.g 3.1.0 is not compatible with 3.2.0)
    • Patch: This is changed when features and bugfixes are added in a backwards-compatible fashion. This is not locked to a single number, but the plugin number must be <= the server number (e.g. plugin 3.2.0 is compatible with server 3.2.1, but not vice-versa).

    Comments and suggestions

    Are welcomed, please comment on the issue.

    Category: API Category: Core Resolution: Completed 
    opened by dktapps 27
  • Implement difficulty per-world

    Implement difficulty per-world

    Introduction

    One small part of the jigsaw to making PocketMine-MP support true multi-world. Global difficulty is annoying and rather restrictive.

    Let's say you had a survival world on your server, where you do what you do in survival. Let's assume for a moment that mobs are implemented, and that hostile mobs spawn in easy, normal or hard. Then let's say you have a creative plots world where people can build things. You can't prevent mobs spawning in that world with difficulty, meaning you have to resort to ugly plugin hacks to prevent this.

    Above is merely one of the annoyances that result from this restriction. I'm sure people reading this PR description can think of other ways that can be annoying.

    Changes

    API changes

    • Added API methods Level->getDifficulty(), Level->setDifficulty(), Level->sendDifficulty()
    • Added Level constants DIFFICULTY_PEACEFUL, DIFFICULTY_EASY, DIFFICULTY_NORMAL, DIFFICULTY_HARD
    • Deprecated some Server methods to do with difficulty

    Behavioural changes

    • Levels will now be able to have difficulty applied to each of them instead of being subject to a global Server difficulty.
    • The Difficulty NBT tag will now be used for Level difficulty. If not found, this currently defaults to Normal difficulty

    Backwards compatibility

    TODO

    Follow-up

    • Make PvP, hardcore, gamemode, inventory per-world
    • Make /difficulty able to deal with single levels instead of setting all levels' difficulty
    • /time command should be able to set time per-world
    Category: API Category: Core Type: Change Proposal Status: Work in Progress Type: Enhancement 
    opened by dktapps 27
  • Packet rate limit kicks players when resuming from an xdebug breakpoint

    Packet rate limit kicks players when resuming from an xdebug breakpoint

    Issue description

    While this rate limit is clearly advantageous for production servers, it's pretty inconvenient for debugging, since it interferes with debugging.

    If a breakpoint is hit, and not resumed from within 5 seconds, any clients will be immediately kicked from the server when the breakpoint is finally resumed from.

    Steps to reproduce the issue

    1. Connect a client
    2. Connect the server to a debugger (xdebug_break())
    3. Wait for >5 seconds, and then resume from the breakpoint

    OS and versions

    • PocketMine-MP: 4.12.6
    • PHP: 8.1
    • Using JIT: no
    • Server OS: Windows
    Category: Core Status: Debugged 
    opened by dktapps 0
  • Wall cannot be connected to Iron Bars and Glass Pane in PM5

    Wall cannot be connected to Iron Bars and Glass Pane in PM5

    Issue description

    • Expected result: Screenshot_2022-06-28-07-09-55-34

    • Actual result: Screenshot_2022-06-28-07-04-40-11

    Steps to reproduce the issue

    1. Place the blocks side by side

    OS and versions

    • PocketMine-MP: 5.0.0-ALPHA7+dev
    • PHP: 8.1.13
    • Using JIT: no
    • Server OS: win
    • Game version: Android/Win10
    Category: Gameplay Status: Unconfirmed 
    opened by DavyCraft648 0
  • BlockBreakEvent occasionally runs before PlayerInteractEvent

    BlockBreakEvent occasionally runs before PlayerInteractEvent

    Issue description

    • Expected result: PlayerInteractEvent (start of break) is run before BlockBreakEvent (end of break)
    • Actual result: BlockBreakEvent is occasionally run before PlayerInteractEvent for the same acting while instant mining blocks.

    Steps to reproduce the issue

    1. Call PlayerInteractEvent and BlockBreakEvent
    2. adding any type of print statement to both shows that they are not always called in proper order.

    OS and versions

    • PocketMine-MP: 4.12.4
    • PHP: 8.0.13
    • Using JIT: no
    • Server OS: linux

    image

    Category: API Status: Debugged 
    opened by Joshy3282 1
  • Hard code vanilla command's names in their __constructor

    Hard code vanilla command's names in their __constructor

    Introduction

    So, now all the vanilla commands pass their name from their constructor like the other things (aliases, permissions, description..)

    Changes

    API changes

    No

    Behavioural changes

    No

    Backwards compatibility

    BC break, I think?

    Category: Cosmetic BC break Type: Enhancement 
    opened by BrandPVP 7
  • Fix frosted ice from melting immediately

    Fix frosted ice from melting immediately

    Introduction

    Currently, when frosted ice is placed on the block, it melts immediately if there are not at least 2 other blocks of frosted ice nearby. This is not the normal behavior in vanilla.

    Tests

    Vanilla behavior: https://cdn.discordapp.com/attachments/715214348338855987/1059349977480052806/vanilla_frosted_ice_test.mp4

    Category: Gameplay Type: Fix Status: Lacks Information 
    opened by IvanCraft623 6
Releases(4.12.6)
Owner
PMMP
Home of PocketMine-MP, a server software for Minecraft: Bedrock Edition written in PHP and C++
PMMP
SteadFast3 Minecraft: Bedrock Edition Server Software

Steadfast3 is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
CoarseMC Minecraft: Bedrock Edition Server Software

CoarseMC is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
A MCPE server software that backporting new Minecraft: Bedrock Edition to older PocketMine versions with better stability and performance.

CoarseMC is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
An implementation of the Minecraft: Bedrock Edition protocol in PHP

BedrockProtocol An implementation of the Minecraft: Bedrock Edition protocol in PHP This library implements all of the packets in the Minecraft: Bedro

PMMP 94 Jan 6, 2023
A game-mode for Minecraft: Bedrock Edition

HardCoreFactions This is an unpaid commission that was only released for educational purposes, consider using it as a reference rather than having it

Doge 3 Sep 8, 2021
A Simplistic Plugin to Implement Server Claims to your Minecraft: Bedrock Server.

Claims This plugin allows administrators to create, edit, list, and teleport to land claims on a PocketMine server. These claims have a variety of cus

Santana 5 Jun 10, 2023
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
An open-source Minecraft: Java Edition server implementation, written in PHP.

PHPCraft An open-source Minecraft: Java Edition server implementation, written in PHP. What is PHPCraft? PHPCraft is an open-source Minecraft: Java Ed

Karen/あけみ 17 Dec 31, 2022
Economy made easy for Minecraft: Bedrock

BedrockEconomy Economy made easy for Minecraft Bedrock Commands Name Description Usage Permission balance Show your and others balance balance [player

null 33 Oct 24, 2022
A PHP library for all things Minecraft: Java Edition

Phpcraft A PHP library for all things Minecraft: Java Edition. This project has been abandoned! The limited subset of 1.8.x - 1.15.x that has been imp

null 16 Nov 29, 2022
NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features

NamelessMC 519 Dec 31, 2022
A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products. Comes with a SDK and command-line tool. Works anywhere that PHP runs.

CubicleSoft 32 Dec 5, 2022
A plugin that adds minions to your Minecraft Server

BetterMinion A plugin that adds minions to your Minecraft Server ⚠️ This project is currently unfinished and needs some help! If you'd like to help us

Khang Nguyen 1 Jul 30, 2022
An open source Minecraft server (true-og.net)

true-og An open source Minecraft server (true-og.net) Website forked from aviel900 https://www.spigotmc.org/resources/minecraft-one-page-template.5973

Alex Noyle 0 Nov 28, 2022
A plugin that adds minions to your Minecraft Server

BetterMinion A plugin that adds minions to your Minecraft Server ⚠️ This project is currently unfinished and needs some help! If you'd like to help us

null 24 Apr 25, 2022
Developer-friendly framework heavily inspired by Laravel and based on Timber and Wpemerge solutions for WordPress themes development with Bedrock folder structure

Lightweight Brocooly (Brocket) Improved Controllers, Middleware and Routers, but slightly less powerful Container Open beta. Package in development Cr

Ihar Aliakseyenka 3 Mar 4, 2022
2022 edition of the inRage Theme fully based on Gutenberg with the support of Roots Sage 10

2022 Edition - inRage theme This version of the theme is compatible with the Full site editing of Wordpress 5.8/5.9 and use Sage 10 in order to manage

inRage 5 Jan 3, 2023
Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.

OpenMage 782 Jan 3, 2023