mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Merge pull request #483 from jedk1/master
Fix NPE in blocksource & Avy Cooldown
This commit is contained in:
commit
a59c651386
2 changed files with 7 additions and 4 deletions
|
@ -69,7 +69,7 @@ public class AvatarState extends AvatarAbility {
|
||||||
public void run() {
|
public void run() {
|
||||||
GLOBAL_COOLDOWNS.remove(id);
|
GLOBAL_COOLDOWNS.remove(id);
|
||||||
}
|
}
|
||||||
}, cooldown);
|
}, cooldown/50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 (info != null) {
|
||||||
if (TempBlock.isTempBlock(info.getBlock())) {
|
if (TempBlock.isTempBlock(info.getBlock())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return info != null ? info.getBlock() : null;
|
return info.getBlock();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue