mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11802296296
This commit is contained in:
@ -31,7 +31,7 @@ use function str_repeat;
|
||||
|
||||
final class VersionInfo{
|
||||
public const NAME = "PocketMine-MP";
|
||||
public const BASE_VERSION = "5.21.1";
|
||||
public const BASE_VERSION = "5.21.2";
|
||||
public const IS_DEVELOPMENT_BUILD = true;
|
||||
public const BUILD_CHANNEL = "stable";
|
||||
|
||||
|
@ -42,7 +42,7 @@ class ArmorInventory extends SimpleInventory{
|
||||
){
|
||||
parent::__construct(4);
|
||||
|
||||
$this->validators->add(new CallbackSlotValidator($this->validate(...)));
|
||||
$this->validators->add(new CallbackSlotValidator(self::validate(...)));
|
||||
}
|
||||
|
||||
public function getHolder() : Living{
|
||||
@ -81,7 +81,7 @@ class ArmorInventory extends SimpleInventory{
|
||||
$this->setItem(self::SLOT_FEET, $boots);
|
||||
}
|
||||
|
||||
private function validate(Inventory $inventory, Item $item, int $slot) : ?TransactionValidationException{
|
||||
private static function validate(Inventory $inventory, Item $item, int $slot) : ?TransactionValidationException{
|
||||
if($item instanceof Armor){
|
||||
if($item->getArmorSlot() !== $slot){
|
||||
return new TransactionValidationException("Armor item is in wrong slot");
|
||||
|
Reference in New Issue
Block a user