Git Product home page Git Product logo

pocketmine-mp's Introduction


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

CI GitHub release (latest SemVer) Discord
GitHub all releases GitHub release (latest by SemVer)

What is this?

PocketMine-MP is a highly customisable server software for Minecraft: Bedrock Edition, built from scratch in PHP, with over 10 years of history.

If you're looking to create a Minecraft: Bedrock server with custom functionality, look no further.

  • 🧩 Powerful plugin API - extend and customise gameplay as you see fit
  • 🗺️ Rich ecosystem and large developer community - find plugins easily and learn to develop your own
  • 🌐 Multi-world support - offer a more varied game experience to players without transferring them to other server nodes
  • 🏎️ Performance - get 100+ players onto one server (depending on hardware and plugins)
  • ⤴️ Continuously updated - new Minecraft versions are usually supported within days

❌ PocketMine-MP is NOT a vanilla Minecraft server software.

It is poorly suited to hosting vanilla survival servers. It doesn't have many features from the vanilla game, such as vanilla world generation, redstone, mob AI, and various other things.

If you just want to play vanilla survival multiplayer, consider using the official Minecraft: Bedrock server software instead of PocketMine-MP.

If that's not an option for you, you may be able to add some of PocketMine-MP's missing features using plugins from Poggit, or write plugins to implement them yourself.

Getting Started

Community & Support

Join our Discord server to chat with other users and developers.

You can also post questions on StackOverflow under the tag pocketmine.

Developing Plugins

If you want to write your own plugins, the following resources may be useful. Don't forget you can always ask our community if you need help.

Contributing to PocketMine-MP

PocketMine-MP accepts community contributions! The following resources will be useful if you want to contribute to PocketMine-MP.

Donate

PocketMine-MP is free, but it requires a lot of time and effort from unpaid volunteers to develop. Donations enable us to keep delivering support for new versions and adding features your players love.

You can support development using the following methods:

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

Thanks for your support!

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.

pocketmine-mp's People

Contributors

99leonchang avatar alejandroliu avatar colinhdev avatar dependabot-preview[bot] avatar dependabot[bot] avatar dhaiven avatar diamond-gold avatar dktapps avatar frago9876543210 avatar gaprix avatar intyre avatar inxomnyaa avatar ipad54 avatar ivancraft623 avatar jasonw4331 avatar javierleon9966 avatar matcracker avatar msjyoo avatar muqsit avatar pemapmodder avatar rasu3n avatar robske110 avatar sandertv avatar shockedplot7560 avatar shoghicp avatar sof3 avatar thenewherobrinex avatar twistedasylummc avatar yosshi999 avatar zsallazar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pocketmine-mp's Issues

Implement Pistons

Issue description

Write a short description about the issue
There are no piston implementations for PocketMine

Steps to reproduce the issue

  1. ...
  2. ...

OS and versions

  • PocketMine-MP: latest
  • PHP: 7
  • Server OS: All
  • Game version: PE & Win10

Crashdump, backtrace or other files

  • ...

PHAR

Can anyone please give me 0.16.0 phar and tell me how to install it in PocketMine-MP please.

freeze on command

Its not only /register, and i wanna ask if PmmP fixed it!
If u do show more on timings u can see other commands lag too a little!
If u spam commands it freeze!
I wanted to ask if PmmP have this problem , thats all ! Please look more before closing and issue!

Idc if i ever get banned! Is just another project "© by Dktapps" , so all are bound to get banned sooner or later!

Vertical movement more than 10 blocks triggers movement anti-cheat

Issue description

When a player climbs a high tower with ladders, its being dragged back. This also happens when anti flight is disabled, and in creative mode.

