Skip to content

Commit 1498d1e

Browse files
committed
feat: Player.hasNoBlockConsumption renamed to Player.hasInfiniteBlock
1 parent 60d9f05 commit 1498d1e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

api/src/main/java/org/allaymc/api/player/Player.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ default void removeAbilities(PlayerAbility... abilities) {
306306
/**
307307
* Checks whether placed blocks should not be consumed from inventory.
308308
* <p>
309-
* Usually true for creative mode, actual ability value otherwise.
309+
* Usually {@code true} in creative mode, but always reflects the actual ability value.
310310
*
311311
* @return {@code true} if placed blocks are not consumed, {@code false} otherwise
312312
*/
313-
boolean hasNoBlockConsumption();
313+
boolean hasInfiniteBlock();
314314

315315
/**
316316
* Checks whether the player is currently in no clip mode.

server/src/main/java/org/allaymc/server/item/component/ItemBaseComponentImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ protected void tryApplyBlockEntityNBT(Dimension dimension, Vector3ic placeBlockP
384384
}
385385

386386
protected void tryConsumeItem(EntityPlayer player) {
387-
if (player == null || !player.getController().hasNoBlockConsumption()) {
387+
if (player == null || !player.getController().hasInfiniteBlock()) {
388388
thisItemStack.reduceCount(1);
389389
}
390390
}

server/src/main/java/org/allaymc/server/player/AllayPlayer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3175,7 +3175,7 @@ public boolean canFly() {
31753175
}
31763176

31773177
@Override
3178-
public boolean hasNoBlockConsumption() {
3178+
public boolean hasInfiniteBlock() {
31793179
return hasAbility(PlayerAbility.NO_BLOCK_CONSUMPTION);
31803180
}
31813181

0 commit comments

Comments
 (0)