fixes issue #254
This commit is contained in:
parent
dae490565b
commit
5fc1b9cb05
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Reference in a new issue