Skip to content

Commit

Permalink
Merge pull request #812 from DansPlugins/tweaking-bypass-break-door-l…
Browse files Browse the repository at this point in the history
…ock-mechanic

Tweaking bypass break door lock mechanic
  • Loading branch information
dmccoystephenson authored Dec 23, 2020
2 parents c8d3f6d + 0c0f5c4 commit 449b8a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>KingdomProgrammers</groupId>
<artifactId>Medieval-Factions</artifactId>
<version>v3.6.2-beta-2</version>
<version>v3.6.2</version>
<packaging>jar</packaging>

<name>Medieval Factions</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class MedievalFactions extends JavaPlugin {

private static MedievalFactions instance;

private String version = "v3.6.2-beta-2";
private String version = "v3.6.2";

public static MedievalFactions getInstance() {
return instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,18 @@ public void handle(BlockBreakEvent event) {
}

removeLock(event.getBlock(), PersistentData.getInstance().getLockedBlocks());

// if block was a door
if (isDoor(event.getBlock())) {
// remove locks above and below the original block as well
removeLock(event.getBlock().getRelative(BlockFace.UP));
removeLock(event.getBlock().getRelative(BlockFace.DOWN));
Block relativeUp = event.getBlock().getRelative(BlockFace.UP);
Block relativeDown = event.getBlock().getRelative(BlockFace.DOWN);
if (isDoor(relativeUp)) {
removeLock(relativeUp);
}
if (isDoor(relativeDown)) {
removeLock(relativeDown);
}
return;
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: MedievalFactions
version: 3.6.2-beta-2
version: 3.6.2
author: KingdomProgrammers
main: dansplugins.factionsystem.MedievalFactions
api-version: 1.13
Expand Down

0 comments on commit 449b8a6

Please sign in to comment.