Skip to content

Commit

Permalink
Check if the stairs are upside down or under something
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriM1 committed Aug 4, 2020
1 parent bd0b456 commit 78bba12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>maru</groupId>
<artifactId>PmChair</artifactId>
<version>2.0.3</version>
<version>2.0.4</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/maru/PmChair.java
Expand Up @@ -70,6 +70,8 @@ public void onTouch(PlayerInteractEvent event) {

if (!this.onChair.containsKey(name)) {
if (block instanceof BlockStairs) {
if ((block.getDamage() & 4) != 0 || block.up().isSolid()) return;

if (!this.doubleTap.containsKey(name)) {
this.doubleTap.put(name, System.currentTimeMillis());
player.sendPopup(TextFormat.RED + this.get("touch-popup"));
Expand Down

0 comments on commit 78bba12

Please sign in to comment.