Steps to reproduce the issue

  1. Build a really high tower with ladders (at least 30 blocks (for safety that it happens))
  2. Climb the ladder. you´ll be dragged back on the ground (note that it will not instantly happen, you´ll have to climb some blocks.

OS and versions

  • PocketMine-MP: github master (commit 2fba107)
  • PHP: 7.0.11
  • OS: Windows 10 Pro

Crashdump, backtrace or other files

none

Tip are broke

Issue description

Write a short description about the issue
When you use sendTip in a task it doesn't work and cause lags, when you sens a tip manually it doesn't work too:|

Steps to reproduce the issue

  1. ...
  2. ...

OS and versions

  • PocketMine-MP: bd5bbbe
  • PHP: 7.0.2
  • Server OS: Linux
  • Game version: PE 0.16

Crashdump, backtrace or other files

  • ...

MacOS ServerConsole

Issue description

When I start the server I always get such pocketmine .... things, is this a bug or is it normal for MacOS?

OS and versions

  • PocketMine-MP: 1.6.1dev - 0.16.0.5
  • PHP: 7.1
  • Server OS: MacOS
  • Game version: PE/Win10 (delete as appropriate)

Crashdump, backtrace or other files

[06:09:30] [Server thread/WARNING]: Non-packaged PocketMine-MP installation detected, do not use on production.
[06:09:30] [Server thread/INFO]: Loading pocketmine.yml...
[06:09:30] [Server thread/INFO]: Loading server properties...
[06:09:30] [Server thread/INFO]: language.selected
[06:09:30] [Server thread/INFO]: pocketmine.server.start
[06:09:30] [Server thread/INFO]: pocketmine.server.networkStart
[06:09:31] [Server thread/INFO]: pocketmine.server.info
[06:09:31] [Server thread/INFO]: pocketmine.server.license
[06:09:31] [Server thread/INFO]: Loading recipes...
[06:09:31] [RakLibServer thread/CRITICAL]: **** FAILED TO BIND TO 0.0.0.0:19132!
[06:09:31] [RakLibServer thread/CRITICAL]: Perhaps a server is already running on that port?
[06:09:31] [Server thread/EMERGENCY]: RakLib crashed!
[06:09:35] [Server thread/INFO]: ----- PocketMine-MP Auto Updater -----
[06:09:35] [Server thread/INFO]: It appears you're running a Beta build, when you've specified that you prefer to run Stable builds.
[06:09:35] [Server thread/INFO]: If you would like to be kept informed about new Beta or Development builds, it is recommended that you change 'preferred-channel' in your pocketmine.yml to 'beta' or 'development'.
[06:09:35] [Server thread/INFO]: ----- -------------------------- -----
[06:09:35] [Server thread/INFO]: pocketmine.level.preparing
[06:09:35] [Server thread/INFO]: pocketmine.server.query.start
[06:09:35] [Server thread/INFO]: pocketmine.server.query.info
[06:09:35] [Server thread/INFO]: pocketmine.server.query.running
[06:09:35] [Server thread/INFO]: pocketmine.server.defaultGameMode
[06:09:35] [Server thread/INFO]: pocketmine.server.startFinished
[06:09:35] [Server thread/CRITICAL]: pocketmine.server.networkError

require_once error on startup

Issue description

Write a short description about the issue

a Fatal error on startup

Steps to reproduce the issue

  1. ... download the github master.
  2. ... extract the github master.
  3. ... add the bin folder (into the master)
  4. ... run start.cmd.

OS and versions

  • PocketMine-MP: latest github version (commit de28dda)
  • PHP: 7.0.9
  • OS: Windows 10 Pro

Crashdump, backtrace or other files

  • ... Warning: require_once(C:\Users\Plasma\Desktop\pmmp\src/spl/ClassLoader.php): failed to o07
    Fatal error: require_once(): Failed opening required 'C:\Users\Plasma\Desktop\pmmp\src/s line 107
    bin\php\php.exe: Exit 255

Not a issue

So i am wondering if there is a file that works for 0.15.10

Download

Is there a beta or something so i can download 0.16.0 pocketmine?

No block breaking/placing sound effects

Issue description

This is probably well-known, but might as well log it here. The sounds that play while breaking a block, when the block breaks, and when placing a block do not play.

OS and versions

  • PocketMine-MP: Any
  • PHP: 7
  • Server OS: Any (tested on Windows+Linux)
  • Game version: PE/Win10

16.0 not working

Hi!
I tried the 16.0 phar and the servee was working.In MCPE, it was shown 16.0 in the server info but when i tapped it , it was saying Outdated Server.
How can it be outdated?
I have 16.0 And the server also has 16.0.
I dont have the beta of 16.0.
I have the real 16.0 Version of MCPE.
Please fix this and reply that how should I solve this problem.

Various health-related bugs

Issue description

  • Double hit-animation when taking fall damage (not reproducible as of 1.0.0.16)
  • Players taking fall-damage enough to kill them frequently do not have the "You died!" screen displayed, instead staying alive at zero hearts and recovering up to 1 heart.
  • Hit-animation when players regain health (health should be set using attributes, not SetHealthPacket) (old client bug)
  • Cancelling health regeneration doesn't seem to work (#157)
  • No death animation when dying from fall damage (to other players you literally just vanish when you hit the ground)
  • Changing a player's max health doesn't update client attributes (client bug?)

OS and versions

  • PocketMine-MP: 2fba107
  • PHP: doesn't matter
  • OS: doesn't matter

Item duplication in creative mode

Issue description

You can duplicate a stack of item if you move it around in the inventory.
Only happens in creative mode.

Steps to reproduce the issue

  1. Get yourself a type of item in creative mode
  2. Open the inventory
  3. Move it to the second slot in the inventory
  4. Move it back to the first slot
  5. Close inventory
  6. Disconnect from the server
  7. Connect again
  8. Look at your inventory

OS and versions

  • PocketMine-MP: 1ac74fe
  • PHP: 7
  • Server OS: Windows 10
  • Game version: PE

Crashdump, backtrace or other files

  • Image of MCPE

Minecraft 0.16.1

Hi,
I have server pocketmine of version minecraft 0.15.10 and now i update my version minecraft ,please I want pocketmine-mp for version minecraft 0.16 or up

OS and versions

  • Server OS: android 4.2.2
  • Game version: 0.16

[0.16 branch] $flags Variable in FloatingTextParticle not defined

Issue description

I created some floating texts and got spammed by the following message:
Notice: Undefined variable: flags in phar:///usr/games/pocketmine-test/PocketMine-MP.phar/src/pocketmine/level/particle/FloatingTextParticle.php on line 92

I think it's missing...

$flags = Array();

before...
https://github.com/pmmp/PocketMine-MP/blob/0.16/src/pocketmine/level/particle/FloatingTextParticle.php#L92

Steps to reproduce the issue

Create a floating text and wait for the AddEntityPacket at join. At console you will see the notice.

OS and versions

  • PocketMine-MP: branch 0.16 Commit 46af92f
  • PHP: 7.0.9
  • Server OS: Ubuntu 14.04
  • Game version: PE + Win10

Shutdown hangs at "Stopping CommandReader thread" on some systems

Issue description

On Windows, shutdown will hang at "Stopping CommandReader thread" until another input is received, such as hitting the Enter key.

Why this happens

stream_set_blocking() does not work on Windows. This results in the fgets() call to stdin to block the thread until another input is received. This issue does not occur on Linux as far as I can tell.

Possible solutions

This is a rather difficult problem to resolve cleanly. Since Thread::kill() was removed from pthreads in v3, the thread cannot be forcefully killed.
I have made a previous attempt to resolve this with an implementation using stream_select which also fails on Windows (returns 1 when no streams have changed >:-[)

Steps to reproduce the issue

  1. Shut down a PocketMine server on Windows using /stop

OS and versions

  • PocketMine-MP: 2fba107
  • PHP: 7.0+
  • OS: Any Windows version

References

PocketMine/PocketMine-MP#3990
https://bugs.php.net/bug.php?id=34972

Problems crafting with desktop GUI

Using the Windows 10 Edition beta, I am unable to craft anything. Server consolet shows:
Notice: Undefined offset: 0 in /opt/pocketmine-src/src/pocketmine/Player.php on line 2598
It also appears to throw the last selected item in front of the player when closing the crafting screen.

The same server works correctly with Win10 Mobile version of minecraft PE.

Steps to reproduce the issue

When running Win10 beta, chop down a block of wood and try to craft planks. It appears to work, but when you close the crafting window, the planks disappear out of inventory and the wood reappears. Server console shows the message mentioned above.

OS and versions

  • PHP: PHP7
  • Server OS: Ubuntu 16.04.1 LTS
    Game/PocketMine versions: Tried with PocketMine master branch(e7e476b) and Minecraft Win10 beta 15.10 and PocketMine 0.16 branch (1680fee) with Win10 beta v0.16.0

Docker

Maybe create docker container to quick run without install(compile/configure) php on my machine?

pocketmine.yml server-ip not honored

Issue description

The server-ip server configuration option is not being honored.

Steps to reproduce the issue

  1. edit pocketmine.yml and add a new line in the "settings:" section
settings:
 #Three-letter language code for server-side localization
 #Check your language code on https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
 language: "eng"
 #Whether to send all strings translated to server locale or let the device handle them
 force-language: false
 shutdown-message: "Server closed"
 #Allow listing plugins via Query
 query-plugins: true
 #Show a console message when a plugin uses deprecated API methods
 deprecated-verbose: true
 #Enable plugin and core profiling by default
 enable-profiling: false
 #Will only add results when tick measurement is below or equal to given value (default 20)
 profile-report-trigger: 20
 #Number of AsyncTask workers.
 #Used for plugin asynchronous tasks, world generation, compression and web communication.
 #Set this approximately to your number of cores.
 #If set to auto, it'll try to detect the number of cores (or use 2)
 async-workers: auto
 # enter the ip of the specific Network Interface Card you wish to bind to.
 server-ip: 123.4.5.67
  1. start server and notice that it is still binding to all network interfaces (i.e. 0.0.0.0)
[00:17:57] [Server thread/WARNING]: Non-packaged PocketMine-MP installation detected, do not use on production.
[00:17:57] [Server thread/INFO]: Loading pocketmine.yml...
[00:17:57] [Server thread/INFO]: Loading server properties...
[00:17:57] [Server thread/INFO]: Selected English (eng) as the base language
[00:17:57] [Server thread/INFO]: Starting Minecraft: PE server version v0.15.10.0 alpha
[00:17:57] [Server thread/INFO]: Opening server on 0.0.0.0:19132
[00:17:57] [Server thread/INFO]: This server is running PocketMine-MP version 1.6dev "Unleashed" (API 2.0.0)

OS and versions

  • PocketMine-MP: v0.15.10.0 alpha (commit e7e476b)
  • PHP: 7
  • Server OS: CentOS 7
  • Game version: MCPE

My friend's can't enter in my server

Hi ,
I have a server PocketMine in my tablet,with os Android 4.2.2 and version minecraft 0.15.10, in my tablet i can enter in my server, but my friend's not ,because my ip and port are false ,if i add them in another phone of using the same wifi, i saw the server in broadcaster lan and it is fixed, but in another wifi not.
My ip : 192.168.1.27
Port: 19312 or 25565
please help me or contact me in gmail : [email protected] 👍

i think PmmP devs should read this!

-Delleted issue about ServerAuth-
And whats more , spamming it in chat , cause console errors, showing u timings in process , was crazy!
(I told some players, if they can to spam with �)
-PmmP devs read from this point
Last issue affect all forks and even PmmP, spamming with that unknown symbol cause console gliches!

Tested on linux!

Crash on connect

Issue description

Crash on connect

Steps to reproduce the issue

  1. Install php
  2. Clone master 6b06e40
  3. Run server and start with default params
  4. Try to connect from android device

OS and versions

  • PocketMine-MP: 1.6dev 「Unleashed」 implementing API version 2.0.0 for Minecraft: PE v0.15.10.0 alpha (protocol version 84)
  • PHP: 7.0.11
  • OS: Ubuntu 14.04.1
  • Application: Nexus 6P, Android 7.0, Minecraft PE v0.15.90 alpha build 1

Crashdump, backtrace or other files

screenshot from 2016-10-12 02 46 04

--disable-readline command-line option does not work

Issue description

readline cannot be disabled with --disable-readline if the extension is present.

Steps to reproduce the issue

  1. Run a server on a Linux box with readline PHP extension, with --disable-readline option.

OS and versions

  • PocketMine-MP: d53810c
  • PHP: 7.0.10 with readline extension
  • Server OS: Any Linux distro
  • Game version: irrelevant

Level object memory leak on world unload

Issue description

When a world is unloaded, the Level object is not destroyed due to Position objects holding references to it. This causes myriad bugs, the most famous ones being examples like getName() on null (PocketMine/PocketMine-MP#4205), Level::getProvider returning null (iTXTech/Genisys#1908).

The memory leak is very minor, barely worthy of the name "leak" at all. However, the effects are widespread.

Why this happens

Players with spawn points in worlds that are later unloaded will, for example, hold Position objects pointing to their spawn point in the unloaded world. These Position objects hold strong references to the Level object, which is subsequently not destroyed even after everything related to it is closed, most notably the LevelProvider.

The getName() on null bug occurs when a player with a spawn point in an unloaded world either attempts to teleport back to their spawn point, or when they quit from the server and their data is saved.

Steps to reproduce the issue

  1. Set a player's spawn point in world x
  2. Unload world x
  3. Kill the player, or otherwise attempt to teleport them to their spawn point.

Possible solutions

Use Level ID

Instead of holding a direct Level reference, Position objects could instead keep the level ID of the level that it points to. Then, when getLevel() is called on a Position object, obtain a Level reference from the server directly. If the world is an unloaded world, this will return null.

Problems

  • Every Position object would either need to hold a Server reference, or obtain one on-demand using Server::getInstance().
  • Position currently has a public Level property. This is used directly by many things in the core, and removal of this property would require either a magic __get() method or all access to the level property to be done with Position::getLevel(), which would have to get a Level reference from the Server ondemand. Both of these solutions have potential to impact on performance due to how widespread the use of Position is.

Use WeakRef

Use WeakRef to hold a Level weak reference instead of a strong one. This would eliminate the problem, but would bring back some performance issues which are the reason Position weak references were removed before now (they previously did use weak references).

Problems

  • WeakRef doesn't play nice on PHP7, especially when used with pthreads.
  • Performance/memory impacts.

OS and versions

  • PocketMine-MP: 2fba107
  • PHP: doesn't matter
  • OS: doesn't matter

Sign memory leak

Issue description

Write a short description about the issue
Sign memory problem

Steps to reproduce the issue

  1. ...Place a sign and take a certain amount of time writing (any other steps are welcome)

OS and versions

  • PocketMine-MP: Latest
  • PHP: Latest
  • OS: Windows 10 Pro 64-bit

Crashdump, backtrace or other files

  • No crashes are shown

add

Please add synapse

Console window does not close

Issue description

When I enter "stop" in console,
plugins were disabled but console window wasn't closed

Steps to reproduce the issue

  1. run start.cmd
  2. when server is on, enter "stop"

OS and versions

  • PocketMine-MP: 1.6.1 dev
  • PHP: 7.0.3
  • Server OS: Windows
  • Game version: PE

Crashdump, backtrace or other files

  • ...

20161108_171354

0.16.0 Windows 10 Crash on Join

Issue description

Write a short description about the issue
I'm join in Server, Crash my Client, is possible fix?

Steps to reproduce the issue

  1. ...
  2. ...

OS and versions

  • PocketMine-MP: Last Version from 0.16
  • PHP: 7
  • Server OS: Windows 10
  • Game version: Win10 0.16.0

Crashdump, backtrace or other files

  • ...

Not an issue: How to automate updates to a repo server

Hello,

So, I have this script which was properly working with another build of Pocketmine, however this time I'm not sure how to get it to work in order to download the latest successful build from the jenkins server since the file that is being downloaded has a different series of combinations between letters and numbers.

Here is the script:

#!/bin/bash
function jsonValue() {
  KEY=$1
  num=$2
  awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'$KEY'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p
}
RLS=`curl -sX GET https://jenkins.pmmp.gq/job/PocketMine-MP/api/json | jsonValue number 1`
cd /var/www/html/jar
wget https://jenkins.pmmp.gq/job/PocketMine-MP/lastSuccessfulBuild/artifact/PocketMine-MP_1.6.1dev-$RLS_f50c63a0_API-2.1.0..phar -O pocketmine.phar
chown -R nobody:nobody pocketmine.phar

So, after the build number on the file's name, on each new build there are extra letters/numbers that are not included in the json file, how can I tweak this in order to automate my repo server to dowload each successful build and rename it to just pocketmine.phar so that I can download it on my other nodes whenever someone deploys a new instance of pocketmine?

This script will only grab the build number.

Slabs unable to be placed on another slab when block above it

Issue description

When you place a slab and place another block on it, you will be unable to place another slab on the slab you just placed.

Steps to reproduce the issue

  1. Place down a slab of any kind
  2. Place any block above this slab
  3. Place a slab on the first slab (under the block)
  4. Watch it disappear

OS and versions

  • PocketMine-MP: 8f3b951
  • PHP: Does not matter
  • OS: Both PE and Windows 10

Raklib block IP on join (0.16)

Issue description

When a player join raklib blocked automatically the IP and the player can't join

Steps to reproduce the issue

  1. ... Use 0.16 version of PM
  2. ... Join the server

OS and versions

  • PocketMine-MP: d763cb
  • PHP: 7.0.2
  • Server OS: Debian 8
  • Game version: PE/Win10 0.16(delete as appropriate)

Crashdump, backtrace or other files

  • ...
    capture d ecran 2016-10-25 a 22 09 16

0.16 version minecraft

Hi again,
Men I don't know how I can download pocketmine.phar and genisys.yml
Please give me direct link

Loading chunk with invalid item causes a crash

Issue description

For some reason sometimes when porting worlds from PC version or maybe converting format types. the item entities can be written on chunk nbt file wrong and cause crash when loading them.

Steps to reproduce the issue

I Don't know and don't want to.

OS and versions

  • PocketMine-MP: Starting from 1.4 and up

Crashdump, backtrace or other files

I added some debug messages in Item.php inside initEntity() and this is the output when invalid entity tries to get loaded.

tried to spawn invalid item entity (minecraft:wooden_axe:0:1) at Position(level=mines,x=-226.93924904777,y=74.661162516132,z=113.17553093388)
tried to spawn invalid item entity (minecraft:glass_pane:0:1) at Position(level=mines,x=-227.12765333584,y=74.908027488115,z=113.33313738153)

I added temporary workaround for this

if(!$this->namedtag->Item->id instanceof IntTag) {
    $this->level->removeEntity($this);
    return;
}

But this code above doesn't remove the entity record from nbt file.

This is the full error from console.

[22:56:03] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\item\Item::get() must be of the type integer, string given, called in /home/primus/DevField/src/pocketmine/nbt/NBT.php on line 110" (EXCEPTION) in "/src/pocketmine/item/Item" at line 283
[22:56:03] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[22:56:03] [Server thread/EMERGENCY]: Please upload the "/home/primus/DevField/CrashDump_Mon_Oct_17-22.56.03-EEST_2016.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.

And this is the dump string of that Item entity

["id"]=>
  object(pocketmine\nbt\tag\StringTag)#11871 (2) {
    ["__name":protected]=>
    string(2) "id"
    ["value":protected]=>
    string(17) "minecraft:feather"
  }
  ["Count"]=>
  object(pocketmine\nbt\tag\ByteTag)#11872 (2) {
    ["__name":protected]=>
    string(5) "Count"
    ["value":protected]=>
    int(1)
  }
  ["Damage"]=>
  object(pocketmine\nbt\tag\ShortTag)#11873 (2) {
    ["__name":protected]=>
    string(6) "Damage"
    ["value":protected]=>
    int(0)
  }

