diff --git a/src/main/js/modules/utils/utils.js b/src/main/js/modules/utils/utils.js index 69385cb..82ed01f 100644 --- a/src/main/js/modules/utils/utils.js +++ b/src/main/js/modules/utils/utils.js @@ -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; }