menu
#7557851 Call to undefined function BedWars\utils\imagecreatefrompng()

Submitted by PocketMine-MP 4.8.1

General information

Version: 4.8.1
Git commit: 0a92e91a
Plugin involvement: Direct
Report date: 2022-09-23 05:20:03 +0000 UTC
Server uptime: 0 days 0 hours 2 minutes 48 seconds

System Information

PHP version: 8.0.22
JIT status: Not available
Operating system: linux
System banner: Linux localhost 4.14.193+-ab543 #1 SMP PREEMPT Wed Aug 3 17:12:38 CST 2022 aarch64

Error information

Warning: the BedWarsUltimate plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined function BedWars\utils\imagecreatefrompng()
File: plugins/BedWarsUltimate_dev-171.phar/src/BedWars/utils/Utils
Line: #136
Error level: Error
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
    }

/**
* @param string $path
* @return Skin|null
*/
public static function getSkinFromFile(string $path, $geometryName = null, $geometryData = null) : ?Skin{
if(!file_exists($path))
return null;
$img = @imagecreatefrompng($path);
$bytes = '';
$l = (int) @getimagesize($path)[1];
for ($y = 0; $y < $l; $y++) {
for ($x = 0; $x < 64; $x++) {
$rgba = @imagecolorat($img, $x, $y);
$a = ((~((int)($rgba >> 24))) << 1) & 0xff;
$r = ($rgba >> 16) & 0xff;
$g = ($rgba >> 8) & 0xff;
$b = $rgba & 0xff;
$bytes .= chr($r) . chr($g) . chr($b) . chr($a);
#0 plugins/BedWarsUltimate_dev-171.phar/src/BedWars/game/Generator(87): BedWars\utils\Utils::getSkinFromFile(string[62] /home/pocket/server/plugin_data/BedWarsUltimate//skins/264.png, string[20] geometry.player_head, string[163] {"geometry.player_head":{"texturewidth":64,"textureheight":64,"bones":[{"name":")
#1 plugins/BedWarsUltimate_dev-171.phar/src/BedWars/game/Game(397): BedWars\game\Generator->__construct(int 264, int 30, object pocketmine\world\Position#137391, true, true, null)
#2 plugins/BedWarsUltimate_dev-171.phar/src/BedWars/game/Game(374): BedWars\game\Game->initGenerators()
#3 plugins/BedWarsUltimate_dev-171.phar/src/BedWars/game/Game(756): BedWars\game\Game->start()
#4 plugins/BedWarsUltimate_dev-171.phar/src/BedWars/game/GameTick(24): BedWars\game\Game->tick()
#5 pmsrc/src/scheduler/TaskHandler(114): BedWars\game\GameTick->onRun()
#6 pmsrc/src/scheduler/TaskScheduler(141): pocketmine\scheduler\TaskHandler->run()
#7 pmsrc/src/plugin/PluginManager(498): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(int 3241)
#8 pmsrc/src/Server(1811): pocketmine\plugin\PluginManager->tickSchedulers(int 3241)
#9 pmsrc/src/Server(1700): pocketmine\Server->tick()
#10 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#11 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[20] /home/pocket/server/, string[28] /home/pocket/server/plugins/)
#12 pmsrc/src/PocketMine(328): pocketmine\server()
#13 pmsrc(11): require(string[64] phar:///home/pocket/server/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show