Seg fault on 64bit Linux

Issue description

When starting up, the server crashes with Segmentation fault (core dumped) and exits

I'm moving my server over to Linux from Windows, and I'm aware that 64-bit PHP has this issue under Windows, and my previous workaround was to just use a 32-bit version of PHP. However, it's not possible to do this under Linux since the plain x86 version cannot run in a 64-bit environment.

It turns out I can run the x86 version after enabling multilib, ok.

However, I'm still crashing quite a bit (70-80% of the time starting up) with a log I've updated below.

Steps to reproduce the issue

  1. Use 64 bit Linux (preferably Arch)
  2. Run the server

OS and versions

  • PocketMine-MP: 1.6.1
  • PHP: 7.0.6
  • Server OS: Arch Linux x86_64 (kernel 4.8.3)

Crashdump, backtrace or other files

[02:25:22] [Server thread/INFO]: Preparing level "world"
*** Error in `PocketMine-MP 1.6.1dev': double free or corruption (fasttop): 0x09b32680 ***
*** Error in `PocketMine-MP 1.6.1dev': double free or corruption (fasttop): 0x09b32680 ***
/usr/lib32/libc.so.6(+0x6815a)[0xf743c15a]
/usr/lib32/libc.so.6(+0x6ed07)[0xf7442d07]
======= Backtrace: =========
PocketMine-MP 1.6.1dev[0x86641d6]
/usr/lib32/libc.so.6(+0x6815a)[0xf743c15a]
PocketMine-MP 1.6.1dev(zend_lookup_class_ex+0x6e7)[0x8651375]
/usr/lib32/libc.so.6(+0x6ed07)[0xf7442d07]
PocketMine-MP 1.6.1dev[0x83a322e]
/usr/lib32/libc.so.6(+0x6f4d6)[0xf74434d6]
PocketMine-MP 1.6.1dev[0x86ce382]
PocketMine-MP 1.6.1dev[0x86641d6]
PocketMine-MP 1.6.1dev(zend_call_function+0xe05)[0x8650769]
PocketMine-MP 1.6.1dev(_zval_dtor_func+0x96)[0x8664406]
Aborted (core dumped)

