Skip to content

Commit

Permalink
fixes issue #254
Browse files Browse the repository at this point in the history
  • Loading branch information
walterhiggins committed Jun 7, 2015
1 parent dae4905 commit 5fc1b9c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/js/modules/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,12 @@ exports.getMousePos = function getMousePos( player ) {
if ( !player.getTargetBlock ) {
return null;
}
targetedBlock = player.getTargetBlock( null, 5 );
try {
targetedBlock = player.getTargetBlock( null, 5 );
}catch (e){
// spigot 1.8.7 adds new overload which causes problems with JDK 7
targetedBlock = player['getTargetBlock(java.util.Set,int)'](null, 5 );
}
if ( targetedBlock == null || targetedBlock.isEmpty() ) {
return null;
}
Expand Down

0 comments on commit 5fc1b9c

Please sign in to comment.