Skip to content

Commit

Permalink
Fixed poor named
Browse files Browse the repository at this point in the history
  • Loading branch information
LucFr1746 committed Dec 8, 2024
1 parent 075adf7 commit d779e8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/github/lucfr1746/LLib/Player/PlayerAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ public boolean isWearingBindingCurseArmor() {
* Checks if the player has enough available space in their inventory to hold the specified number of items.
* This includes both the main inventory slots and the equipment (helmet, chestplate, leggings, boots, and off-hand).
*
* @param neededSpace The minimum number of available spaces required in the player's inventory.
* @param spaceRequired The minimum number of available spaces required in the player's inventory.
* @return true if the player has enough space, false otherwise.
*/
public boolean isEnoughSpace(int neededSpace) {
public boolean isEnoughSpace(int spaceRequired) {
int availableSpace = 0;

// Check if the player has space in equipment slots (helmet, chestplate, leggings, boots, and off-hand)
Expand All @@ -192,7 +192,7 @@ public boolean isEnoughSpace(int neededSpace) {
if (item == null || item.getType() == Material.AIR) {
availableSpace++;
}
if (availableSpace >= neededSpace) return true;
if (availableSpace >= spaceRequired) return true;
}
return false;
}
Expand Down

0 comments on commit d779e8b

Please sign in to comment.