surva network: development blog

Articles and news about Minecraft: Bedrock Edition / PocketMine server development


Creating repeating / delayed tasks in PocketMine-MP

A common tool you frequently need when programming with the PocketMine-MP API are tasks. Using tasks, you’re able to repeat running code e. g. each 30 seconds, or to run delayed code for e. g. after 10 seconds.

How to get the attacker using PlayerDeathEvent

A frequently asked question in PocketMine-MP plugin development is how the get the attacker of a died player using PlayerDeathEvent, which is not obvious especially for beginners in PocketMine-MP plugin development. First, we need to listen on the PlayerDeathEvent, which provides us with the killed player.