beito123 / PocketMine-MP-Plugins

(OLD, This repo will not update) My plugins for PocketMine-MP
GNU Lesser General Public License v3.0
6 stars 5 forks source link

itemframeblock #8

Closed inxomnyaa closed 8 years ago

inxomnyaa commented 8 years ago
        if($this->getSide($faces[$this->meta] ?? -1)->getId() === Item::AIR){//

why the ??

beito123 commented 8 years ago

It is doing just in case. :) It works even if it is edited by such as the World editor.

$side = isset($faces[$this->meta]) ? $faces[$this->meta]:-1;
inxomnyaa commented 8 years ago

And.. what is ?? doing? Also, noteblocks dont play sounds for me (new issue?)

beito123 commented 8 years ago

It is a new feature of php7. http://php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op

ok, i will try. thank :)

inxomnyaa commented 8 years ago

@beito123 ah, thanks, thats why i didnt knew it :)