Stronghold of Player Safety now checks if inventory is full before awarding lamp rewards

This commit is contained in:
Jordan 2024-03-03 05:19:09 +00:00 committed by Ryan
parent 9068874556
commit 6b9a06d175

View file

@ -90,6 +90,12 @@ public class ProfessorHenryDialogue extends DialoguePlugin {
stage++; stage++;
break; break;
case 907: case 907:
if (player.getInventory().freeSlots() == 0) {
sendNormalDialogue(npc, FacialExpression.HALF_GUILTY, "It seems your inventory is full.");
stage = -1;
return false;
}
if (removeItem(player, Items.TEST_PAPER_12626, Container.INVENTORY)) { if (removeItem(player, Items.TEST_PAPER_12626, Container.INVENTORY)) {
showReward(player); showReward(player);
end(); end();