Skip to content

Commit e76f03c

Browse files
Apply suggestions from code review
Co-authored-by: ipad54 <[email protected]>
1 parent 5998bca commit e76f03c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/inventory/ArmorInventory.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ public function setBoots(Item $boots) : void{
8484
private function validate(Inventory $inventory, Item $item, int $slot) : ?TransactionValidationException{
8585
if($item instanceof Armor && $item->getArmorSlot() === $slot){
8686
if($item->getArmorSlot() !== $slot){
87-
return new TransactionValidationException("Armor item in wrong slot");
87+
return new TransactionValidationException("Armor item is in wrong slot");
8888
}
8989
}else{
9090
if(!($slot === ArmorInventory::SLOT_HEAD && $item instanceof ItemBlock && (
9191
$item->getBlock()->getTypeId() === BlockTypeIds::CARVED_PUMPKIN ||
9292
$item->getBlock()->getTypeId() === BlockTypeIds::MOB_HEAD
9393
))){
94-
return new TransactionValidationException("Item not accepted in an armor slot");
94+
return new TransactionValidationException("Item is not accepted in an armor slot");
9595
}
9696
}
9797
return null;

src/inventory/transaction/action/validator/SlotValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
use pocketmine\item\Item;
2929

3030
/**
31-
* Validate a slot placement in an inventory.
31+
* Validates a slot placement in an inventory.
3232
*/
3333
interface SlotValidator{
3434
/**

0 commit comments

Comments
 (0)