readd debugstick check

This commit is contained in:
Lulu13022002
2024-12-15 15:55:13 +01:00
parent 9346db2844
commit ac9ac5e7ea
13 changed files with 111 additions and 113 deletions

View File

@@ -5,3 +5,12 @@
package net.minecraft.world.item;
import java.util.Collection;
@@ -51,7 +_,7 @@
public boolean handleInteraction(
Player player, BlockState stateClicked, LevelAccessor accessor, BlockPos pos, boolean shouldCycleState, ItemStack debugStack
) {
- if (!player.canUseGameMasterBlocks()) {
+ if (!player.canUseGameMasterBlocks() && !(player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.debugstick")) && !player.getBukkitEntity().hasPermission("minecraft.debugstick.always")) { // Spigot
return false;
} else {
Holder<Block> blockHolder = stateClicked.getBlockHolder();