Skip to content

Commit

Permalink
Fix bed detection on pre 1.13 servers
Browse files Browse the repository at this point in the history
Fixes github issue #10
  • Loading branch information
HeroCC committed Oct 11, 2018
1 parent 6e14546 commit 6913964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'java'

String packagePath = 'org.minecast.bedhome'
group packagePath
version = '2.29'
version = '2.30'

sourceCompatibility = 1.6
targetCompatibility = 1.6
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/minecast/bedhome/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public static boolean blockIsBed(Block b) {
} catch (ClassNotFoundException e) {
// I know, I know it's deprecated, but backwards compatibility commands me
//noinspection deprecation
return b.getType().equals(Material.LEGACY_BED_BLOCK) || b.getType().equals(Material.LEGACY_BED);
return b.getState() instanceof org.bukkit.block.Bed;
}

return b.getBlockData() instanceof Bed;
Expand Down

0 comments on commit 6913964

Please sign in to comment.