mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fix NPE in blocksource
This commit is contained in:
parent
eaf183f8c4
commit
d930c78d16
1 changed files with 6 additions and 3 deletions
|
@ -156,10 +156,13 @@ public class BlockSource {
|
||||||
*/
|
*/
|
||||||
public static Block getSourceBlock(Player player, double range, BlockSourceType sourceType, ClickType clickType) {
|
public static Block getSourceBlock(Player player, double range, BlockSourceType sourceType, ClickType clickType) {
|
||||||
BlockSourceInformation info = getValidBlockSourceInformation(player, range, sourceType, clickType);
|
BlockSourceInformation info = getValidBlockSourceInformation(player, range, sourceType, clickType);
|
||||||
if (TempBlock.isTempBlock(info.getBlock())) {
|
if (info != null) {
|
||||||
return null;
|
if (TempBlock.isTempBlock(info.getBlock())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return info.getBlock();
|
||||||
}
|
}
|
||||||
return info != null ? info.getBlock() : null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue