Merge pull request #483 from jedk1/master

Fix NPE in blocksource & Avy Cooldown
This commit is contained in:
OmniCypher 2016-04-18 17:16:34 -07:00
commit a59c651386
2 changed files with 7 additions and 4 deletions

View file

@ -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);
} }
} }

View file

@ -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;
} }
/** /**