Skip to content

Commit

Permalink
Add skipTripwireHookPlacementValidation (#12091)
Browse files Browse the repository at this point in the history
This allows for the configuration of tripwire hook duping.
  • Loading branch information
Owen1212055 authored Feb 10, 2025
1 parent cafef9c commit fa5824e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
+ if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent
emitState(level, pos, flag2, flag3, flag, flag1);
if (!attaching) {
+ if (level.getBlockState(pos).is(Blocks.TRIPWIRE_HOOK)) // Paper - Validate tripwire hook placement before update
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.skipTripwireHookPlacementValidation || level.getBlockState(pos).is(Blocks.TRIPWIRE_HOOK)) // Paper - Validate tripwire hook placement before update
level.setBlock(pos, blockState1.setValue(FACING, direction), 3);
if (shouldNotifyNeighbours) {
notifyNeighbors(block, level, pos, direction);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ public class SpamLimiter extends ConfigurationPart {
public class UnsupportedSettings extends ConfigurationPart {
@Comment("This setting allows for exploits related to end portals, for example sand duping")
public boolean allowUnsafeEndPortalTeleportation = false;
@Comment("This setting controls the ability to enable dupes related to tripwires.")
public boolean skipTripwireHookPlacementValidation = false;
@Comment("This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.")
public boolean allowPermanentBlockBreakExploits = false;
@Comment("This setting controls if player should be able to use TNT duplication, but this also allows duplicating carpet, rails and potentially other items")
Expand Down

0 comments on commit fa5824e

Please sign in to comment.