freeze on command

https://timings.aikar.co/?url=23424624

Someone freezed my server using command packet!
I had timings runing, and did /timings paste right after server went back to normal!

Do you know what it is? Or if pmmp is vulnerable at this kind of attack?

If u close the issue and ban me, at least give me a hint XD !

Tests failing as of 0.16 PR #42 (dc07fc4)

After merging #42 (dc07fc4), Jenkins builds are failing during PocketMine-MP Test. Because of this, no 0.16-compatible builds are available yet.

I figured an issue to track the status of this block would be helpful. If not, feel free to close.

Start.sh doesn't work when php is installed via homebrew

Issue description

If you have php7 installed via homebrew, start.sh cannot find it automatically and returns "no php found"

Steps to reproduce the issue

  1. Install php7 via homebrew
  2. Run start.sh

OS and versions

  • PocketMine-MP: 1.6dev
  • PHP: 7.0.11
  • Server OS: macOS 10.12.1
  • Game version: PE

BaseInventory::contains() does not work with custom item names

Issue description

Write a short description about the issue
I'm not sure if this is actually a bug or not, but I thought I'd just report it anyways. When coding a plugin I struggled with contains() when using a custom item name. I executed some code on interact when a player has a certain block in his inventory, and found out that it DOES work with normal name items, and it Doesn't work with custom named items. I haven't found a way yet to make it work properly. (I don't want to foreach the inventory as it will execute my code more times if the player has more of the item)

Steps to reproduce the issue

  1. Write a plugin using contains(), in this case I use it in a command
case "finish":
    if($p->getInventory()->contains(Item::get(Item::STONE, 0, 1))){

    $this->getOwner()->finishQuest($p, $args[1]);
    $p->sendMessage (TF::GREEN . "You completed quest " . $args[1] . "!");
    return true;
    break;
  1. Try to execute the code in two ways, one when you have the item with the default name, and one with the same item but with custom name.
  2. When executing with a custom item name it does not work. It does however work with $inventory->getContents() but I have a reason to not use it as I mentioned above.

OS and versions

  • PocketMine-MP: e7e476b
  • PHP: 7 (any version of it)
  • Server OS: Linux
  • Game version: PE (Windows 10 probably has the same issue but I didn't test that yet)

Crashdump, backtrace or other files

  • No errors or crashdumps available

Gamemode text output issue on client

Issue description

When you change the gamemode of a player via command, it does not show to which gamemode it was changed.

Steps to reproduce the issue

  1. Change gamemode from the server or the client
  2. Look at the output on the client

OS and versions

  • PocketMine-MP: 557257b
  • PHP: 7
  • Server OS: Windows 10
  • Game version: Win 10 & PE

Crashdump, backtrace or other files

*upload

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.