Skip to content

Commit 44c8857

Browse files
authored
Merge pull request #2757 from BentoBoxWorld/545_shelf_block_protection
Add shelf block protection #545
2 parents 493d46b + 607f827 commit 44c8857

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/main/java/world/bentobox/bentobox/listeners/flags/protection/BlockInteractionListener.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ private boolean checkSpecialCases(Event e, Player player, Block block) {
248248
return true;
249249
}
250250
if (Util.isVersionAtLeast("1.21.10")) {
251+
// Wooden shelves
252+
if (Tag.WOODEN_SHELVES.isTagged(type)) {
253+
this.checkIsland(e, player, loc, Flags.BOOKSHELF);
254+
return true;
255+
}
256+
251257
// Prevent animation of copper golems. Use break blocks for now. This could potentiall have it's own flag in the future.
252258
if (Tag.COPPER_GOLEM_STATUES.isTagged(type)) {
253259
this.checkIsland(e, player, loc, Flags.BREAK_BLOCKS);

src/main/resources/locales/en-US.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -989,11 +989,11 @@ protection:
989989
&a entering into boats.
990990
hint: No boat interaction allowed
991991
BOOKSHELF:
992-
name: Bookshelves
992+
name: Shelves
993993
description: |-
994-
&a Allow to place books
995-
&a or to take books.
996-
hint: cannot place a book or take a book.
994+
&a Allow to place item
995+
&a or to take item.
996+
hint: cannot place an item or take an item.
997997
BREAK_BLOCKS:
998998
description: Toggle breaking
999999
name: Break blocks

0 commit comments

Comments
 (0)