Skip to content

Commit

Permalink
handle not holding item error in allowBubbleColumnPlace
Browse files Browse the repository at this point in the history
  • Loading branch information
ForestOfLight committed Oct 22, 2024
1 parent 9dfd3c3 commit bab8c7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ new Rule({
world.beforeEvents.playerPlaceBlock.subscribe((event) => {
if (!event.player || !Rule.getNativeValue('allowBubbleColumnPlacement')) return;
system.run(() => {
if (event.player.getComponent('equippable').getEquipment('Mainhand').typeId === 'minecraft:bubble_column') {
if (event.player.getComponent('equippable').getEquipment('Mainhand')?.typeId === 'minecraft:bubble_column') {
world.structureManager.place('mystructure:bubble_column', event.dimension, event.block.location);
}
});
Expand Down

0 comments on commit bab8c7b

Please sign in to comment.